[llvm] [InstCombine] Rewrite (A + C2) == C -> A == (C - C2) if cmp folds. (PR #222151)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 15 05:52:58 PDT 2026


https://github.com/fhahn commented:


> > is it possible to know if the problems that https://reviews.llvm.org/D58633 discuss is till valid so that the one use check can be removed instead?
> 
> I guess removing the constraint may break some backend passes that partially support pre-increment checks.

I checked and on AArch64 there are some cases where there are some minor regressions (like some extra movs). But in any case, it would probably be good to completely remove the one-use check separately, to have smaller diff/number of changes.



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


More information about the llvm-commits mailing list