[llvm] [RISCV] Initial support for EarlyCSE (PR #138812)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue May 27 03:12:15 PDT 2025
================
@@ -116,6 +117,50 @@ RISCVTTIImpl::getRISCVInstructionCost(ArrayRef<unsigned> OpCodes, MVT VT,
return Cost;
}
+Value *
+RISCVTTIImpl::getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst,
+ Type *ExpectedType) const {
+ Intrinsic::ID IID = Inst->getIntrinsicID();
+ switch (IID) {
+ default:
+ return nullptr;
+ // TODO: Add more memory intrinsic operations.
+ case Intrinsic::riscv_vle: {
+ if (Inst->getType() == ExpectedType)
+ return Inst;
+ }
+ return nullptr;
----------------
lukel97 wrote:
Should this return be moved up into the braces above?
https://github.com/llvm/llvm-project/pull/138812
More information about the llvm-commits
mailing list