[all-commits] [llvm/llvm-project] 28cb50: [TargetLowering][RISCV] Allow truncation when chec...
Craig Topper via All-commits
all-commits at lists.llvm.org
Mon Apr 11 09:50:36 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 28cb508195be1b005a7e1cb53a75bff0dd4c3bcb
https://github.com/llvm/llvm-project/commit/28cb508195be1b005a7e1cb53a75bff0dd4c3bcb
Author: Craig Topper <craig.topper at sifive.com>
Date: 2022-04-11 (Mon, 11 Apr 2022)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
M llvm/test/CodeGen/RISCV/rvv/cttz-sdnode.ll
Log Message:
-----------
[TargetLowering][RISCV] Allow truncation when checking if the arguments of a setcc are splats.
We're just trying to canonicalize here and won't be using the constant
value returned.
The attached test changes are because we were previously commuting
a seteq X, (splat_vector 0) because we also have (sub 0, X). The
0 is larger than the element type so we don't detect it as a splat
without the AllowTruncation flag. By preventing the commute we are
able to match it to the vmseq.vx instruction during isel. We only
look for constants on the RHS in isel.
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D123256
More information about the All-commits
mailing list