[llvm] [GISel][CombinerHelper] Push freeze through non-poison-producing operands (PR #90618)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue May 7 13:18:26 PDT 2024
================
@@ -1733,10 +1733,21 @@ static bool canCreateUndefOrPoison(Register Reg, const MachineRegisterInfo &MRI,
UndefPoisonKind Kind) {
MachineInstr *RegDef = MRI.getVRegDef(Reg);
+ if (auto *GMI = dyn_cast<GenericMachineInstr>(RegDef)) {
+ if (ConsiderFlagsAndMetadata && includesPoison(Kind) &&
+ GMI->hasPoisonGeneratingFlags())
+ return true;
+ }
+ // Conservatively return true.
----------------
arsenm wrote:
Weird comment placement, move with the actual case with braces
https://github.com/llvm/llvm-project/pull/90618
More information about the llvm-commits
mailing list