Skip to content

Commit 915e9e7

Browse files
committed
[llvm][sve] Lowering for VLS masked extending loads
This extends the custom lowering for extending loads on fixed length vectors in SVE to support masked extending loads. The existing tests for correct behaviour of masked extending loads exhibit bad code generation due to the legalistaion of i1 vectors. They have been left as-is and new tests have been added that do not exhibit this behaviour. Differential Revision: https://reviews.llvm.org/D108200
1 parent d86a947 commit 915e9e7

File tree

3 files changed

+278
-120
lines changed

3 files changed

+278
-120
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10876,7 +10876,7 @@ static SDValue tryToFoldExtOfMaskedLoad(SelectionDAG &DAG,
1087610876
if (!Ld || Ld->getExtensionType() != ISD::NON_EXTLOAD)
1087710877
return SDValue();
1087810878

10879-
if (!TLI.isLoadExtLegal(ExtLoadType, VT, Ld->getValueType(0)))
10879+
if (!TLI.isLoadExtLegalOrCustom(ExtLoadType, VT, Ld->getValueType(0)))
1088010880
return SDValue();
1088110881

1088210882
if (!TLI.isVectorLoadExtDesirable(SDValue(N, 0)))

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18163,9 +18163,6 @@ SDValue AArch64TargetLowering::LowerFixedLengthVectorMLoadToSVE(
1816318163
SDValue Op, SelectionDAG &DAG) const {
1816418164
auto Load = cast<MaskedLoadSDNode>(Op);
1816518165

18166-
if (Load->getExtensionType() != ISD::LoadExtType::NON_EXTLOAD)
18167-
return SDValue();
18168-
1816918166
SDLoc DL(Op);
1817018167
EVT VT = Op.getValueType();
1817118168
EVT ContainerVT = getContainerForFixedLengthVector(DAG, VT);

0 commit comments

Comments
 (0)