[all-commits] [llvm/llvm-project] 62bd94: [SCEV] Use fact that B >u 0 for A <u B in applyLoo...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Wed Feb 1 08:51:44 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 62bd944e42472b7aa01fe6f662d848d76a96b8f8
https://github.com/llvm/llvm-project/commit/62bd944e42472b7aa01fe6f662d848d76a96b8f8
Author: Florian Hahn <flo at fhahn.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
M llvm/lib/Analysis/ScalarEvolution.cpp
M llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll
Log Message:
-----------
[SCEV] Use fact that B >u 0 for A <u B in applyLoopGuards.
If LHS <u RHS holds, RHS should be guaranteed to be > 0. By using
using 'umax(RHS, 1) -1' instead of 'RHS - 1' the results in
applyLoopGuards can be improved in some cases.
Note that the TODO for the tests mentioned the max BTC being 11, but
unless I am missing something 10 should be correct.
https://alive2.llvm.org/ce/z/44nP7F
Reviewed By: mkazantsev
Differential Revision: https://reviews.llvm.org/D126503
More information about the All-commits
mailing list