[llvm] [RISCV] Promote i8/i16/i32 scalable vector CLMUL to i64 CLMUL with Zvbc. (PR #184265)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 07:26:06 PST 2026


================
@@ -8921,6 +8932,18 @@ SDValue RISCVTargetLowering::LowerOperation(SDValue Op,
       return lowerToScalableOp(Op, DAG);
     assert(Op.getOpcode() != ISD::CTTZ);
     return lowerCTLZ_CTTZ_ZERO_UNDEF(Op, DAG);
+  case ISD::CLMUL: {
+    assert(Op.getValueType().isScalableVector() && Subtarget.hasStdExtZvbc() &&
+           "Unexpected custom legalisation");
+    // Promote to i64 vector.
+    MVT VT = Op.getSimpleValueType();
----------------
topperc wrote:

We're in LowerOperation which is called because of a setOperationAction(Custom). setOperationAction can only be called on MVT.

https://github.com/llvm/llvm-project/pull/184265


More information about the llvm-commits mailing list