Skip to content

Commit

Permalink
[NFC] Fixup comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SpencerAbson committed Nov 14, 2024
1 parent c3dae8e commit 7233c93
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
9 changes: 5 additions & 4 deletions llvm/lib/TargetParser/AArch64TargetParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,11 @@ void AArch64::ExtensionSet::disable(ArchExtKind E) {
disable(AEK_SM4);
}

// sve2-aes was historically associated with both FEAT_SVE2 and FEAT_SVE_AES, the latter
// is now associated with sve-aes and sve2-aes has become shorthand for +sve2+sve-aes.
// For backwards compatibility, when we disable sve2-aes we must also disable sve-aes.
if(E == AEK_SVE2AES)
// sve2-aes was historically associated with both FEAT_SVE2 and FEAT_SVE_AES,
// the latter is now associated with sve-aes and sve2-aes has become shorthand
// for +sve2+sve-aes. For backwards compatibility, when we disable sve2-aes we
// must also disable sve-aes.
if (E == AEK_SVE2AES)
disable(AEK_SVEAES);

if (!Enabled.test(E))
Expand Down
1 change: 1 addition & 0 deletions llvm/test/MC/AArch64/SVE2/directive-arch-negative.s
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ aesd z23.b, z23.b, z13.b
// CHECK: error: instruction requires: sve-aes
// CHECK-NEXT: aesd z23.b, z23.b, z13.b

// nosve2-aes should disable sve-aes but not sve2.
.arch armv9-a+sve2-aes+nosve2-aes
aesd z23.b, z23.b, z13.b
// CHECK: error: instruction requires: sve-aes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ aesd z23.b, z23.b, z13.b
// CHECK: error: instruction requires: sve2 sve-aes
// CHECK-NEXT: aesd z23.b, z23.b, z13.b

// nosve2-aes should disable sve-aes but not sve2.
.arch_extension sve2-aes
.arch_extension nosve2-aes
aesd z23.b, z23.b, z13.b
Expand Down
1 change: 1 addition & 0 deletions llvm/test/MC/AArch64/SVE2/directive-cpu-negative.s
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tbx z0.b, z1.b, z2.b
// CHECK: error: instruction requires: sve2 or sme
// CHECK-NEXT: tbx z0.b, z1.b, z2.b

// nosve2-aes should disable sve-aes but not sve2.
.cpu generic+sve2-aes+nosve2-aes
aesd z23.b, z23.b, z13.b
// CHECK: error: instruction requires: sve-aes
Expand Down

0 comments on commit 7233c93

Please sign in to comment.