[clang] [llvm] [InstCombine] Infer nuw for gep inbounds from base of object (PR #119225)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 07:23:20 PST 2024


nikic wrote:

@fmayer The `withoutNoUnsignedSignedWrap()` API already removed the inbounds flag as well (because inbounds requires nusw). So I think the effect of your change is to drop inbounds in case all indices are negative, which should generally not be necessary.

It's pretty likely that the root cause here is indeed incorrect inbounds preservation somewhere, but I think the logic in that transform is correct.

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


More information about the llvm-commits mailing list