aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Frontend/CompilerInvocationTest.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2021-09-03 09:05:15 -0700
committerCraig Topper <craig.topper@sifive.com>2021-09-03 09:19:25 -0700
commit75620fadf5c391b6450eb658dea6194167f522f7 (patch)
treefa32fbd982ee2ab05dbc8cdc63714d33b07e4df9 /clang/unittests/Frontend/CompilerInvocationTest.cpp
parent5ee5bbd0ffe162e604e75718fed987545c366359 (diff)
downloadllvm-75620fadf5c391b6450eb658dea6194167f522f7.zip
llvm-75620fadf5c391b6450eb658dea6194167f522f7.tar.gz
llvm-75620fadf5c391b6450eb658dea6194167f522f7.tar.bz2
[RISCV] Change how we encode AVL operands in vector pseudoinstructions to use GPRNoX0.
This patch changes the register class to avoid accidentally setting the AVL operand to X0 through MachineIR optimizations. There are cases where we really want to use X0, but we can't get that past the MachineVerifier with the register class as GPRNoX0. So I've use a 64-bit -1 as a sentinel for X0. All other immediate values should be uimm5. I convert it to X0 at the earliest possible point in the VSETVLI insertion pass to avoid touching the rest of the algorithm. In SelectionDAG lowering I'm using a -1 TargetConstant to hide it from instruction selection and treat it differently than if the user used -1. A user -1 should be selected to a register since it doesn't fit in uimm5. This is the rest of the changes started in D109110. As mentioned there, I don't have a failing test from MachineIR optimizations anymore. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D109116
Diffstat (limited to 'clang/unittests/Frontend/CompilerInvocationTest.cpp')
0 files changed, 0 insertions, 0 deletions