[llvm] [GlobalIsel] Combine G_SELECT (PR #74116)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 1 11:48:24 PST 2023
================
@@ -32,36 +32,18 @@ define i32 @test0(i32 %v0, i32 %v1, i32 %v2) {
; sequences. This case should be transformed to select(C0, select(C1, x, y), y)
; anyway to get CSE effects.
define void @test1(i32 %bitset, i32 %val0, i32 %val1) {
-; SDISEL-LABEL: test1:
-; SDISEL: // %bb.0:
-; SDISEL-NEXT: cmp w0, #7
-; SDISEL-NEXT: adrp x9, out
-; SDISEL-NEXT: csel w8, w1, w2, eq
-; SDISEL-NEXT: cmp w8, #13
-; SDISEL-NEXT: csel w8, w1, w2, lo
-; SDISEL-NEXT: cmp w0, #42
-; SDISEL-NEXT: csel w10, w1, w8, eq
-; SDISEL-NEXT: str w8, [x9, :lo12:out]
-; SDISEL-NEXT: str w10, [x9, :lo12:out]
-; SDISEL-NEXT: ret
-;
-; GISEL-LABEL: test1:
-; GISEL: // %bb.0:
-; GISEL-NEXT: cmp w0, #7
-; GISEL-NEXT: csel w8, w1, w2, eq
-; GISEL-NEXT: cmp w8, #13
-; GISEL-NEXT: cset w8, lo
-; GISEL-NEXT: tst w8, #0x1
-; GISEL-NEXT: csel w9, w1, w2, ne
-; GISEL-NEXT: cmp w0, #42
-; GISEL-NEXT: cset w10, eq
-; GISEL-NEXT: orr w8, w10, w8
-; GISEL-NEXT: tst w8, #0x1
-; GISEL-NEXT: adrp x8, out
-; GISEL-NEXT: csel w10, w1, w2, ne
-; GISEL-NEXT: str w9, [x8, :lo12:out]
-; GISEL-NEXT: str w10, [x8, :lo12:out]
-; GISEL-NEXT: ret
+; CHECK-LABEL: test1:
+; CHECK: // %bb.0:
+; CHECK-NEXT: cmp w0, #7
+; CHECK-NEXT: adrp x9, out
+; CHECK-NEXT: csel w8, w1, w2, eq
+; CHECK-NEXT: cmp w8, #13
+; CHECK-NEXT: csel w8, w1, w2, lo
+; CHECK-NEXT: cmp w0, #42
+; CHECK-NEXT: csel w10, w1, w8, eq
+; CHECK-NEXT: str w8, [x9, :lo12:out]
+; CHECK-NEXT: str w10, [x9, :lo12:out]
+; CHECK-NEXT: ret
----------------
tschuett wrote:
win
https://github.com/llvm/llvm-project/pull/74116
More information about the llvm-commits
mailing list