[llvm] [GlobalIsel] Import GEP flags (PR #93850)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 11:22:52 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;
----------------
s-barannikov wrote:
I've read the RFC and I got an impression that nsw and nusw are different.
CC @nikic
https://github.com/llvm/llvm-project/pull/93850
More information about the llvm-commits
mailing list