[llvm] [GlobalIsel] Combine freeze (PR #93239)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Sat May 25 23:43:07 PDT 2024
================
@@ -265,11 +265,13 @@ bool CombinerHelper::matchFreezeOfSingleMaybePoisonOperand(
}
}
+ Observer.changingInstr(*OrigDef);
cast<GenericMachineInstr>(OrigDef)->dropPoisonGeneratingFlags();
+ Observer.changedInstr(*OrigDef);
// Eliminate freeze if all operands are guaranteed non-poison.
if (!MaybePoisonOperand) {
- MatchInfo = [=](MachineIRBuilder &B) { MRI.replaceRegWith(DstOp, OrigOp); };
+ MatchInfo = [=](MachineIRBuilder &B) { B.buildCopy(DstOp, OrigOp); };
----------------
tschuett wrote:
It is reachable.
https://github.com/llvm/llvm-project/pull/93239
More information about the llvm-commits
mailing list