[llvm] [RISCV] Split f64 loads/stores for RV32+Zdinx during isel instead of post-RA. (PR #139840)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed May 14 08:00:59 PDT 2025
================
@@ -7705,19 +7710,42 @@ SDValue RISCVTargetLowering::LowerOperation(SDValue Op,
}
case ISD::LOAD: {
auto *Load = cast<LoadSDNode>(Op);
- EVT VecTy = Load->getMemoryVT();
+ EVT VT = Load->getValueType(0);
+ if (VT == MVT::f64) {
+ assert(Subtarget.hasStdExtZdinx() && !Subtarget.is64Bit() &&
+ "Unexpected custom legalisation");
+
+ // Replace a double precision load with two i32 loads and a BuildPairF64.
+ SDLoc DL(Op);
+ SDValue BasePtr = Load->getBasePtr();
+ SDValue Chain = Load->getChain();
+
+ SDValue Lo = DAG.getLoad(MVT::i32, DL, Chain, BasePtr,
+ Load->getPointerInfo(), Load->getOriginalAlign(),
----------------
preames wrote:
I believe that PointerInfo includes the size of the access? If so, this needs to have a adjusted size to be correct.
https://github.com/llvm/llvm-project/pull/139840
More information about the llvm-commits
mailing list