[llvm] [GlobalIsel] Import GEP flags (PR #93850)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 11:34:03 PDT 2024
================
@@ -576,6 +576,11 @@ uint32_t MachineInstr::copyFlagsFromInstruction(const Instruction &I) {
MIFlags |= MachineInstr::MIFlag::NoSWrap;
if (TI->hasNoUnsignedWrap())
MIFlags |= MachineInstr::MIFlag::NoUWrap;
+ } else if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I)) {
+ if (GEP->hasNoUnsignedSignedWrap())
+ MIFlags |= MachineInstr::MIFlag::NoSWrap;
----------------
tschuett wrote:
The comment reads:
/// Determine whether the GEP has the nusw flag.
https://github.com/llvm/llvm-project/pull/93850
More information about the llvm-commits
mailing list