[llvm] [GlobalIsel] Combine G_SELECT (PR #74845)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 11 01:32:07 PST 2023
================
@@ -253,9 +253,7 @@ body: |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
; CHECK-NEXT: %c:_(s1) = G_TRUNC [[COPY]](s64)
; CHECK-NEXT: %t:_(s1) = G_TRUNC [[COPY1]](s64)
- ; CHECK-NEXT: %one:_(s1) = G_CONSTANT i1 true
- ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s1) = G_XOR %c, %one
- ; CHECK-NEXT: %sel:_(s1) = G_OR [[XOR]], %t
+ ; CHECK-NEXT: %sel:_(s1) = G_OR %c, %t
----------------
tschuett wrote:
The DAGCombiner has a function: foldBoolSelectToLogic.
`select Cond, T, 1 --> or (not Cond), T`
The not (XOR -1) seems to be missing.
https://github.com/llvm/llvm-project/pull/74845
More information about the llvm-commits
mailing list