aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/CodeGen/MachineInstrTest.cpp
diff options
context:
space:
mode:
authorDavid Sherwood <david.sherwood@arm.com>2023-03-15 14:25:21 +0000
committerDavid Sherwood <david.sherwood@arm.com>2023-03-27 08:34:30 +0000
commit1c4fedfa35aeb8b456e2d8f4f826c0e026b9d863 (patch)
tree0a54815f2219acb7e023d3f9f1b059948dc3e07c /llvm/unittests/CodeGen/MachineInstrTest.cpp
parent8d3a09daca7d56e38b205437297cc357f2b4cab0 (diff)
downloadllvm-1c4fedfa35aeb8b456e2d8f4f826c0e026b9d863.zip
llvm-1c4fedfa35aeb8b456e2d8f4f826c0e026b9d863.tar.gz
llvm-1c4fedfa35aeb8b456e2d8f4f826c0e026b9d863.tar.bz2
[LoopVectorize] Don't tail-fold for scalable VFs when there is no scalar tail
Currently in LoopVectorize we avoid tail-folding if we can prove the trip count is always a multiple of the maximum fixed-width VF. This works because we know the vectoriser only ever chooses a VF that is a power of 2. However, if we are also considering scalable VFs then we conservatively bail out of the optimisation because we don't know the value of vscale, which could be an odd or prime number, etc. This patch tries to enable the same optimisation for scalable VFs by asking if vscale is known to be a power of 2. If so, we can then query the maximum value of vscale and use the same logic as we do for fixed-width VFs. I've also added a new TTI hook called isVScaleKnownToBeAPowerOfTwo that does the same thing as the existing TargetLowering hook. Differential Revision: https://reviews.llvm.org/D146199
Diffstat (limited to 'llvm/unittests/CodeGen/MachineInstrTest.cpp')
0 files changed, 0 insertions, 0 deletions