[llvm] [InstCombine] Preserve the nsw flag for (X | Op01C) + Op1C --> X + (Op01C + Op1C) (PR #94586)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 6 02:08:34 PDT 2024
https://github.com/nikic requested changes to this pull request.
Your proof is not for the transform you actually implement. The transform is still incorrect in general, you merely picked out one example where it is correct. I have already shared what you need to do to make it correct in my second comment. The necessary pre-condition can be implemented using the willNotOverflowSignedAdd helper.
https://github.com/llvm/llvm-project/pull/94586
More information about the llvm-commits
mailing list