[llvm] [RISCV] Add custom lowering for fixed-vector `CLMUL`/`CLMULH` (PR #210429)
Sean Clarke via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 20 07:59:48 PDT 2026
================
@@ -1725,6 +1725,20 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
Custom);
}
+ if (VT.getVectorElementType() == MVT::i64) {
+ if (Subtarget.hasStdExtZvbc())
+ setOperationAction({ISD::CLMUL, ISD::CLMULH}, VT, Custom);
+ } else {
+ if (Subtarget.hasStdExtZvbc32e()) {
+ setOperationAction({ISD::CLMUL, ISD::CLMULH}, VT, Custom);
+ } else if (Subtarget.hasStdExtZvbc()) {
+ // Promote to i64 like in the case of scalable vectors.
+ if (useRVVForFixedLengthVectorVT(
+ VT.changeVectorElementType(MVT::i64)))
----------------
xarkenz wrote:
Ok, I think I've changed it to be like what you suggested. Which tests are you looking at, specifically? I haven't been able to find them myself.
https://github.com/llvm/llvm-project/pull/210429
More information about the llvm-commits
mailing list