Skip to content

Commit 3490381

Browse files
committed
[AArch64] Let patterns for NEON instructions check runtime mode.
I've had to change: HasNEON -> IsNeonAvailable (available only in non-streaming mode) HasNEONorSME -> HasNEON (available in either mode) In contrast, the Predicate HasSVE (and related) don't need a similar change because all patterns predicated with HasSVE use scalable vector types, and in AArch64ISelLowering we've already made sure that none of those type and operationss are legal if the function is not in the right mode (if it only has +sme, without +sve).
1 parent f484c79 commit 3490381

File tree

7 files changed

+388
-958
lines changed

7 files changed

+388
-958
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22185,7 +22185,8 @@ static SDValue vectorToScalarBitmask(SDNode *N, SelectionDAG &DAG) {
2218522185
ComparisonResult = DAG.getSExtOrTrunc(ComparisonResult, DL, VecVT);
2218622186

2218722187
SmallVector<SDValue, 16> MaskConstants;
22188-
if (VecVT == MVT::v16i8) {
22188+
if (DAG.getSubtarget<AArch64Subtarget>().isNeonAvailable() &&
22189+
VecVT == MVT::v16i8) {
2218922190
// v16i8 is a special case, as we have 16 entries but only 8 positional bits
2219022191
// per entry. We split it into two halves, apply the mask, zip the halves to
2219122192
// create 8x 16-bit values, and the perform the vector reduce.

llvm/lib/Target/AArch64/AArch64InstrFormats.td

Lines changed: 57 additions & 57 deletions
Large diffs are not rendered by default.

llvm/lib/Target/AArch64/AArch64InstrInfo.td

Lines changed: 48 additions & 50 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-masked-load.ll

Lines changed: 107 additions & 315 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-masked-store.ll

Lines changed: 174 additions & 387 deletions
Large diffs are not rendered by default.

llvm/test/MC/AArch64/SME/streaming-mode-neon-bf16.s

Lines changed: 0 additions & 16 deletions
This file was deleted.

llvm/test/MC/AArch64/SME/streaming-mode-neon.s

Lines changed: 0 additions & 132 deletions
This file was deleted.

0 commit comments

Comments
 (0)