[llvm] [SeparateConstOffsetFromGEP] Avoid miscompiles related to trunc nuw/nsw (PR #154582)

Fabian Ritter via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 21 05:32:57 PDT 2025


https://github.com/ritter-x2a approved this pull request.

LGTM. Even though this doesn't fix all the problems with distributing trunc in this pass ([see an example here](https://github.com/llvm/llvm-project/issues/154116#issuecomment-3210145844)), I think this improves the current state.
I agree that it's fine that the flags are only dropped after the `allowsPreservingNUW` check.

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


More information about the llvm-commits mailing list