[all-commits] [llvm/llvm-project] ece66d: [SelectionDAG] Add computeKnownBits support for IS...
Luke Lau via All-commits
all-commits at lists.llvm.org
Wed Feb 7 18:05:07 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ece66dbc60971cf43a96f63e05c5a507feae3854
https://github.com/llvm/llvm-project/commit/ece66dbc60971cf43a96f63e05c5a507feae3854
Author: Luke Lau <luke at igalia.com>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
M llvm/test/CodeGen/RISCV/rvv/stepvector.ll
Log Message:
-----------
[SelectionDAG] Add computeKnownBits support for ISD::STEP_VECTOR (#80452)
This handles two cases where we can work out some known-zero bits for
ISD::STEP_VECTOR.
The first case handles when we know the low bits are zero because the
step
amount is a power of two. This is taken from
https://reviews.llvm.org/D128159,
and even though the original patch didn't end up landing this case due
to it
not having any test difference, I've included it here for completeness's
sake.
The second case handles the case when we have an upper bound on
vscale_range.
We can use this to work out the upper bound on the number of elements,
and thus
what the maximum step will be. From the maximum step we then know which
hi bits
are zero.
On its own, computing the known hi bits results in some small
improvements for
RVV with -mrvv-vector-bits=zvl across the llvm-test-suite. However I'm
hoping
to be able to use this later to reduce the LMUL in index calculations
for
vrgather/indexed accesses.
---------
Co-authored-by: Philip Reames <preames at rivosinc.com>
More information about the All-commits
mailing list