[llvm] [InstCombine] Canonicalise SextADD + GEP (PR #69581)

Bruno De Fraine via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 13:24:28 PDT 2024


brunodf-snps wrote:

@nikic Thanks! When the geps would retain the inbounds property, the loop flatten pass would indeed succeed:
https://godbolt.org/z/K64q46ah1
I shortly tried your patch with my C loop as input, but did not get it to retain the inbounds, even when the loop variables are `unsigned`. What is a scenario where you expect `isKnownNonNegative` to be derived?

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


More information about the llvm-commits mailing list