diff options
author | Philipp Tomsich <philipp.tomsich@vrull.eu> | 2021-03-15 11:31:05 -0700 |
---|---|---|
committer | Craig Topper <craig.topper@sifive.com> | 2021-03-15 11:32:43 -0700 |
commit | 018e96f71ff2d1617aff1ed1abd9c8ad61faf87d (patch) | |
tree | 4a46dd8f51cb5a0f4d85ca149216f1f4214d8eb8 /llvm/lib/CodeGen/BasicBlockSections.cpp | |
parent | 3f170eb197906c2a793e62b54870296a4f5d722a (diff) | |
download | llvm-018e96f71ff2d1617aff1ed1abd9c8ad61faf87d.zip llvm-018e96f71ff2d1617aff1ed1abd9c8ad61faf87d.tar.gz llvm-018e96f71ff2d1617aff1ed1abd9c8ad61faf87d.tar.bz2 |
[RISCV] Add isel-patterns to optimize (a < 1) into blez (a <= 0)
The following code-sequence showed up in a testcase (isolated from
SPEC2017) for if-conversion and vectorization when searching for the
maximum in an array:
addi a2, zero, 1
blt a1, a2, .LBB0_5
which can be expressed as `bge zero,a1,.LBB0_5`/`blez a1,/LBB0_5`.
More generally, we want to express (a < 1) as (a <= 0).
This adds the required isel-pattern and updates the testcases.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D98449
Diffstat (limited to 'llvm/lib/CodeGen/BasicBlockSections.cpp')
0 files changed, 0 insertions, 0 deletions