[llvm] [GlobalIsel] Combine freeze (PR #93239)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Sat May 25 08:29:57 PDT 2024
================
@@ -1745,18 +1778,55 @@ 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;
- } else {
- // Conservatively return true.
- return true;
- }
----------------
tschuett wrote:
ValueTracking writes it as follows:
```
if (ConsiderFlagsAndMetadata && includesPoison(Kind) &&
Op->hasPoisonGeneratingAnnotations())
return true;
```
The question is how to handle non `GenericMachineInstr`.
https://github.com/llvm/llvm-project/pull/93239
More information about the llvm-commits
mailing list