[llvm] [Analysis] Use usub_sat during SCEV expansion in some cases (PR #216975)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 18 04:14:19 PDT 2026
david-arm wrote:
> > which simplifies the IR in some tests.
>
> Is simplifying tests the only goal here
Sorry, that's my fault for not making it clearer. The loop vectoriser also uses the generated IR output in the vector.scevcheck block for profitability analysis. For example, it may adjust the minimum trip count threshold required to even enter the scevcheck block based on the cost of doing the checks. By simplifying the expanded SCEV code in line with how it will be optimised by instcombine anyway, it gives the vectoriser a more accurate picture of the cost.
https://github.com/llvm/llvm-project/pull/216975
More information about the llvm-commits
mailing list