[llvm] [DAGCombiner] Freeze maybe poison operands when folding select to logic (PR #84924)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 04:16:20 PDT 2024
================
@@ -23,11 +23,12 @@ define i32 @a() {
; CHECK-NEXT: li 5, 0
; CHECK-NEXT: mr 30, 3
; CHECK-NEXT: addic 6, 4, 6
-; CHECK-NEXT: addze 5, 5
; CHECK-NEXT: rlwinm 6, 6, 0, 28, 26
-; CHECK-NEXT: andi. 5, 5, 1
+; CHECK-NEXT: addze 5, 5
; CHECK-NEXT: cmplw 1, 6, 4
-; CHECK-NEXT: crorc 20, 1, 4
+; CHECK-NEXT: andi. 5, 5, 1
+; CHECK-NEXT: crnot 20, 4
+; CHECK-NEXT: cror 20, 1, 20
----------------
nikic wrote:
For setcc, it's probably profitable to always push freeze, even if there are multiple operands.
https://github.com/llvm/llvm-project/pull/84924
More information about the llvm-commits
mailing list