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

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 20 19:32:06 PDT 2023


LiqinWeng wrote:

> It's not at all clear to me that this is a generally profitable transform. Just based on the test changes here, loopflatten.ll is an obvious regression (loop no longer flattened), while induction.ll also looks like a regression to me.
> 
> This is also a regression on the simple instruction count heuristic, as we go from add+sext+gep to 2_sext+2_gep. Possibly what you want to do is limit this to the case where the RHS of the add is a constant, so the sext folds away?

yse, I have fix it , thanks

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


More information about the llvm-commits mailing list