[llvm] [RISCV][GlobalISel] Add G_CLMULH support (PR #221686)
Jian Li via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 7 19:09:45 PDT 2026
================
@@ -845,6 +849,11 @@ bool RISCVLegalizerInfo::legalizeIntrinsic(LegalizerHelper &Helper,
switch (IntrinsicID) {
default:
return false;
+ case Intrinsic::riscv_clmulh:
+ Helper.MIRBuilder.buildInstr(TargetOpcode::G_CLMULH, {MI.getOperand(0)},
----------------
janearthur wrote:
Thanks for the review. This patch follows the rationale in #178092 and preserves llvm.riscv.clmulh to ensure reliable instruction selection at -O0. It lowers the intrinsic directly to G_CLMULH.
https://github.com/llvm/llvm-project/pull/221686
More information about the llvm-commits
mailing list