[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 03:30:00 PDT 2024
================
@@ -32387,6 +32390,10 @@ SDValue X86TargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const {
case ISD::ADDRSPACECAST: return LowerADDRSPACECAST(Op, DAG);
case X86ISD::CVTPS2PH: return LowerCVTPS2PH(Op, DAG);
case ISD::PREFETCH: return LowerPREFETCH(Op, Subtarget, DAG);
+ case ISD::CLEAR_CACHE: {
+ // X86 instruction cache is coherent with its data cache so this is a no-op.
+ return Op->getOperand(0);
----------------
arsenm wrote:
Just delete the operation should probably be the default expansion. Probably should move this comment to the setOperationAction, and move this implementation to the default expand action
https://github.com/llvm/llvm-project/pull/93795
More information about the llvm-commits
mailing list