These should be NOPs so we can just replace with the input. This
matches what SVE does with isel patterns for all permutations.
Custom isel saves us from having to list all permurations for
all LMULs.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | ||
---|---|---|
752 | I'm kind of surprised this works - doesn't ReplaceUses expect the "from" and "to" to have the same type? |
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | ||
---|---|---|
752 | It doesn't check. Here is what tablegen generates for AArch64 /*278776*/ OPC_CompleteMatch, 1, 0,- // Src: (bitconvert:{ *:[nxv2f64] } ZPR:{ *:[nxv8bf16] }:$src) - Complexity = 3 // Dst: ZPR:{ *:[nxv2f64] }:$src CompleteMatch calls ReplaceUses, there's an assert above the call to ReplaceUses in CompleteMatch that checks if the VT matches OR that the type has the same number of bits. |
LGTM.
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | ||
---|---|---|
752 | Thanks: that's the bit I was missing; the fact that at that stage it's no longer purely value-type-focused. |
I'm kind of surprised this works - doesn't ReplaceUses expect the "from" and "to" to have the same type?