[llvm] [SelectionDAG] Add an ISD::CLEAR_CACHE node to lower llvm.clear_cache (PR #93795)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 04:28:54 PDT 2024
================
@@ -7516,11 +7516,18 @@ void SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I,
case Intrinsic::invariant_end:
// Discard region information.
return;
- case Intrinsic::clear_cache:
- /// FunctionName may be null.
- if (const char *FunctionName = TLI.getClearCacheBuiltinName())
- lowerCallToExternalSymbol(I, FunctionName);
+ case Intrinsic::clear_cache: {
+ SDValue InputChain = DAG.getRoot();
+ Value *Start = I.getArgOperand(0);
+ SDValue StartVal = getValue(Start);
+ Value *End = I.getArgOperand(1);
+ SDValue EndVal = getValue(End);
----------------
arsenm wrote:
Avoid the temporary Value variable? StartVal = getValue(getArgOperand())
https://github.com/llvm/llvm-project/pull/93795
More information about the llvm-commits
mailing list