[llvm] [GlobalISel] Make the Combiner insert G_FREEZE when converting G_SELECT to binary operations. (PR #82733)

Owen Anderson via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 14:34:56 PST 2024


================
@@ -6523,7 +6525,9 @@ bool CombinerHelper::tryFoldBoolSelectToLogic(GSelect *Select,
       B.setInstrAndDebugLoc(*Select);
       Register Ext = MRI.createGenericVirtualRegister(TrueTy);
       B.buildZExtOrTrunc(Ext, Cond);
-      B.buildAnd(DstReg, Ext, True);
+      Register FreezeTrue = MRI.createGenericVirtualRegister(TrueTy);
+      B.buildFreeze(FreezeTrue, True);
----------------
resistor wrote:

Done

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


More information about the llvm-commits mailing list