@@ -1445,9 +1445,6 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM,
14451445 setLoadExtAction(ISD::EXTLOAD, MVT::v2i64, MVT::v2i16, Custom);
14461446 setLoadExtAction(ISD::SEXTLOAD, MVT::v2i64, MVT::v2i16, Custom);
14471447 setLoadExtAction(ISD::ZEXTLOAD, MVT::v2i64, MVT::v2i16, Custom);
1448- setLoadExtAction(ISD::EXTLOAD, MVT::v4i32, MVT::v4i16, Custom);
1449- setLoadExtAction(ISD::SEXTLOAD, MVT::v4i32, MVT::v4i16, Custom);
1450- setLoadExtAction(ISD::ZEXTLOAD, MVT::v4i32, MVT::v4i16, Custom);
14511448
14521449 // ADDP custom lowering
14531450 for (MVT VT : { MVT::v32i8, MVT::v16i16, MVT::v8i32, MVT::v4i64 })
@@ -6752,8 +6749,7 @@ static bool isEligibleForSmallVectorLoadOpt(LoadSDNode *LD,
67526749 return false;
67536750
67546751 EVT MemVT = LD->getMemoryVT();
6755- if (MemVT != MVT::v2i8 && MemVT != MVT::v4i8 && MemVT != MVT::v2i16 &&
6756- MemVT != MVT::v4i16)
6752+ if (MemVT != MVT::v2i8 && MemVT != MVT::v4i8 && MemVT != MVT::v2i16)
67576753 return false;
67586754
67596755 Align Alignment = LD->getAlign();
@@ -7232,8 +7228,7 @@ SDValue AArch64TargetLowering::LowerStore128(SDValue Op,
72327228
72337229/// Helper function to optimize loads of extended small vectors.
72347230/// These patterns would otherwise get scalarized into inefficient sequences.
7235- static SDValue performSmallVectorLoadExtCombine(LoadSDNode *Load,
7236- SelectionDAG &DAG) {
7231+ static SDValue tryLowerSmallVectorExtLoad(LoadSDNode *Load, SelectionDAG &DAG) {
72377232 const AArch64Subtarget &Subtarget = DAG.getSubtarget<AArch64Subtarget>();
72387233 if (!isEligibleForSmallVectorLoadOpt(Load, Subtarget))
72397234 return SDValue();
@@ -7308,10 +7303,8 @@ SDValue AArch64TargetLowering::LowerLOAD(SDValue Op,
73087303 LoadSDNode *LoadNode = cast<LoadSDNode>(Op);
73097304 assert(LoadNode && "Expected custom lowering of a load node");
73107305
7311- if (LoadNode->getExtensionType() != ISD::NON_EXTLOAD) {
7312- if (SDValue Result = performSmallVectorLoadExtCombine(LoadNode, DAG))
7313- return Result;
7314- }
7306+ if (SDValue Result = tryLowerSmallVectorExtLoad(LoadNode, DAG))
7307+ return Result;
73157308
73167309 if (LoadNode->getMemoryVT() == MVT::i64x8) {
73177310 SmallVector<SDValue, 8> Ops;
0 commit comments