[llvm] [IndVars] Support decrementing counters in LFTR (PR #225619)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 04:11:29 PDT 2026


wangpc-pp wrote:

> I'm generally apprehensive about any extensions to LFTR, because this is a transform that can just as easily be a regression as an improvement, and it does not try particularly hard to distinguish those cases.

But we have supported step +1 now, does  supporting -1 make a big difference?

> 
> It seems like the motivation for this is some kind of backend issue -- in that case, wouldn't it be the responsibility of LSR to deal with it?

Thanks! I can try to optimize it in LSR as well.


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


More information about the llvm-commits mailing list