Returns true if Reg can create undef or poison from safe operands.
Declared in <llvm/CodeGen/GlobalISel/Utils.h>
bool
canCreateUndefOrPoison(
Register Reg,
MachineRegisterInfo const& MRI,
bool ConsiderFlagsAndMetadata = true);
ConsiderFlagsAndMetadata controls whether poison producing flags and metadata on the instruction are considered. This can be used to see if the instruction could still introduce undef or poison even without poison generating flags and metadata which might be on the instruction.
True if Reg can create undef or poison from safe operands.
| Name | Description |
|---|---|
| Reg | Virtual register whose defining instruction is tested. |
| MRI | Register information for the function. |
| ConsiderFlagsAndMetadata | Whether poison flags/metadata count. |