[llvm] [PowerPC] Improve pwr7 codegen for v4i8 load (PR #104507)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 29 12:19:06 PDT 2024
================
@@ -11490,13 +11490,38 @@ SDValue PPCTargetLowering::LowerIS_FPCLASS(SDValue Op,
SDValue PPCTargetLowering::LowerSCALAR_TO_VECTOR(SDValue Op,
SelectionDAG &DAG) const {
SDLoc dl(Op);
+
+ MachineFunction &MF = DAG.getMachineFunction();
+ SDValue Op0 = Op.getOperand(0);
+ ReuseLoadInfo RLI;
+ if (Subtarget.hasVSX() && Op.getValueType() == MVT::v4i32 &&
+ Op0.getOpcode() == ISD::LOAD && Op0.getValueType() == MVT::i32 &&
+ Op0.hasOneUse() &&
+ canReuseLoadAddress(Op0, MVT::i32, RLI, DAG, ISD::NON_EXTLOAD)) {
+
----------------
RolandF77 wrote:
Good idea.
https://github.com/llvm/llvm-project/pull/104507
More information about the llvm-commits
mailing list