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

via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 21 22:22:26 PDT 2023


goldsteinn wrote:

> > Please, can you take a bit more care? Your proof is very obviously broken if you just look at the result.
> > Here is a fixed version: https://alive2.llvm.org/ce/z/FSNnoo Note that the `nsw` on the `add` is required for correctness, which you don't check.
> 
> Pls see: https://alive2.llvm.org/ce/z/vkCK92. The transformation only occurs when the second operand of the add is a constant. I will add the `nsw` on the `add`

The proof is only for constant 5. In general you should have no constants and impl any constraints with assume:
https://alive2.llvm.org/ce/z/dgfX5w

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


More information about the llvm-commits mailing list