aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2024-07-08 16:10:25 -0700
committerGitHub <noreply@github.com>2024-07-08 16:10:25 -0700
commitc95935789da9349c470ce75203af93624360b2b6 (patch)
treec68cb625c2e9626a206b0051af1e8541dfd16335 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parenta004e50b9e6880850b54e672bba9f650ed716910 (diff)
downloadllvm-c95935789da9349c470ce75203af93624360b2b6.zip
llvm-c95935789da9349c470ce75203af93624360b2b6.tar.gz
llvm-c95935789da9349c470ce75203af93624360b2b6.tar.bz2
[RISCV] Directly use pack* in build_vector lowering (#98084)
In 03d4332, we extended build_vector lowering to pack elements into the largest size which doesn't exceed either ELEN or XLEN. The zbkb extension - ratified under scalar crypto, but otherwise not really connected to crypto per se - adds the packh, packw, and pack instructions. These instructions are designed for exactly this pairwise packing. I ended up choosing to directly lower to machine nodes. A combination of the slightly non-uniform semantics of these instructions (packw *sign* extends the result, whereas packh *zero* extends it), and our generic dag canonicalization (which sinks shl through or nodes), make pattern matching these tricky and not particularly robust. Another alternative was to have an ISD node for them, but that didn't seem to add much in practice.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions