Skip to content

Commit 3892b0c

Browse files
committed
Reapply llvm#149461
1 parent 39ac696 commit 3892b0c

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3429,7 +3429,7 @@ combineVectorSizedSetCCEquality(SDNode *N, TargetLowering::DAGCombinerInfo &DCI,
34293429
DL, MVT::i32),
34303430
Cmp});
34313431

3432-
return DAG.getSetCC(DL, VT, Intr, DAG.getConstant(0, DL, MVT::i32), CC);
3432+
return DAG.getSetCC(DL, VT, Intr, DAG.getConstant(0, DL, MVT::i32), ISD::SETNE);
34333433
}
34343434

34353435
static SDValue performSETCCCombine(SDNode *N,

llvm/test/CodeGen/WebAssembly/memcmp-expand.ll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ define i1 @memcmp_expand_16(ptr %a, ptr %b) {
135135
; CHECK-NEXT: v128.load $push0=, 0($1):p2align=0
136136
; CHECK-NEXT: i8x16.eq $push2=, $pop1, $pop0
137137
; CHECK-NEXT: i8x16.all_true $push3=, $pop2
138-
; CHECK-NEXT: i32.eqz $push4=, $pop3
139-
; CHECK-NEXT: return $pop4
138+
; CHECK-NEXT: return $pop3
140139
%cmp_16 = call i32 @memcmp(ptr %a, ptr %b, i32 16)
141140
%res = icmp eq i32 %cmp_16, 0
142141
ret i1 %res

llvm/test/CodeGen/WebAssembly/simd-setcc.ll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ define i1 @setcc_load(ptr %a, ptr %b) {
1313
; CHECK-NEXT: v128.load $push0=, 0($1):p2align=0
1414
; CHECK-NEXT: i8x16.eq $push2=, $pop1, $pop0
1515
; CHECK-NEXT: i8x16.all_true $push3=, $pop2
16-
; CHECK-NEXT: i32.eqz $push4=, $pop3
17-
; CHECK-NEXT: return $pop4
16+
; CHECK-NEXT: return $pop3
1817
%cmp_16 = call i32 @memcmp(ptr %a, ptr %b, i32 16)
1918
%res = icmp eq i32 %cmp_16, 0
2019
ret i1 %res
@@ -47,8 +46,7 @@ define i1 @setcc_eq_const_i128(ptr %ptr) {
4746
; CHECK-NEXT: v128.const $push1=, 6, 0
4847
; CHECK-NEXT: i8x16.eq $push2=, $pop0, $pop1
4948
; CHECK-NEXT: i8x16.all_true $push3=, $pop2
50-
; CHECK-NEXT: i32.eqz $push4=, $pop3
51-
; CHECK-NEXT: return $pop4
49+
; CHECK-NEXT: return $pop3
5250
%l = load i128, ptr %ptr
5351
%res = icmp eq i128 %l, 6
5452
ret i1 %res

0 commit comments

Comments
 (0)