[llvm] [GlobalIsel] Combine G_SELECT (PR #74116)

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 14:01:56 PST 2023


================
@@ -630,19 +658,14 @@ define i64 @select_noccmp1(i64 %v1, i64 %v2, i64 %v3, i64 %r) {
 ;
 ; GISEL-LABEL: select_noccmp1:
 ; GISEL:       ; %bb.0:
-; GISEL-NEXT:    cmp x0, #0
-; GISEL-NEXT:    cset w8, lt
-; GISEL-NEXT:    cmp x0, #13
-; GISEL-NEXT:    cset w9, gt
-; GISEL-NEXT:    cmp x2, #2
-; GISEL-NEXT:    cset w10, lt
 ; GISEL-NEXT:    cmp x2, #4
-; GISEL-NEXT:    cset w11, gt
-; GISEL-NEXT:    and w8, w8, w9
-; GISEL-NEXT:    and w9, w10, w11
-; GISEL-NEXT:    orr w8, w8, w9
-; GISEL-NEXT:    tst w8, #0x1
-; GISEL-NEXT:    csel x0, xzr, x3, ne
+; GISEL-NEXT:    csel x8, xzr, x3, gt
+; GISEL-NEXT:    cmp x2, #2
+; GISEL-NEXT:    csel x8, x8, x3, lt
+; GISEL-NEXT:    cmp x0, #13
+; GISEL-NEXT:    csel x9, xzr, x8, gt
+; GISEL-NEXT:    cmp x0, #0
+; GISEL-NEXT:    csel x0, x9, x8, lt
----------------
tschuett wrote:

win

https://github.com/llvm/llvm-project/pull/74116


More information about the llvm-commits mailing list