[llvm] [Mips] Add lowerConstantFP to optimize some floating load instrs to mtc1+mthc1 (PR #196226)
YunQiang Su via llvm-commits
llvm-commits at lists.llvm.org
Mon May 11 19:53:35 PDT 2026
================
@@ -2043,6 +2048,43 @@ MachineBasicBlock *MipsTargetLowering::emitAtomicCmpSwapPartword(
return exitMBB;
}
+SDValue MipsTargetLowering::lowerConstantFP(SDValue Op,
+ SelectionDAG &DAG) const {
+ EVT VT = Op.getValueType();
+ ConstantFPSDNode *CFP = cast<ConstantFPSDNode>(Op);
+ const APFloat &FPVal = CFP->getValueAPF();
+
+ if (!isPositionIndependent())
----------------
wzssyqa wrote:
why not suite for non-PIC code?
https://github.com/llvm/llvm-project/pull/196226
More information about the llvm-commits
mailing list