[llvm] [GlobalIsel] Combine G_SELECT (PR #74116)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 1 14:04:14 PST 2023
================
@@ -1155,21 +1345,18 @@ define i32 @multiccmp2(i32 %s0, i32 %s1, i32 %s2, i32 %s3, i32 %x, i32 %y) #0 {
; GISEL-NEXT: stp x20, x19, [sp, #16] ; 16-byte Folded Spill
; GISEL-NEXT: stp x29, x30, [sp, #32] ; 16-byte Folded Spill
; GISEL-NEXT: mov x19, x0
-; GISEL-NEXT: mov x20, x3
-; GISEL-NEXT: mov x21, x5
-; GISEL-NEXT: cmp w0, w1
-; GISEL-NEXT: cset w8, gt
+; GISEL-NEXT: mov x20, x2
+; GISEL-NEXT: mov x21, x3
+; GISEL-NEXT: mov x22, x5
; GISEL-NEXT: cmp w2, w3
-; GISEL-NEXT: cset w22, ne
-; GISEL-NEXT: and w8, w8, w22
-; GISEL-NEXT: tst w8, #0x1
-; GISEL-NEXT: csel w0, w5, w4, ne
+; GISEL-NEXT: csel w8, w5, w4, ne
+; GISEL-NEXT: cmp w0, w1
+; GISEL-NEXT: csel w0, w8, w4, gt
; GISEL-NEXT: bl _callee
-; GISEL-NEXT: cmp w19, w20
-; GISEL-NEXT: cset w8, eq
-; GISEL-NEXT: and w8, w22, w8
-; GISEL-NEXT: tst w8, #0x1
-; GISEL-NEXT: csel w0, w0, w21, ne
+; GISEL-NEXT: cmp w19, w21
+; GISEL-NEXT: csel w8, w0, w22, eq
+; GISEL-NEXT: cmp w20, w21
+; GISEL-NEXT: csel w0, w8, w22, ne
----------------
tschuett wrote:
win
https://github.com/llvm/llvm-project/pull/74116
More information about the llvm-commits
mailing list