[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:32:31 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();
----------------
davemgreen wrote:

Perhaps use `Root.mergeFlagsWith(*AddMI);`, clear the NoSWrap/NoUWrap on it they use that in the new instructions?

https://github.com/llvm/llvm-project/pull/90028


More information about the llvm-commits mailing list