[llvm] [Mips] Support llvm.readcyclecounter intrinsic (PR #114953)

YunQiang Su via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 19:32:22 PST 2025


================
@@ -2092,6 +2095,47 @@ MachineBasicBlock *MipsTargetLowering::emitAtomicCmpSwapPartword(
   return exitMBB;
 }
 
+SDValue MipsTargetLowering::lowerREADCYCLECOUNTER(SDValue Op,
+                                                  SelectionDAG &DAG) const {
+  SmallVector<SDValue, 3> Results;
+  SDLoc DL(Op);
+  MachineFunction &MF = DAG.getMachineFunction();
+  unsigned RdhwrOpc, DestReg;
+
+  if (!Subtarget.hasMips32r6() &&
----------------
wzssyqa wrote:

r2.

https://github.com/llvm/llvm-project/pull/114953


More information about the llvm-commits mailing list