These correspond to ROTL/ROTR nodes
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | ||
---|---|---|
3006 ↗ | (On Diff #541134) | Don't template this, pass the value as an argument. There show be a form of isUInt that takes an argument. |
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | ||
---|---|---|
3006 ↗ | (On Diff #541134) | "show" was supposed to be "should" |
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | ||
---|---|---|
3006 ↗ | (On Diff #541134) | You can make a remplate version of selectVSplatUimm that takes a template parameter and forwards the argument as a non-template parameter. See for example bool selectSExtBits(SDValue N, unsigned Bits, SDValue &Val); template <unsigned Bits> bool selectSExtBits(SDValue N, SDValue &Val) { return selectSExtBits(N, Bits, Val); } Basically I'm trying to avoid the binary bloat from duplicating a function that barely cares about the number of bits. |
llvm/test/CodeGen/RISCV/rvv/vror-sdnode.ll | ||
---|---|---|
86 | I suspect the assembler won't parse this. |
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | ||
---|---|---|
3006 ↗ | (On Diff #541134) | Yeah that's much better, done and will include in the next diff |
llvm/test/CodeGen/RISCV/rvv/vror-sdnode.ll | ||
86 | Your suspicion is correct. The verifier doesn't seem to like 64 - uimm either: *** Bad machine code: Invalid immediate *** - function: vror_vi_rotl_nxv1i8 - basic block: %bb.0 (0x15b0a5970) - instruction: %1:vr = PseudoVROR_VI_MF8 %2:vr(tied-def 0), %0:vr, 63, -1, 3, 3 |
llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td | ||
---|---|---|
204 | Need to pass <uimm6> to VPseudoVALU_VV_VX_VI |
llvm/lib/Target/RISCV/RISCVInstrInfo.td | ||
---|---|---|
455 ↗ | (On Diff #541880) | Out of an abundance of paranoia can you mask this with 0x3f. The original match was for a uimm which would allow 0-63. 0 would be a noop roate. I don't trust that the 0 won't show up since we are on target nodes and don't have DAG combines to clean it up if the 0 appears late. 64 - 0 would be 64 which would be an invalid value for the assembly. Masking 64 to 0 would prevent that from being a problem. |
Mask off immediate
llvm/lib/Target/RISCV/RISCVInstrInfo.td | ||
---|---|---|
455 ↗ | (On Diff #541880) | Good catch, done |
Need to pass <uimm6> to VPseudoVALU_VV_VX_VI