[llvm] [AArch64] Drop poison-generating flags in `genSubAdd2SubSub` combiner (PR #90028)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 25 02:30:42 PDT 2024
================
@@ -6924,14 +6924,22 @@ genSubAdd2SubSub(MachineFunction &MF, MachineRegisterInfo &MRI,
assert((Opcode == AArch64::SUBWrr || Opcode == AArch64::SUBXrr) &&
"Unexpected instruction opcode.");
+ uint32_t RootFlags = Root.getFlags();
+ if (RootFlags & MachineInstr::NoSWrap)
+ Root.clearFlag(MachineInstr::NoSWrap);
----------------
davemgreen wrote:
I think this can just call clearFlag, and it will clear it if it is present.
https://github.com/llvm/llvm-project/pull/90028
More information about the llvm-commits
mailing list