[llvm] [RISCV] Use ri.vzip2{a, b} for interleave2 if available (PR #136364)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 22 08:17:03 PDT 2025
================
@@ -11753,6 +11753,17 @@ SDValue RISCVTargetLowering::lowerVECTOR_INTERLEAVE(SDValue Op,
return DAG.getMergeValues(Loads, DL);
}
+ // Use ri.vzip2{a,b} if available
+ // TODO: Figure out the best lowering for the spread variants
+ if (Subtarget.hasVendorXRivosVizip() && !Op.getOperand(0).isUndef() &&
+ !Op.getOperand(1).isUndef()) {
----------------
lukel97 wrote:
> Loosing the zero extend lowering for the spread2 case causes a few of the tests to regress.
I wasn't even aware of the legality issue, I just spotted the poison tests and assumed this was so we don't lose the combine. Happy to look at this in a follow up
https://github.com/llvm/llvm-project/pull/136364
More information about the llvm-commits
mailing list