From d46b09267b157d4a406a596c6bc2d51dc4a7645d Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 5 Feb 2016 17:14:59 +0000 Subject: [WebAssembly] Update the select instructions' operand orders to match the spec. llvm-svn: 259893 --- llvm/test/CodeGen/WebAssembly/select.ll | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'llvm/test/CodeGen/WebAssembly/select.ll') diff --git a/llvm/test/CodeGen/WebAssembly/select.ll b/llvm/test/CodeGen/WebAssembly/select.ll index 416f58cac0d..e198a0bdf21 100644 --- a/llvm/test/CodeGen/WebAssembly/select.ll +++ b/llvm/test/CodeGen/WebAssembly/select.ll @@ -9,7 +9,7 @@ target triple = "wasm32-unknown-unknown" ; CHECK-LABEL: select_i32_bool: ; CHECK-NEXT: .param i32, i32, i32{{$}} ; CHECK-NEXT: .result i32{{$}} -; CHECK-NEXT: i32.select $push0=, $0, $1, $2{{$}} +; CHECK-NEXT: i32.select $push0=, $1, $2, $0{{$}} ; CHECK-NEXT: return $pop0{{$}} define i32 @select_i32_bool(i1 zeroext %a, i32 %b, i32 %c) { %cond = select i1 %a, i32 %b, i32 %c @@ -19,7 +19,7 @@ define i32 @select_i32_bool(i1 zeroext %a, i32 %b, i32 %c) { ; CHECK-LABEL: select_i32_eq: ; CHECK-NEXT: .param i32, i32, i32{{$}} ; CHECK-NEXT: .result i32{{$}} -; CHECK-NEXT: i32.select $push0=, $0, $2, $1{{$}} +; CHECK-NEXT: i32.select $push0=, $2, $1, $0{{$}} ; CHECK-NEXT: return $pop0{{$}} define i32 @select_i32_eq(i32 %a, i32 %b, i32 %c) { %cmp = icmp eq i32 %a, 0 @@ -30,7 +30,7 @@ define i32 @select_i32_eq(i32 %a, i32 %b, i32 %c) { ; CHECK-LABEL: select_i32_ne: ; CHECK-NEXT: .param i32, i32, i32{{$}} ; CHECK-NEXT: .result i32{{$}} -; CHECK-NEXT: i32.select $push0=, $0, $1, $2{{$}} +; CHECK-NEXT: i32.select $push0=, $1, $2, $0{{$}} ; CHECK-NEXT: return $pop0{{$}} define i32 @select_i32_ne(i32 %a, i32 %b, i32 %c) { %cmp = icmp ne i32 %a, 0 @@ -41,7 +41,7 @@ define i32 @select_i32_ne(i32 %a, i32 %b, i32 %c) { ; CHECK-LABEL: select_i64_bool: ; CHECK-NEXT: .param i32, i64, i64{{$}} ; CHECK-NEXT: .result i64{{$}} -; CHECK-NEXT: i64.select $push0=, $0, $1, $2{{$}} +; CHECK-NEXT: i64.select $push0=, $1, $2, $0{{$}} ; CHECK-NEXT: return $pop0{{$}} define i64 @select_i64_bool(i1 zeroext %a, i64 %b, i64 %c) { %cond = select i1 %a, i64 %b, i64 %c @@ -51,7 +51,7 @@ define i64 @select_i64_bool(i1 zeroext %a, i64 %b, i64 %c) { ; CHECK-LABEL: select_i64_eq: ; CHECK-NEXT: .param i32, i64, i64{{$}} ; CHECK-NEXT: .result i64{{$}} -; CHECK-NEXT: i64.select $push0=, $0, $2, $1{{$}} +; CHECK-NEXT: i64.select $push0=, $2, $1, $0{{$}} ; CHECK-NEXT: return $pop0{{$}} define i64 @select_i64_eq(i32 %a, i64 %b, i64 %c) { %cmp = icmp eq i32 %a, 0 @@ -62,7 +62,7 @@ define i64 @select_i64_eq(i32 %a, i64 %b, i64 %c) { ; CHECK-LABEL: select_i64_ne: ; CHECK-NEXT: .param i32, i64, i64{{$}} ; CHECK-NEXT: .result i64{{$}} -; CHECK-NEXT: i64.select $push0=, $0, $1, $2{{$}} +; CHECK-NEXT: i64.select $push0=, $1, $2, $0{{$}} ; CHECK-NEXT: return $pop0{{$}} define i64 @select_i64_ne(i32 %a, i64 %b, i64 %c) { %cmp = icmp ne i32 %a, 0 @@ -73,7 +73,7 @@ define i64 @select_i64_ne(i32 %a, i64 %b, i64 %c) { ; CHECK-LABEL: select_f32_bool: ; CHECK-NEXT: .param i32, f32, f32{{$}} ; CHECK-NEXT: .result f32{{$}} -; CHECK-NEXT: f32.select $push0=, $0, $1, $2{{$}} +; CHECK-NEXT: f32.select $push0=, $1, $2, $0{{$}} ; CHECK-NEXT: return $pop0{{$}} define float @select_f32_bool(i1 zeroext %a, float %b, float %c) { %cond = select i1 %a, float %b, float %c @@ -83,7 +83,7 @@ define float @select_f32_bool(i1 zeroext %a, float %b, float %c) { ; CHECK-LABEL: select_f32_eq: ; CHECK-NEXT: .param i32, f32, f32{{$}} ; CHECK-NEXT: .result f32{{$}} -; CHECK-NEXT: f32.select $push0=, $0, $2, $1{{$}} +; CHECK-NEXT: f32.select $push0=, $2, $1, $0{{$}} ; CHECK-NEXT: return $pop0{{$}} define float @select_f32_eq(i32 %a, float %b, float %c) { %cmp = icmp eq i32 %a, 0 @@ -94,7 +94,7 @@ define float @select_f32_eq(i32 %a, float %b, float %c) { ; CHECK-LABEL: select_f32_ne: ; CHECK-NEXT: .param i32, f32, f32{{$}} ; CHECK-NEXT: .result f32{{$}} -; CHECK-NEXT: f32.select $push0=, $0, $1, $2{{$}} +; CHECK-NEXT: f32.select $push0=, $1, $2, $0{{$}} ; CHECK-NEXT: return $pop0{{$}} define float @select_f32_ne(i32 %a, float %b, float %c) { %cmp = icmp ne i32 %a, 0 @@ -105,7 +105,7 @@ define float @select_f32_ne(i32 %a, float %b, float %c) { ; CHECK-LABEL: select_f64_bool: ; CHECK-NEXT: .param i32, f64, f64{{$}} ; CHECK-NEXT: .result f64{{$}} -; CHECK-NEXT: f64.select $push0=, $0, $1, $2{{$}} +; CHECK-NEXT: f64.select $push0=, $1, $2, $0{{$}} ; CHECK-NEXT: return $pop0{{$}} define double @select_f64_bool(i1 zeroext %a, double %b, double %c) { %cond = select i1 %a, double %b, double %c @@ -115,7 +115,7 @@ define double @select_f64_bool(i1 zeroext %a, double %b, double %c) { ; CHECK-LABEL: select_f64_eq: ; CHECK-NEXT: .param i32, f64, f64{{$}} ; CHECK-NEXT: .result f64{{$}} -; CHECK-NEXT: f64.select $push0=, $0, $2, $1{{$}} +; CHECK-NEXT: f64.select $push0=, $2, $1, $0{{$}} ; CHECK-NEXT: return $pop0{{$}} define double @select_f64_eq(i32 %a, double %b, double %c) { %cmp = icmp eq i32 %a, 0 @@ -126,7 +126,7 @@ define double @select_f64_eq(i32 %a, double %b, double %c) { ; CHECK-LABEL: select_f64_ne: ; CHECK-NEXT: .param i32, f64, f64{{$}} ; CHECK-NEXT: .result f64{{$}} -; CHECK-NEXT: f64.select $push0=, $0, $1, $2{{$}} +; CHECK-NEXT: f64.select $push0=, $1, $2, $0{{$}} ; CHECK-NEXT: return $pop0{{$}} define double @select_f64_ne(i32 %a, double %b, double %c) { %cmp = icmp ne i32 %a, 0 -- cgit v1.2.3