Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInteger.td =================================================================== --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInteger.td +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInteger.td @@ -28,14 +28,14 @@ defm EQ : ComparisonInt; defm NE : ComparisonInt; -defm SLT : ComparisonInt; -defm SLE : ComparisonInt; -defm ULT : ComparisonInt; -defm ULE : ComparisonInt; -defm SGT : ComparisonInt; -defm SGE : ComparisonInt; -defm UGT : ComparisonInt; -defm UGE : ComparisonInt; +defm LT_S : ComparisonInt; +defm LE_S : ComparisonInt; +defm LT_U : ComparisonInt; +defm LE_U : ComparisonInt; +defm GT_S : ComparisonInt; +defm GE_S : ComparisonInt; +defm GT_U : ComparisonInt; +defm GE_U : ComparisonInt; defm CLZ : UnaryInt; defm CTZ : UnaryInt; Index: llvm/trunk/test/CodeGen/WebAssembly/comparisons_i32.ll =================================================================== --- llvm/trunk/test/CodeGen/WebAssembly/comparisons_i32.ll +++ llvm/trunk/test/CodeGen/WebAssembly/comparisons_i32.ll @@ -33,7 +33,7 @@ } ; CHECK-LABEL: slt_i32: -; CHECK: slt (get_local 3), (get_local 2){{$}} +; CHECK: i32.lt_s (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @slt_i32(i32 %x, i32 %y) { %a = icmp slt i32 %x, %y @@ -42,7 +42,7 @@ } ; CHECK-LABEL: sle_i32: -; CHECK: sle (get_local 3), (get_local 2){{$}} +; CHECK: i32.le_s (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @sle_i32(i32 %x, i32 %y) { %a = icmp sle i32 %x, %y @@ -51,7 +51,7 @@ } ; CHECK-LABEL: ult_i32: -; CHECK: ult (get_local 3), (get_local 2){{$}} +; CHECK: i32.lt_u (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @ult_i32(i32 %x, i32 %y) { %a = icmp ult i32 %x, %y @@ -60,7 +60,7 @@ } ; CHECK-LABEL: ule_i32: -; CHECK: ule (get_local 3), (get_local 2){{$}} +; CHECK: i32.le_u (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @ule_i32(i32 %x, i32 %y) { %a = icmp ule i32 %x, %y @@ -69,7 +69,7 @@ } ; CHECK-LABEL: sgt_i32: -; CHECK: sgt (get_local 3), (get_local 2){{$}} +; CHECK: i32.gt_s (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @sgt_i32(i32 %x, i32 %y) { %a = icmp sgt i32 %x, %y @@ -78,7 +78,7 @@ } ; CHECK-LABEL: sge_i32: -; CHECK: sge (get_local 3), (get_local 2){{$}} +; CHECK: i32.ge_s (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @sge_i32(i32 %x, i32 %y) { %a = icmp sge i32 %x, %y @@ -87,7 +87,7 @@ } ; CHECK-LABEL: ugt_i32: -; CHECK: ugt (get_local 3), (get_local 2){{$}} +; CHECK: i32.gt_u (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @ugt_i32(i32 %x, i32 %y) { %a = icmp ugt i32 %x, %y @@ -96,7 +96,7 @@ } ; CHECK-LABEL: uge_i32: -; CHECK: uge (get_local 3), (get_local 2){{$}} +; CHECK: i32.ge_u (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @uge_i32(i32 %x, i32 %y) { %a = icmp uge i32 %x, %y Index: llvm/trunk/test/CodeGen/WebAssembly/comparisons_i64.ll =================================================================== --- llvm/trunk/test/CodeGen/WebAssembly/comparisons_i64.ll +++ llvm/trunk/test/CodeGen/WebAssembly/comparisons_i64.ll @@ -33,7 +33,7 @@ } ; CHECK-LABEL: slt_i64: -; CHECK: slt (get_local 3), (get_local 2){{$}} +; CHECK: i64.lt_s (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @slt_i64(i64 %x, i64 %y) { %a = icmp slt i64 %x, %y @@ -42,7 +42,7 @@ } ; CHECK-LABEL: sle_i64: -; CHECK: sle (get_local 3), (get_local 2){{$}} +; CHECK: i64.le_s (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @sle_i64(i64 %x, i64 %y) { %a = icmp sle i64 %x, %y @@ -51,7 +51,7 @@ } ; CHECK-LABEL: ult_i64: -; CHECK: ult (get_local 3), (get_local 2){{$}} +; CHECK: i64.lt_u (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @ult_i64(i64 %x, i64 %y) { %a = icmp ult i64 %x, %y @@ -60,7 +60,7 @@ } ; CHECK-LABEL: ule_i64: -; CHECK: ule (get_local 3), (get_local 2){{$}} +; CHECK: i64.le_u (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @ule_i64(i64 %x, i64 %y) { %a = icmp ule i64 %x, %y @@ -69,7 +69,7 @@ } ; CHECK-LABEL: sgt_i64: -; CHECK: sgt (get_local 3), (get_local 2){{$}} +; CHECK: i64.gt_s (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @sgt_i64(i64 %x, i64 %y) { %a = icmp sgt i64 %x, %y @@ -78,7 +78,7 @@ } ; CHECK-LABEL: sge_i64: -; CHECK: sge (get_local 3), (get_local 2){{$}} +; CHECK: i64.ge_s (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @sge_i64(i64 %x, i64 %y) { %a = icmp sge i64 %x, %y @@ -87,7 +87,7 @@ } ; CHECK-LABEL: ugt_i64: -; CHECK: ugt (get_local 3), (get_local 2){{$}} +; CHECK: i64.gt_u (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @ugt_i64(i64 %x, i64 %y) { %a = icmp ugt i64 %x, %y @@ -96,7 +96,7 @@ } ; CHECK-LABEL: uge_i64: -; CHECK: uge (get_local 3), (get_local 2){{$}} +; CHECK: i64.ge_u (get_local 3), (get_local 2){{$}} ; CHECK-NEXT: set_local 4, pop{{$}} define i32 @uge_i64(i64 %x, i64 %y) { %a = icmp uge i64 %x, %y