[llvm] [GlobalIsel] Combine G_SELECT (PR #74845)
Amara Emerson via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 10 23:43:57 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
----------------
aemerson wrote:
This doesn't look right? if cond = true, tval = 0 then (select cond, tval, 1) evals to 0
now G_OR (cond, tval) would evaluate to 1
https://github.com/llvm/llvm-project/pull/74845
More information about the llvm-commits
mailing list