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

YunQiang Su via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 4 23:25:11 PST 2025


================
@@ -2092,6 +2095,43 @@ MachineBasicBlock *MipsTargetLowering::emitAtomicCmpSwapPartword(
   return exitMBB;
 }
 
+SDValue MipsTargetLowering::lowerREADCYCLECOUNTER(SDValue Op,
+                                                  SelectionDAG &DAG) const {
+  SmallVector<SDValue, 3> Results;
----------------
wzssyqa wrote:

We should only support it for mips32r2+ or linux triples.
I mean you should check if it is mips32r2+ or the os section of triple is Linux.

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


More information about the llvm-commits mailing list