This patch adds tests for directives .arch, .arch_extension and .cpu for
all features defined in Arm SVE2 architecture extension.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
test/MC/AArch64/SVE2/directive-arch-negative.s | ||
---|---|---|
3 ↗ | (On Diff #201937) | Just removing the +nosve2 part would still make the test pass. It looks to me that -mattr=+sve2 should be added to the command lime and the test split in five separate files, or otherwise reset arch between test cases. |
test/MC/AArch64/SVE2/directive-arch_extension-negative.s | ||
3 ↗ | (On Diff #201937) | Likewise here, removing .arch_extension nosve2 (resp. adding it) has no effect on the test outcome. |
test/MC/AArch64/SVE2/directive-arch-negative.s | ||
---|---|---|
3 ↗ | (On Diff #201937) | Fair point, I don't think separate tests in general for .arch/.arch_extension/.cpu etc scales very well and -mattr=+sve2 doesn't enable all SVE2 extensions, so I think enabling/disabling arch between tests cases makes most sense, e.g.: .arch armv8-a+sve2 .arch armv8-a+nosve2 tbx z0.b, z1.b, z2.b // CHECK: error: instruction requires: sve2 // CHECK-NEXT: tbx z0.b, z1.b, z2.b .arch armv8-a+sve2-aes .arch armv8-a+nosve2-aes aesd z23.b, z23.b, z13.b // CHECK: error: instruction requires: sve2-aes // CHECK-NEXT: aesd z23.b, z23.b, z13.b |
test/MC/AArch64/SVE2/directive-arch_extension-negative.s | ||
3 ↗ | (On Diff #201937) | I can take the same approach as above if you think that makes sense |
test/MC/AArch64/SVE2/directive-arch-negative.s | ||
---|---|---|
3 ↗ | (On Diff #201937) | IMHO, removing an arch extension can only be tested if the architecture included the extension by default. The approaches above work due to a bug (https://bugs.llvm.org/show_bug.cgi?id=32873), but I guess that's |
Addressed Momchil's comments: explicitly enable/disable arch features in negative directive tests.