[PATCH] D120809: [AArch64][SME] Don't infer -neon from +streaming-sve.
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 2 09:33:24 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGef9816e43c14: [AArch64][SME] Don't infer -neon from +streaming-sve. (authored by sdesmalen).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120809/new/
https://reviews.llvm.org/D120809
Files:
llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
llvm/test/MC/AArch64/SME/streaming-mode-neon-bf16.s
llvm/test/MC/AArch64/SME/streaming-mode-neon-negative.s
llvm/test/MC/AArch64/SME/streaming-mode-neon.s
llvm/test/MC/AArch64/SME/streaming-sve-feature.s
Index: llvm/test/MC/AArch64/SME/streaming-sve-feature.s
===================================================================
--- llvm/test/MC/AArch64/SME/streaming-sve-feature.s
+++ llvm/test/MC/AArch64/SME/streaming-sve-feature.s
@@ -1,5 +1,5 @@
-// RUN: llvm-mc -triple=aarch64 -mattr=+streaming-sve,+neon < %s 2>&1 | FileCheck %s
-// RUN: not llvm-mc -triple=aarch64 -mattr=+streaming-sve < %s 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -mattr=+sme < %s 2>&1 | FileCheck %s
+// RUN: not llvm-mc -triple=aarch64 -mattr=-neon,+sme < %s 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
// Verify NEON is disabled when targeting streaming mode, if it's not
// explicitly requested.
Index: llvm/test/MC/AArch64/SME/streaming-mode-neon.s
===================================================================
--- llvm/test/MC/AArch64/SME/streaming-mode-neon.s
+++ llvm/test/MC/AArch64/SME/streaming-mode-neon.s
@@ -1,13 +1,15 @@
-// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+streaming-sve < %s \
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=-neon,+sme < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=-neon,+streaming-sve < %s \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=-neon < %s 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
-// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+streaming-sve < %s \
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=-neon,+streaming-sve < %s \
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
-// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+streaming-sve < %s \
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=-neon,+streaming-sve < %s \
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
-// RUN: | llvm-mc -triple=aarch64 -mattr=+streaming-sve -disassemble -show-encoding \
+// RUN: | llvm-mc -triple=aarch64 -mattr=-neon,+streaming-sve -disassemble -show-encoding \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// Scalar FP instructions
Index: llvm/test/MC/AArch64/SME/streaming-mode-neon-negative.s
===================================================================
--- llvm/test/MC/AArch64/SME/streaming-mode-neon-negative.s
+++ llvm/test/MC/AArch64/SME/streaming-mode-neon-negative.s
@@ -1,4 +1,4 @@
-// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+streaming-sve,+bf16 2>&1 < %s| FileCheck %s
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=-neon,+sme 2>&1 < %s| FileCheck %s
// ------------------------------------------------------------------------- //
// Check FABD is illegal in streaming mode
Index: llvm/test/MC/AArch64/SME/streaming-mode-neon-bf16.s
===================================================================
--- llvm/test/MC/AArch64/SME/streaming-mode-neon-bf16.s
+++ llvm/test/MC/AArch64/SME/streaming-mode-neon-bf16.s
@@ -1,16 +1,18 @@
-// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+streaming-sve,+bf16 < %s \
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=-neon,+sme < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=-neon,+streaming-sve,+bf16 < %s \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=-neon < %s 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
-// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+streaming-sve,+bf16 < %s \
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=-neon,+streaming-sve,+bf16 < %s \
// RUN: | llvm-objdump --mattr=+bf16 -d - | FileCheck %s --check-prefix=CHECK-INST
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
-// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+streaming-sve,+bf16 < %s \
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=-neon,+streaming-sve,+bf16 < %s \
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
-// RUN: | llvm-mc -triple=aarch64 -mattr=+streaming-sve,+bf16 -disassemble -show-encoding \
+// RUN: | llvm-mc -triple=aarch64 -mattr=-neon,+streaming-sve,+bf16 -disassemble -show-encoding \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
bfcvt h5, s3
// CHECK-INST: bfcvt h5, s3
// CHECK-ENCODING: [0x65,0x40,0x63,0x1e]
-// CHECK-ERROR: instruction requires: bf16
+// CHECK-ERROR: instruction requires: bf16 neon or sme
Index: llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
===================================================================
--- llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
+++ llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
@@ -57,16 +57,7 @@
CPU = "apple-a12";
}
- // Most of the NEON instruction set isn't supported in streaming mode on SME
- // targets, disable NEON unless explicitly requested.
- bool RequestedNEON = FS.contains("neon");
- bool RequestedStreamingSVE = FS.contains("streaming-sve");
- MCSubtargetInfo *STI =
- createAArch64MCSubtargetInfoImpl(TT, CPU, /*TuneCPU*/ CPU, FS);
- if (RequestedStreamingSVE && !RequestedNEON &&
- STI->hasFeature(AArch64::FeatureNEON))
- STI->ToggleFeature(AArch64::FeatureNEON);
- return STI;
+ return createAArch64MCSubtargetInfoImpl(TT, CPU, /*TuneCPU*/ CPU, FS);
}
void AArch64_MC::initLLVMToCVRegMapping(MCRegisterInfo *MRI) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120809.412462.patch
Type: text/x-patch
Size: 5682 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220302/e88a5017/attachment.bin>
More information about the llvm-commits
mailing list