[llvm] [RISCV] Provide a more efficient lowering for experimental.cttz.elts. (PR #88552)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 08:36:24 PDT 2024
================
@@ -12336,6 +12370,11 @@ void RISCVTargetLowering::ReplaceNodeResults(SDNode *N,
Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, Res));
return;
}
+ case Intrinsic::experimental_cttz_elts: {
+ SDValue Res = lowerCttzElts(N, DAG, Subtarget);
+ Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, Res));
----------------
topperc wrote:
This is called by type legalization. It needs to return the original type so that it can plug in to the original users that haven't been legalized yet. Looking at it again, it should probably be N->getValuetype(0). I think we just lack test coverage for return types other than i32.
https://github.com/llvm/llvm-project/pull/88552
More information about the llvm-commits
mailing list