diff options
author | Craig Topper <craig.topper@sifive.com> | 2023-04-12 16:11:03 -0700 |
---|---|---|
committer | Craig Topper <craig.topper@sifive.com> | 2023-04-12 16:17:58 -0700 |
commit | 4b47d875a1f9083ed788dac32bde45364afb8668 (patch) | |
tree | 47d1f2729d214bf26854346cfb4053c8d80261ab /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | 2326480f378f1dd0168dc64824b0c179cebb5bec (diff) | |
download | llvm-4b47d875a1f9083ed788dac32bde45364afb8668.zip llvm-4b47d875a1f9083ed788dac32bde45364afb8668.tar.gz llvm-4b47d875a1f9083ed788dac32bde45364afb8668.tar.bz2 |
[LV] Optimize trip count SCEV.
To calculate the trip count we need to add 1 to the backedge
taken count. If we need to widen the backedge count, it's better
to do the add before the widening if we can guarantee it won't
overflow.
The code here is based on similar code I found in
LoopIdiomRecognize.
This is the vectorizer version of this InstCombine patch D142783.
Looking at the IR diffs, this does look like it gets more cases
than the InstCombine patch.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D147355
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions