Skip to content

Commit 1e4a21a

Browse files
Add feature flag tests for the cmpbr instructions
1 parent 0fdc917 commit 1e4a21a

File tree

5 files changed

+21
-2
lines changed

5 files changed

+21
-2
lines changed

llvm/lib/Target/AArch64/AArch64InstrFormats.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12661,7 +12661,7 @@ class MulAccumCPA<bit isSub, string asm>
1266112661

1266212662

1266312663
//----------------------------------------------------------------------------
12664-
// 2023 Armv9.6 Extensions
12664+
// 2024 Armv9.6 Extensions
1266512665
//----------------------------------------------------------------------------
1266612666

1266712667
//---

llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3751,6 +3751,7 @@ static const struct Extension {
37513751
{"sme-fa64", {AArch64::FeatureSMEFA64}},
37523752
{"cpa", {AArch64::FeatureCPA}},
37533753
{"tlbiw", {AArch64::FeatureTLBIW}},
3754+
{"cmpbr", {AArch64::FeatureCMPBR}},
37543755
};
37553756

37563757
static void setRequiredFeatureString(FeatureBitset FBS, std::string &Str) {

llvm/test/MC/AArch64/directive-arch-negative.s

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,8 @@
5656

5757
# CHECK: error: instruction requires: lse
5858
# CHECK-NEXT: casa w5, w7, [x20]
59+
60+
.arch arm9.6-a-nocmpbr
61+
cbhi x5, x5, #1020
62+
# CHECK: error: instruction requires: cmpbr
63+
# CHECK-NEXT: cbhi x5, x5, #1020

llvm/test/MC/AArch64/directive-arch.s

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@
2121
mrs x0, rndrrs
2222
# CHECK: mrs x0, RNDR
2323
# CHECK: mrs x0, RNDRRS
24+
25+
.arch armv9-a+cmpbr
26+
cbne x5, #31, lbl
27+
# CHECK: cbne x5, #31, lbl
28+

llvm/test/MC/AArch64/directive-arch_extension-negative.s

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: not llvm-mc -triple aarch64 \
22
// RUN: -mattr=+crc,+sm4,+sha3,+sha2,+aes,+fp,+neon,+ras,+lse,+predres,+ccdp,+mte,+tlb-rmi,+pan-rwv,+ccpp,+rcpc,+ls64,+flagm,+hbc,+mops \
3-
// RUN: -mattr=+rcpc3,+lse128,+d128,+the,+rasv2,+ite,+cssc,+specres2,+gcs \
3+
// RUN: -mattr=+rcpc3,+lse128,+d128,+the,+rasv2,+ite,+cssc,+specres2,+gcs,+cmpbr \
44
// RUN: -filetype asm -o - %s 2>&1 | FileCheck %s
55

66
.arch_extension axp64
@@ -229,3 +229,11 @@ gcspushm x0
229229
gcspushm x0
230230
// CHECK: [[@LINE-1]]:1: error: instruction requires: gcs
231231
// CHECK-NEXT: gcspushm x0
232+
233+
cbhi x5, x5, #1020
234+
// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: cmpbr
235+
.arch_extension nocmpbr
236+
cbhi x5, x5, #1020
237+
// CHECK: [[@LINE-1]]:1: error: instruction requires: cmpbr
238+
// CHECK-NEXT: cbhi x5, x5, #1020
239+

0 commit comments

Comments
 (0)