[llvm] [AArch64][llvm] Unify AArch64 tests into a single file (1/4) (NFC) (PR #146328)

Jonathan Thackray via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 30 09:22:05 PDT 2025


https://github.com/jthackray updated https://github.com/llvm/llvm-project/pull/146328

>From 0a3b0e4775efe3e6c14385bf57ee51136081ef6d Mon Sep 17 00:00:00 2001
From: Jonathan Thackray <jonathan.thackray at arm.com>
Date: Wed, 25 Jun 2025 21:22:13 +0100
Subject: [PATCH 1/2] [AArch64][llvm] Unify AArch64 tests into a single file
 (1/4) (NFC)

This is a series of patches (1/4) to unify assembly/disassembly of
recent AArch64 tests into a single file. The aim is to improve
consistency, so that all instructions and system registers are
thoroughly tested, and future test cases will be in a unified format.

This patch:
 * unifies errorless .s and .txt tests into a single file
 * remove .txt tests which don't have feature requirements
 * makes the .s tests have a roundabout run line to test both encoding and assembly

Co-authored-by: Virginia Cangelosi <virginia.cangelosi at arm.com>
---
 llvm/test/MC/AArch64/armv8.9a-ats1a.s         |  26 ++-
 llvm/test/MC/AArch64/armv9.4a-ebep.s          |  38 +++-
 llvm/test/MC/AArch64/armv9.5a-e3dse.s         |  30 ++-
 llvm/test/MC/AArch64/armv9.5a-fgwte3.s        |  22 +-
 llvm/test/MC/AArch64/armv9.5a-hacdbs.s        |  30 ++-
 llvm/test/MC/AArch64/armv9.5a-hdbss.s         |  30 ++-
 llvm/test/MC/AArch64/armv9.5a-spmu2.s         |  18 +-
 llvm/test/MC/AArch64/armv9.5a-step2.s         |  22 +-
 llvm/test/MC/AArch64/armv9.6a-srmask.s        | 206 +++++++++++++-----
 .../AArch64/armv9.6a-statistical-profiling.s  |  72 ++++--
 .../test/MC/AArch64/armv9.6a-trbe-exception.s |  59 +++--
 .../Disassembler/AArch64/armv8.9a-ats1a.txt   |  10 -
 .../MC/Disassembler/AArch64/armv9.4a-ebep.txt |  13 --
 .../Disassembler/AArch64/armv9.5a-e3dse.txt   |  13 --
 .../Disassembler/AArch64/armv9.5a-fgwte3.txt  |   7 -
 .../Disassembler/AArch64/armv9.5a-hacdbs.txt  |  14 --
 .../Disassembler/AArch64/armv9.5a-hdbss.txt   |  14 --
 .../Disassembler/AArch64/armv9.5a-spmu2.txt   |   4 -
 .../Disassembler/AArch64/armv9.5a-step2.txt   |   7 -
 .../Disassembler/AArch64/armv9.6a-srmask.txt  | 101 ---------
 .../armv9.6a-statistical-profiling.txt        |  15 --
 .../AArch64/armv9.6a-trbe-exception.txt       |  15 --
 22 files changed, 439 insertions(+), 327 deletions(-)
 delete mode 100644 llvm/test/MC/Disassembler/AArch64/armv8.9a-ats1a.txt
 delete mode 100644 llvm/test/MC/Disassembler/AArch64/armv9.4a-ebep.txt
 delete mode 100644 llvm/test/MC/Disassembler/AArch64/armv9.5a-e3dse.txt
 delete mode 100644 llvm/test/MC/Disassembler/AArch64/armv9.5a-fgwte3.txt
 delete mode 100644 llvm/test/MC/Disassembler/AArch64/armv9.5a-hacdbs.txt
 delete mode 100644 llvm/test/MC/Disassembler/AArch64/armv9.5a-hdbss.txt
 delete mode 100644 llvm/test/MC/Disassembler/AArch64/armv9.5a-spmu2.txt
 delete mode 100644 llvm/test/MC/Disassembler/AArch64/armv9.5a-step2.txt
 delete mode 100644 llvm/test/MC/Disassembler/AArch64/armv9.6a-srmask.txt
 delete mode 100644 llvm/test/MC/Disassembler/AArch64/armv9.6a-statistical-profiling.txt
 delete mode 100644 llvm/test/MC/Disassembler/AArch64/armv9.6a-trbe-exception.txt

diff --git a/llvm/test/MC/AArch64/armv8.9a-ats1a.s b/llvm/test/MC/AArch64/armv8.9a-ats1a.s
index a30d206639425..d61d651b804e7 100644
--- a/llvm/test/MC/AArch64/armv8.9a-ats1a.s
+++ b/llvm/test/MC/AArch64/armv8.9a-ats1a.s
@@ -1,10 +1,28 @@
-// RUN: llvm-mc -triple aarch64 -show-encoding %s | FileCheck %s
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+
 
 at s1e1a, x1
-// CHECK: at s1e1a, x1                        // encoding: [0x41,0x79,0x08,0xd5]
+// CHECK-INST: at s1e1a, x1
+// CHECK-ENCODING: encoding: [0x41,0x79,0x08,0xd5]
+// CHECK-UNKNOWN:  d5087941 at s1e1a, x1
 
 at s1e2a, x1
-// CHECK: at s1e2a, x1                        // encoding: [0x41,0x79,0x0c,0xd5]
+// CHECK-INST: at s1e2a, x1
+// CHECK-ENCODING: encoding: [0x41,0x79,0x0c,0xd5]
+// CHECK-UNKNOWN:  d50c7941 at s1e2a, x1
 
 at s1e3a, x1
-// CHECK: at s1e3a, x1                        // encoding: [0x41,0x79,0x0e,0xd5]
+// CHECK-INST: at s1e3a, x1
+// CHECK-ENCODING: encoding: [0x41,0x79,0x0e,0xd5]
+// CHECK-UNKNOWN:  d50e7941 at s1e3a, x1
diff --git a/llvm/test/MC/AArch64/armv9.4a-ebep.s b/llvm/test/MC/AArch64/armv9.4a-ebep.s
index 7e9f1115d9753..adda45f1a56e7 100644
--- a/llvm/test/MC/AArch64/armv9.4a-ebep.s
+++ b/llvm/test/MC/AArch64/armv9.4a-ebep.s
@@ -1,9 +1,39 @@
-// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:        | llvm-objdump -d --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:   | llvm-objdump -d --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+
 
 mrs x2, PM
+// CHECK-INST: mrs x2, PM
+// CHECK-ENCODING: encoding: [0x22,0x43,0x38,0xd5]
+// CHECK-UNKNOWN:  d5384322 mrs x2, PM
+mrs x3, PM
+// CHECK-INST: mrs x3, PM
+// CHECK-ENCODING: encoding: [0x23,0x43,0x38,0xd5]
+// CHECK-UNKNOWN:  d5384323 mrs x3, PM
 msr PM, x3
+// CHECK-INST: msr PM, x3
+// CHECK-ENCODING: encoding: [0x23,0x43,0x18,0xd5]
+// CHECK-UNKNOWN:  d5184323 msr PM, x3
+msr PM, x6
+// CHECK-INST: msr PM, x6
+// CHECK-ENCODING: encoding: [0x26,0x43,0x18,0xd5]
+// CHECK-UNKNOWN:  d5184326 msr PM, x6
+msr PM, #0
+// CHECK-INST: msr PM, #0
+// CHECK-ENCODING: encoding: [0x1f,0x42,0x01,0xd5]
+// CHECK-UNKNOWN:  d501421f msr PM, #0
 msr PM, #1
+// CHECK-INST: msr PM, #1
+// CHECK-ENCODING: encoding: [0x1f,0x43,0x01,0xd5]
+// CHECK-UNKNOWN:  d501431f msr PM, #1
 
-// CHECK:       mrs x2, {{pm|PM}} // encoding: [0x22,0x43,0x38,0xd5]
-// CHECK:       msr {{pm|PM}}, x3 // encoding: [0x23,0x43,0x18,0xd5]
-// CHECK:       msr {{pm|PM}}, #1 // encoding: [0x1f,0x43,0x01,0xd5]
diff --git a/llvm/test/MC/AArch64/armv9.5a-e3dse.s b/llvm/test/MC/AArch64/armv9.5a-e3dse.s
index b69d49ab4e9e5..1002ac1433178 100644
--- a/llvm/test/MC/AArch64/armv9.5a-e3dse.s
+++ b/llvm/test/MC/AArch64/armv9.5a-e3dse.s
@@ -1,13 +1,33 @@
-// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+
 
 mrs x0, VDISR_EL3
-// CHECK: mrs x0, VDISR_EL3                  // encoding: [0x20,0xc1,0x3e,0xd5]
+// CHECK-INST: mrs x0, VDISR_EL3
+// CHECK-ENCODING: encoding: [0x20,0xc1,0x3e,0xd5]
+// CHECK-UNKNOWN:  d53ec120 mrs x0, VDISR_EL3
 
 msr VDISR_EL3, x0
-// CHECK: msr VDISR_EL3, x0                  // encoding: [0x20,0xc1,0x1e,0xd5]
+// CHECK-INST: msr VDISR_EL3, x0
+// CHECK-ENCODING: encoding: [0x20,0xc1,0x1e,0xd5]
+// CHECK-UNKNOWN:  d51ec120 msr VDISR_EL3, x0
 
 mrs x0, VSESR_EL3
-// CHECK: mrs x0, VSESR_EL3                  // encoding: [0x60,0x52,0x3e,0xd5]
+// CHECK-INST: mrs x0, VSESR_EL3
+// CHECK-ENCODING: encoding: [0x60,0x52,0x3e,0xd5]
+// CHECK-UNKNOWN:  d53e5260 mrs x0, VSESR_EL3
 
 msr VSESR_EL3, x0
-// CHECK: msr VSESR_EL3, x0                  // encoding: [0x60,0x52,0x1e,0xd5]
+// CHECK-INST: msr VSESR_EL3, x0
+// CHECK-ENCODING: encoding: [0x60,0x52,0x1e,0xd5]
+// CHECK-UNKNOWN:  d51e5260 msr VSESR_EL3, x0
diff --git a/llvm/test/MC/AArch64/armv9.5a-fgwte3.s b/llvm/test/MC/AArch64/armv9.5a-fgwte3.s
index 2352bc7e1ca71..0e2976b4096d8 100644
--- a/llvm/test/MC/AArch64/armv9.5a-fgwte3.s
+++ b/llvm/test/MC/AArch64/armv9.5a-fgwte3.s
@@ -1,6 +1,22 @@
-// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+
 
 mrs x0, FGWTE3_EL3
-// CHECK: mrs x0, FGWTE3_EL3                  // encoding: [0xa0,0x11,0x3e,0xd5]
+// CHECK-INST: mrs x0, FGWTE3_EL3
+// CHECK-ENCODING: encoding: [0xa0,0x11,0x3e,0xd5]
+// CHECK-UNKNOWN:  d53e11a0 mrs x0, FGWTE3_EL3
 msr FGWTE3_EL3, x0
-// CHECK: msr FGWTE3_EL3, x0                  // encoding: [0xa0,0x11,0x1e,0xd5]
+// CHECK-INST: msr FGWTE3_EL3, x0
+// CHECK-ENCODING: encoding: [0xa0,0x11,0x1e,0xd5]
+// CHECK-UNKNOWN:  d51e11a0 msr FGWTE3_EL3, x0
diff --git a/llvm/test/MC/AArch64/armv9.5a-hacdbs.s b/llvm/test/MC/AArch64/armv9.5a-hacdbs.s
index 8ccba29beb444..44699a948013d 100644
--- a/llvm/test/MC/AArch64/armv9.5a-hacdbs.s
+++ b/llvm/test/MC/AArch64/armv9.5a-hacdbs.s
@@ -1,12 +1,32 @@
-// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+
 
 mrs x0, HACDBSBR_EL2
-// CHECK: mrs x0, HACDBSBR_EL2                  // encoding: [0x80,0x23,0x3c,0xd5]
+// CHECK-INST: mrs x0, HACDBSBR_EL2
+// CHECK-ENCODING: encoding: [0x80,0x23,0x3c,0xd5]
+// CHECK-UNKNOWN:  d53c2380 mrs x0, HACDBSBR_EL2
 msr HACDBSBR_EL2, x0
-// CHECK: msr HACDBSBR_EL2, x0                  // encoding: [0x80,0x23,0x1c,0xd5]
+// CHECK-INST: msr HACDBSBR_EL2, x0
+// CHECK-ENCODING: encoding: [0x80,0x23,0x1c,0xd5]
+// CHECK-UNKNOWN:  d51c2380 msr HACDBSBR_EL2, x0
 
 mrs x0, HACDBSCONS_EL2
-// CHECK: mrs x0, HACDBSCONS_EL2                  // encoding: [0xa0,0x23,0x3c,0xd5]
+// CHECK-INST: mrs x0, HACDBSCONS_EL2
+// CHECK-ENCODING: encoding: [0xa0,0x23,0x3c,0xd5]
+// CHECK-UNKNOWN:  d53c23a0 mrs x0, HACDBSCONS_EL2
 msr HACDBSCONS_EL2, x0
-// CHECK: msr HACDBSCONS_EL2, x0                  // encoding: [0xa0,0x23,0x1c,0xd5]
+// CHECK-INST: msr HACDBSCONS_EL2, x0
+// CHECK-ENCODING: encoding: [0xa0,0x23,0x1c,0xd5]
+// CHECK-UNKNOWN:  d51c23a0 msr HACDBSCONS_EL2, x0
 
diff --git a/llvm/test/MC/AArch64/armv9.5a-hdbss.s b/llvm/test/MC/AArch64/armv9.5a-hdbss.s
index c4505c9d70e7f..4582ed245beb9 100644
--- a/llvm/test/MC/AArch64/armv9.5a-hdbss.s
+++ b/llvm/test/MC/AArch64/armv9.5a-hdbss.s
@@ -1,12 +1,32 @@
-// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+
 
 mrs x0, HDBSSBR_EL2
-// CHECK: mrs x0, HDBSSBR_EL2                  // encoding: [0x40,0x23,0x3c,0xd5]
+// CHECK-INST: mrs x0, HDBSSBR_EL2
+// CHECK-ENCODING: encoding: [0x40,0x23,0x3c,0xd5]
+// CHECK-UNKNOWN:  d53c2340 mrs x0, HDBSSBR_EL2
 msr HDBSSBR_EL2, x0
-// CHECK: msr HDBSSBR_EL2, x0                  // encoding: [0x40,0x23,0x1c,0xd5]
+// CHECK-INST: msr HDBSSBR_EL2, x0
+// CHECK-ENCODING: encoding: [0x40,0x23,0x1c,0xd5]
+// CHECK-UNKNOWN:  d51c2340 msr HDBSSBR_EL2, x0
 
 mrs x0, HDBSSPROD_EL2
-// CHECK: mrs x0, HDBSSPROD_EL2                  // encoding: [0x60,0x23,0x3c,0xd5]
+// CHECK-INST: mrs x0, HDBSSPROD_EL2
+// CHECK-ENCODING: encoding: [0x60,0x23,0x3c,0xd5]
+// CHECK-UNKNOWN:  d53c2360 mrs x0, HDBSSPROD_EL2
 msr HDBSSPROD_EL2, x0
-// CHECK: msr HDBSSPROD_EL2, x0                  // encoding: [0x60,0x23,0x1c,0xd5]
+// CHECK-INST: msr HDBSSPROD_EL2, x0
+// CHECK-ENCODING: encoding: [0x60,0x23,0x1c,0xd5]
+// CHECK-UNKNOWN:  d51c2360 msr HDBSSPROD_EL2, x0
 
diff --git a/llvm/test/MC/AArch64/armv9.5a-spmu2.s b/llvm/test/MC/AArch64/armv9.5a-spmu2.s
index b7febdb9d248e..c476cb642faf5 100644
--- a/llvm/test/MC/AArch64/armv9.5a-spmu2.s
+++ b/llvm/test/MC/AArch64/armv9.5a-spmu2.s
@@ -1,4 +1,18 @@
-// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+
 
 msr SPMZR_EL0, x0
-// CHECK: msr SPMZR_EL0, x0                  // encoding: [0x80,0x9c,0x13,0xd5]
+// CHECK-INST: msr SPMZR_EL0, x0
+// CHECK-ENCODING: encoding: [0x80,0x9c,0x13,0xd5]
+// CHECK-UNKNOWN:  d5139c80 msr SPMZR_EL0, x0
diff --git a/llvm/test/MC/AArch64/armv9.5a-step2.s b/llvm/test/MC/AArch64/armv9.5a-step2.s
index c5f226bda3178..eda0050111db7 100644
--- a/llvm/test/MC/AArch64/armv9.5a-step2.s
+++ b/llvm/test/MC/AArch64/armv9.5a-step2.s
@@ -1,7 +1,23 @@
-// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+
 
 mrs x0, MDSTEPOP_EL1
-// CHECK: mrs x0, MDSTEPOP_EL1                  // encoding: [0x40,0x05,0x30,0xd5]
+// CHECK-INST: mrs x0, MDSTEPOP_EL1
+// CHECK-ENCODING: encoding: [0x40,0x05,0x30,0xd5]
+// CHECK-UNKNOWN:  d5300540 mrs x0, MDSTEPOP_EL1
 
 msr MDSTEPOP_EL1, x0
-// CHECK: msr MDSTEPOP_EL1, x0                  // encoding: [0x40,0x05,0x10,0xd5]
+// CHECK-INST: msr MDSTEPOP_EL1, x0
+// CHECK-ENCODING: encoding: [0x40,0x05,0x10,0xd5]
+// CHECK-UNKNOWN:  d5100540 msr MDSTEPOP_EL1, x0
diff --git a/llvm/test/MC/AArch64/armv9.6a-srmask.s b/llvm/test/MC/AArch64/armv9.6a-srmask.s
index 40f0e98494d4c..1829dc380be69 100644
--- a/llvm/test/MC/AArch64/armv9.6a-srmask.s
+++ b/llvm/test/MC/AArch64/armv9.6a-srmask.s
@@ -1,102 +1,210 @@
-// RUN: llvm-mc -triple aarch64 -show-encoding %s   | FileCheck %s
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+
 
 mrs x3, SCTLRMASK_EL1
-// CHECK: mrs	x3, SCTLRMASK_EL1               // encoding: [0x03,0x14,0x38,0xd5]
+// CHECK-INST: mrs x3, SCTLRMASK_EL1
+// CHECK-ENCODING: encoding: [0x03,0x14,0x38,0xd5]
+// CHECK-UNKNOWN:  d5381403 mrs x3, SCTLRMASK_EL1
 mrs x3, SCTLRMASK_EL2
-// CHECK: mrs	x3, SCTLRMASK_EL2               // encoding: [0x03,0x14,0x3c,0xd5]
+// CHECK-INST: mrs x3, SCTLRMASK_EL2
+// CHECK-ENCODING: encoding: [0x03,0x14,0x3c,0xd5]
+// CHECK-UNKNOWN:  d53c1403 mrs x3, SCTLRMASK_EL2
 mrs x3, SCTLRMASK_EL12
-// CHECK: mrs	x3, SCTLRMASK_EL12              // encoding: [0x03,0x14,0x3d,0xd5]
+// CHECK-INST: mrs x3, SCTLRMASK_EL12
+// CHECK-ENCODING: encoding: [0x03,0x14,0x3d,0xd5]
+// CHECK-UNKNOWN:  d53d1403 mrs x3, SCTLRMASK_EL12
 mrs x3, CPACRMASK_EL1
-// CHECK: mrs	x3, CPACRMASK_EL1               // encoding: [0x43,0x14,0x38,0xd5]
+// CHECK-INST: mrs x3, CPACRMASK_EL1
+// CHECK-ENCODING: encoding: [0x43,0x14,0x38,0xd5]
+// CHECK-UNKNOWN:  d5381443 mrs x3, CPACRMASK_EL1
 mrs x3, CPTRMASK_EL2
-// CHECK: mrs	x3, CPTRMASK_EL2                // encoding: [0x43,0x14,0x3c,0xd5]
+// CHECK-INST: mrs x3, CPTRMASK_EL2
+// CHECK-ENCODING: encoding: [0x43,0x14,0x3c,0xd5]
+// CHECK-UNKNOWN:  d53c1443 mrs x3, CPTRMASK_EL2
 mrs x3, CPACRMASK_EL12
-// CHECK: mrs	x3, CPACRMASK_EL12              // encoding: [0x43,0x14,0x3d,0xd5]
+// CHECK-INST: mrs x3, CPACRMASK_EL12
+// CHECK-ENCODING: encoding: [0x43,0x14,0x3d,0xd5]
+// CHECK-UNKNOWN:  d53d1443 mrs x3, CPACRMASK_EL12
 mrs x3, SCTLR2MASK_EL1
-// CHECK: mrs	x3, SCTLR2MASK_EL1              // encoding: [0x63,0x14,0x38,0xd5]
+// CHECK-INST: mrs x3, SCTLR2MASK_EL1
+// CHECK-ENCODING: encoding: [0x63,0x14,0x38,0xd5]
+// CHECK-UNKNOWN:  d5381463 mrs x3, SCTLR2MASK_EL1
 mrs x3, SCTLR2MASK_EL2
-// CHECK: mrs	x3, SCTLR2MASK_EL2              // encoding: [0x63,0x14,0x3c,0xd5]
+// CHECK-INST: mrs x3, SCTLR2MASK_EL2
+// CHECK-ENCODING: encoding: [0x63,0x14,0x3c,0xd5]
+// CHECK-UNKNOWN:  d53c1463 mrs x3, SCTLR2MASK_EL2
 mrs x3, SCTLR2MASK_EL12
-// CHECK: mrs	x3, SCTLR2MASK_EL12             // encoding: [0x63,0x14,0x3d,0xd5]
+// CHECK-INST: mrs x3, SCTLR2MASK_EL12
+// CHECK-ENCODING: encoding: [0x63,0x14,0x3d,0xd5]
+// CHECK-UNKNOWN:  d53d1463 mrs x3, SCTLR2MASK_EL12
 mrs x3, CPACRALIAS_EL1
-// CHECK: mrs	x3, CPACRALIAS_EL1              // encoding: [0x83,0x14,0x38,0xd5]
+// CHECK-INST: mrs x3, CPACRALIAS_EL1
+// CHECK-ENCODING: encoding: [0x83,0x14,0x38,0xd5]
+// CHECK-UNKNOWN:  d5381483 mrs x3, CPACRALIAS_EL1
 mrs x3, SCTLRALIAS_EL1
-// CHECK: mrs	x3, SCTLRALIAS_EL1              // encoding: [0xc3,0x14,0x38,0xd5]
+// CHECK-INST: mrs x3, SCTLRALIAS_EL1
+// CHECK-ENCODING: encoding: [0xc3,0x14,0x38,0xd5]
+// CHECK-UNKNOWN:  d53814c3 mrs x3, SCTLRALIAS_EL1
 mrs x3, SCTLR2ALIAS_EL1
-// CHECK: mrs	x3, SCTLR2ALIAS_EL1             // encoding: [0xe3,0x14,0x38,0xd5]
+// CHECK-INST: mrs x3, SCTLR2ALIAS_EL1
+// CHECK-ENCODING: encoding: [0xe3,0x14,0x38,0xd5]
+// CHECK-UNKNOWN:  d53814e3 mrs x3, SCTLR2ALIAS_EL1
 mrs x3, TCRMASK_EL1
-// CHECK: mrs	x3, TCRMASK_EL1                 // encoding: [0x43,0x27,0x38,0xd5]
+// CHECK-INST: mrs x3, TCRMASK_EL1
+// CHECK-ENCODING: encoding: [0x43,0x27,0x38,0xd5]
+// CHECK-UNKNOWN:  d5382743 mrs x3, TCRMASK_EL1
 mrs x3, TCRMASK_EL2
-// CHECK: mrs	x3, TCRMASK_EL2                 // encoding: [0x43,0x27,0x3c,0xd5]
+// CHECK-INST: mrs x3, TCRMASK_EL2
+// CHECK-ENCODING: encoding: [0x43,0x27,0x3c,0xd5]
+// CHECK-UNKNOWN:  d53c2743 mrs x3, TCRMASK_EL2
 mrs x3, TCRMASK_EL12
-// CHECK: mrs	x3, TCRMASK_EL12                // encoding: [0x43,0x27,0x3d,0xd5]
+// CHECK-INST: mrs x3, TCRMASK_EL12
+// CHECK-ENCODING: encoding: [0x43,0x27,0x3d,0xd5]
+// CHECK-UNKNOWN:  d53d2743 mrs x3, TCRMASK_EL12
 mrs x3, TCR2MASK_EL1
-// CHECK: mrs	x3, TCR2MASK_EL1                // encoding: [0x63,0x27,0x38,0xd5]
+// CHECK-INST: mrs x3, TCR2MASK_EL1
+// CHECK-ENCODING: encoding: [0x63,0x27,0x38,0xd5]
+// CHECK-UNKNOWN:  d5382763 mrs x3, TCR2MASK_EL1
 mrs x3, TCR2MASK_EL2
-// CHECK: mrs	x3, TCR2MASK_EL2                // encoding: [0x63,0x27,0x3c,0xd5]
+// CHECK-INST: mrs x3, TCR2MASK_EL2
+// CHECK-ENCODING: encoding: [0x63,0x27,0x3c,0xd5]
+// CHECK-UNKNOWN:  d53c2763 mrs x3, TCR2MASK_EL2
 mrs x3, TCR2MASK_EL12
-// CHECK: mrs	x3, TCR2MASK_EL12               // encoding: [0x63,0x27,0x3d,0xd5]
+// CHECK-INST: mrs x3, TCR2MASK_EL12
+// CHECK-ENCODING: encoding: [0x63,0x27,0x3d,0xd5]
+// CHECK-UNKNOWN:  d53d2763 mrs x3, TCR2MASK_EL12
 mrs x3, TCRALIAS_EL1
-// CHECK: mrs	x3, TCRALIAS_EL1                // encoding: [0xc3,0x27,0x38,0xd5]
+// CHECK-INST: mrs x3, TCRALIAS_EL1
+// CHECK-ENCODING: encoding: [0xc3,0x27,0x38,0xd5]
+// CHECK-UNKNOWN:  d53827c3 mrs x3, TCRALIAS_EL1
 mrs x3, TCR2ALIAS_EL1
-// CHECK: mrs	x3, TCR2ALIAS_EL1               // encoding: [0xe3,0x27,0x38,0xd5]
+// CHECK-INST: mrs x3, TCR2ALIAS_EL1
+// CHECK-ENCODING: encoding: [0xe3,0x27,0x38,0xd5]
+// CHECK-UNKNOWN:  d53827e3 mrs x3, TCR2ALIAS_EL1
 mrs x3, ACTLRMASK_EL1
-// CHECK: mrs	x3, ACTLRMASK_EL1               // encoding: [0x23,0x14,0x38,0xd5]
+// CHECK-INST: mrs x3, ACTLRMASK_EL1
+// CHECK-ENCODING: encoding: [0x23,0x14,0x38,0xd5]
+// CHECK-UNKNOWN:  d5381423 mrs x3, ACTLRMASK_EL1
 mrs x3, ACTLRMASK_EL2
-// CHECK: mrs	x3, ACTLRMASK_EL2               // encoding: [0x23,0x14,0x3c,0xd5]
+// CHECK-INST: mrs x3, ACTLRMASK_EL2
+// CHECK-ENCODING: encoding: [0x23,0x14,0x3c,0xd5]
+// CHECK-UNKNOWN:  d53c1423 mrs x3, ACTLRMASK_EL2
 mrs x3, ACTLRMASK_EL12
-// CHECK: mrs	x3, ACTLRMASK_EL12              // encoding: [0x23,0x14,0x3d,0xd5]
+// CHECK-INST: mrs x3, ACTLRMASK_EL12
+// CHECK-ENCODING: encoding: [0x23,0x14,0x3d,0xd5]
+// CHECK-UNKNOWN:  d53d1423 mrs x3, ACTLRMASK_EL12
 mrs x3, ACTLRALIAS_EL1
-// CHECK: mrs	x3, ACTLRALIAS_EL1              // encoding: [0xa3,0x14,0x38,0xd5]
+// CHECK-INST: mrs x3, ACTLRALIAS_EL1
+// CHECK-ENCODING: encoding: [0xa3,0x14,0x38,0xd5]
+// CHECK-UNKNOWN:  d53814a3 mrs x3, ACTLRALIAS_EL1
 
 msr SCTLRMASK_EL1, x3
-// CHECK: msr	SCTLRMASK_EL1, x3               // encoding: [0x03,0x14,0x18,0xd5]
+// CHECK-INST: msr SCTLRMASK_EL1, x3
+// CHECK-ENCODING: encoding: [0x03,0x14,0x18,0xd5]
+// CHECK-UNKNOWN:  d5181403 msr SCTLRMASK_EL1, x3
 msr SCTLRMASK_EL2, x3
-// CHECK: msr	SCTLRMASK_EL2, x3               // encoding: [0x03,0x14,0x1c,0xd5]
+// CHECK-INST: msr SCTLRMASK_EL2, x3
+// CHECK-ENCODING: encoding: [0x03,0x14,0x1c,0xd5]
+// CHECK-UNKNOWN:  d51c1403 msr SCTLRMASK_EL2, x3
 msr SCTLRMASK_EL12, x3
-// CHECK: msr	SCTLRMASK_EL12, x3              // encoding: [0x03,0x14,0x1d,0xd5]
+// CHECK-INST: msr SCTLRMASK_EL12, x3
+// CHECK-ENCODING: encoding: [0x03,0x14,0x1d,0xd5]
+// CHECK-UNKNOWN:  d51d1403 msr SCTLRMASK_EL12, x3
 msr CPACRMASK_EL1, x3
-// CHECK: msr	CPACRMASK_EL1, x3               // encoding: [0x43,0x14,0x18,0xd5]
+// CHECK-INST: msr CPACRMASK_EL1, x3
+// CHECK-ENCODING: encoding: [0x43,0x14,0x18,0xd5]
+// CHECK-UNKNOWN:  d5181443 msr CPACRMASK_EL1, x3
 msr CPTRMASK_EL2, x3
-// CHECK: msr	CPTRMASK_EL2, x3                // encoding: [0x43,0x14,0x1c,0xd5]
+// CHECK-INST: msr CPTRMASK_EL2, x3
+// CHECK-ENCODING: encoding: [0x43,0x14,0x1c,0xd5]
+// CHECK-UNKNOWN:  d51c1443 msr CPTRMASK_EL2, x3
 msr CPACRMASK_EL12, x3
-// CHECK: msr	CPACRMASK_EL12, x3              // encoding: [0x43,0x14,0x1d,0xd5]
+// CHECK-INST: msr CPACRMASK_EL12, x3
+// CHECK-ENCODING: encoding: [0x43,0x14,0x1d,0xd5]
+// CHECK-UNKNOWN:  d51d1443 msr CPACRMASK_EL12, x3
 msr SCTLR2MASK_EL1, x3
-// CHECK: msr	SCTLR2MASK_EL1, x3              // encoding: [0x63,0x14,0x18,0xd5]
+// CHECK-INST: msr SCTLR2MASK_EL1, x3
+// CHECK-ENCODING: encoding: [0x63,0x14,0x18,0xd5]
+// CHECK-UNKNOWN:  d5181463 msr SCTLR2MASK_EL1, x3
 msr SCTLR2MASK_EL2, x3
-// CHECK: msr	SCTLR2MASK_EL2, x3              // encoding: [0x63,0x14,0x1c,0xd5]
+// CHECK-INST: msr SCTLR2MASK_EL2, x3
+// CHECK-ENCODING: encoding: [0x63,0x14,0x1c,0xd5]
+// CHECK-UNKNOWN:  d51c1463 msr SCTLR2MASK_EL2, x3
 msr SCTLR2MASK_EL12, x3
-// CHECK: msr	SCTLR2MASK_EL12, x3             // encoding: [0x63,0x14,0x1d,0xd5]
+// CHECK-INST: msr SCTLR2MASK_EL12, x3
+// CHECK-ENCODING: encoding: [0x63,0x14,0x1d,0xd5]
+// CHECK-UNKNOWN:  d51d1463 msr SCTLR2MASK_EL12, x3
 msr CPACRALIAS_EL1, x3
-// CHECK: msr	CPACRALIAS_EL1, x3              // encoding: [0x83,0x14,0x18,0xd5]
+// CHECK-INST: msr CPACRALIAS_EL1, x3
+// CHECK-ENCODING: encoding: [0x83,0x14,0x18,0xd5]
+// CHECK-UNKNOWN:  d5181483 msr CPACRALIAS_EL1, x3
 msr SCTLRALIAS_EL1, x3
-// CHECK: msr	SCTLRALIAS_EL1, x3              // encoding: [0xc3,0x14,0x18,0xd5]
+// CHECK-INST: msr SCTLRALIAS_EL1, x3
+// CHECK-ENCODING: encoding: [0xc3,0x14,0x18,0xd5]
+// CHECK-UNKNOWN:  d51814c3 msr SCTLRALIAS_EL1, x3
 msr SCTLR2ALIAS_EL1, x3
-// CHECK: msr	SCTLR2ALIAS_EL1, x3             // encoding: [0xe3,0x14,0x18,0xd5]
+// CHECK-INST: msr SCTLR2ALIAS_EL1, x3
+// CHECK-ENCODING: encoding: [0xe3,0x14,0x18,0xd5]
+// CHECK-UNKNOWN:  d51814e3 msr SCTLR2ALIAS_EL1, x3
 msr TCRMASK_EL1, x3
-// CHECK: msr	TCRMASK_EL1, x3                 // encoding: [0x43,0x27,0x18,0xd5]
+// CHECK-INST: msr TCRMASK_EL1, x3
+// CHECK-ENCODING: encoding: [0x43,0x27,0x18,0xd5]
+// CHECK-UNKNOWN:  d5182743 msr TCRMASK_EL1, x3
 msr TCRMASK_EL2, x3
-// CHECK: msr	TCRMASK_EL2, x3                 // encoding: [0x43,0x27,0x1c,0xd5]
+// CHECK-INST: msr TCRMASK_EL2, x3
+// CHECK-ENCODING: encoding: [0x43,0x27,0x1c,0xd5]
+// CHECK-UNKNOWN:  d51c2743 msr TCRMASK_EL2, x3
 msr TCRMASK_EL12, x3
-// CHECK: msr	TCRMASK_EL12, x3                // encoding: [0x43,0x27,0x1d,0xd5]
+// CHECK-INST: msr TCRMASK_EL12, x3
+// CHECK-ENCODING: encoding: [0x43,0x27,0x1d,0xd5]
+// CHECK-UNKNOWN:  d51d2743 msr TCRMASK_EL12, x3
 msr TCR2MASK_EL1, x3
-// CHECK: msr	TCR2MASK_EL1, x3                // encoding: [0x63,0x27,0x18,0xd5]
+// CHECK-INST: msr TCR2MASK_EL1, x3
+// CHECK-ENCODING: encoding: [0x63,0x27,0x18,0xd5]
+// CHECK-UNKNOWN:  d5182763 msr TCR2MASK_EL1, x3
 msr TCR2MASK_EL2, x3
-// CHECK: msr	TCR2MASK_EL2, x3                // encoding: [0x63,0x27,0x1c,0xd5]
+// CHECK-INST: msr TCR2MASK_EL2, x3
+// CHECK-ENCODING: encoding: [0x63,0x27,0x1c,0xd5]
+// CHECK-UNKNOWN:  d51c2763 msr TCR2MASK_EL2, x3
 msr TCR2MASK_EL12, x3
-// CHECK: msr	TCR2MASK_EL12, x3               // encoding: [0x63,0x27,0x1d,0xd5]
+// CHECK-INST: msr TCR2MASK_EL12, x3
+// CHECK-ENCODING: encoding: [0x63,0x27,0x1d,0xd5]
+// CHECK-UNKNOWN:  d51d2763 msr TCR2MASK_EL12, x3
 msr TCRALIAS_EL1, x3
-// CHECK: msr	TCRALIAS_EL1, x3                // encoding: [0xc3,0x27,0x18,0xd5]
+// CHECK-INST: msr TCRALIAS_EL1, x3
+// CHECK-ENCODING: encoding: [0xc3,0x27,0x18,0xd5]
+// CHECK-UNKNOWN:  d51827c3 msr TCRALIAS_EL1, x3
 msr TCR2ALIAS_EL1, x3
-// CHECK: msr	TCR2ALIAS_EL1, x3               // encoding: [0xe3,0x27,0x18,0xd5]
+// CHECK-INST: msr TCR2ALIAS_EL1, x3
+// CHECK-ENCODING: encoding: [0xe3,0x27,0x18,0xd5]
+// CHECK-UNKNOWN:  d51827e3 msr TCR2ALIAS_EL1, x3
 msr ACTLRMASK_EL1, x3
-// CHECK: msr	ACTLRMASK_EL1, x3               // encoding: [0x23,0x14,0x18,0xd5]
+// CHECK-INST: msr ACTLRMASK_EL1, x3
+// CHECK-ENCODING: encoding: [0x23,0x14,0x18,0xd5]
+// CHECK-UNKNOWN:  d5181423 msr ACTLRMASK_EL1, x3
 msr ACTLRMASK_EL2, x3
-// CHECK: msr	ACTLRMASK_EL2, x3               // encoding: [0x23,0x14,0x1c,0xd5]
+// CHECK-INST: msr ACTLRMASK_EL2, x3
+// CHECK-ENCODING: encoding: [0x23,0x14,0x1c,0xd5]
+// CHECK-UNKNOWN:  d51c1423 msr ACTLRMASK_EL2, x3
 msr ACTLRMASK_EL12, x3
-// CHECK: msr	ACTLRMASK_EL12, x3              // encoding: [0x23,0x14,0x1d,0xd5]
+// CHECK-INST: msr ACTLRMASK_EL12, x3
+// CHECK-ENCODING: encoding: [0x23,0x14,0x1d,0xd5]
+// CHECK-UNKNOWN:  d51d1423 msr ACTLRMASK_EL12, x3
 msr ACTLRALIAS_EL1, x3
-// CHECK: msr	ACTLRALIAS_EL1, x3              // encoding: [0xa3,0x14,0x18,0xd5]
+// CHECK-INST: msr ACTLRALIAS_EL1, x3
+// CHECK-ENCODING: encoding: [0xa3,0x14,0x18,0xd5]
+// CHECK-UNKNOWN:  d51814a3 msr ACTLRALIAS_EL1, x3
 
 
 
diff --git a/llvm/test/MC/AArch64/armv9.6a-statistical-profiling.s b/llvm/test/MC/AArch64/armv9.6a-statistical-profiling.s
index 2314c414d4d96..554a5ea1dc350 100644
--- a/llvm/test/MC/AArch64/armv9.6a-statistical-profiling.s
+++ b/llvm/test/MC/AArch64/armv9.6a-statistical-profiling.s
@@ -1,19 +1,53 @@
-// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding     < %s 2> %t | FileCheck %s
-
-  msr pmbmar_el1, x0
-  msr pmbsr_el12, x0
-  msr pmbsr_el2, x0
-  msr pmbsr_el3, x0
-// CHECK:     msr PMBMAR_EL1, x0          // encoding: [0xa0,0x9a,0x18,0xd5]
-// CHECK:     msr PMBSR_EL12, x0          // encoding: [0x60,0x9a,0x1d,0xd5]
-// CHECK:     msr PMBSR_EL2, x0           // encoding: [0x60,0x9a,0x1c,0xd5]
-// CHECK:     msr PMBSR_EL3, x0           // encoding: [0x60,0x9a,0x1e,0xd5]
-
-  mrs x0, pmbmar_el1
-  mrs x0, pmbsr_el12
-  mrs x0, pmbsr_el2
-  mrs x0, pmbsr_el3
-// CHECK:    mrs x0, PMBMAR_EL1          // encoding: [0xa0,0x9a,0x38,0xd5]
-// CHECK:    mrs x0, PMBSR_EL12          // encoding: [0x60,0x9a,0x3d,0xd5]
-// CHECK:    mrs x0, PMBSR_EL2           // encoding: [0x60,0x9a,0x3c,0xd5]
-// CHECK:    mrs x0, PMBSR_EL3           // encoding: [0x60,0x9a,0x3e,0xd5]
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+
+
+msr pmbmar_el1, x0
+// CHECK-INST: msr PMBMAR_EL1, x0
+// CHECK-ENCODING: encoding: [0xa0,0x9a,0x18,0xd5]
+// CHECK-UNKNOWN:  d5189aa0 msr PMBMAR_EL1, x0
+
+msr pmbsr_el12, x0
+// CHECK-INST: msr PMBSR_EL12, x0
+// CHECK-ENCODING: encoding: [0x60,0x9a,0x1d,0xd5]
+// CHECK-UNKNOWN:  d51d9a60 msr PMBSR_EL12, x0
+
+msr pmbsr_el2, x0
+// CHECK-INST: msr PMBSR_EL2, x0
+// CHECK-ENCODING: encoding: [0x60,0x9a,0x1c,0xd5]
+// CHECK-UNKNOWN:  d51c9a60 msr PMBSR_EL2, x0
+
+msr pmbsr_el3, x0
+// CHECK-INST: msr PMBSR_EL3, x0
+// CHECK-ENCODING: encoding: [0x60,0x9a,0x1e,0xd5]
+// CHECK-UNKNOWN:  d51e9a60 msr PMBSR_EL3, x0
+
+mrs x0, pmbmar_el1
+// CHECK-INST: mrs x0, PMBMAR_EL1
+// CHECK-ENCODING: encoding: [0xa0,0x9a,0x38,0xd5]
+// CHECK-UNKNOWN:  d5389aa0 mrs x0, PMBMAR_EL1
+
+mrs x0, pmbsr_el12
+// CHECK-INST: mrs x0, PMBSR_EL12
+// CHECK-ENCODING: encoding: [0x60,0x9a,0x3d,0xd5]
+// CHECK-UNKNOWN:  d53d9a60 mrs x0, PMBSR_EL12
+
+mrs x0, pmbsr_el2
+// CHECK-INST: mrs x0, PMBSR_EL2
+// CHECK-ENCODING: encoding: [0x60,0x9a,0x3c,0xd5]
+// CHECK-UNKNOWN:  d53c9a60 mrs x0, PMBSR_EL2
+
+mrs x0, pmbsr_el3
+// CHECK-INST: mrs x0, PMBSR_EL3
+// CHECK-ENCODING: encoding: [0x60,0x9a,0x3e,0xd5]
+// CHECK-UNKNOWN:  d53e9a60 mrs x0, PMBSR_EL3
diff --git a/llvm/test/MC/AArch64/armv9.6a-trbe-exception.s b/llvm/test/MC/AArch64/armv9.6a-trbe-exception.s
index a8ba7c442e4ce..fe127b3197c97 100644
--- a/llvm/test/MC/AArch64/armv9.6a-trbe-exception.s
+++ b/llvm/test/MC/AArch64/armv9.6a-trbe-exception.s
@@ -1,15 +1,44 @@
-// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding      < %s 2> %t | FileCheck %s
-
-  msr trbsr_el12, x0
-  msr trbsr_el2, x0
-  msr trbsr_el3, x0
-// CHECK:     msr TRBSR_EL12, x0          // encoding: [0x60,0x9b,0x1d,0xd5]
-// CHECK:     msr TRBSR_EL2, x0           // encoding: [0x60,0x9b,0x1c,0xd5]
-// CHECK:     msr TRBSR_EL3, x0           // encoding: [0x60,0x9b,0x1e,0xd5]
-
-  mrs x0, trbsr_el12
-  mrs x0, trbsr_el2
-  mrs x0, trbsr_el3
-// CHECK:    mrs x0, TRBSR_EL12          // encoding: [0x60,0x9b,0x3d,0xd5]
-// CHECK:    mrs x0, TRBSR_EL2           // encoding: [0x60,0x9b,0x3c,0xd5]
-// CHECK:    mrs x0, TRBSR_EL3           // encoding: [0x60,0x9b,0x3e,0xd5]
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
+// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+
+
+msr trbsr_el12, x0
+// CHECK-INST: msr TRBSR_EL12, x0
+// CHECK-ENCODING: encoding: [0x60,0x9b,0x1d,0xd5]
+// CHECK-UNKNOWN:  d51d9b60 msr TRBSR_EL12, x0
+
+msr trbsr_el2, x0
+// CHECK-INST: msr TRBSR_EL2, x0
+// CHECK-ENCODING: encoding: [0x60,0x9b,0x1c,0xd5]
+// CHECK-UNKNOWN:  d51c9b60 msr TRBSR_EL2, x0
+
+msr trbsr_el3, x0
+// CHECK-INST: msr TRBSR_EL3, x0
+// CHECK-ENCODING: encoding: [0x60,0x9b,0x1e,0xd5]
+// CHECK-UNKNOWN:  d51e9b60 msr TRBSR_EL3, x0
+
+
+mrs x0, trbsr_el12
+// CHECK-INST: mrs x0, TRBSR_EL12
+// CHECK-ENCODING: encoding: [0x60,0x9b,0x3d,0xd5]
+// CHECK-UNKNOWN:  d53d9b60 mrs x0, TRBSR_EL12
+
+mrs x0, trbsr_el2
+// CHECK-INST: mrs x0, TRBSR_EL2
+// CHECK-ENCODING: encoding: [0x60,0x9b,0x3c,0xd5]
+// CHECK-UNKNOWN:  d53c9b60 mrs x0, TRBSR_EL2
+
+mrs x0, trbsr_el3
+// CHECK-INST: mrs x0, TRBSR_EL3
+// CHECK-ENCODING: encoding: [0x60,0x9b,0x3e,0xd5]
+// CHECK-UNKNOWN:  d53e9b60 mrs x0, TRBSR_EL3
diff --git a/llvm/test/MC/Disassembler/AArch64/armv8.9a-ats1a.txt b/llvm/test/MC/Disassembler/AArch64/armv8.9a-ats1a.txt
deleted file mode 100644
index 03aca5e916db0..0000000000000
--- a/llvm/test/MC/Disassembler/AArch64/armv8.9a-ats1a.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-# RUN: llvm-mc -triple=aarch64 -disassemble %s | FileCheck %s
-
-[0x41,0x79,0x08,0xd5]
-# CHECK: at s1e1a, x1
-
-[0x41,0x79,0x0c,0xd5]
-# CHECK: at s1e2a, x1
-
-[0x41,0x79,0x0e,0xd5]
-# CHECK: at s1e3a, x1
diff --git a/llvm/test/MC/Disassembler/AArch64/armv9.4a-ebep.txt b/llvm/test/MC/Disassembler/AArch64/armv9.4a-ebep.txt
deleted file mode 100644
index aa9c95fb2082b..0000000000000
--- a/llvm/test/MC/Disassembler/AArch64/armv9.4a-ebep.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-# RUN: llvm-mc -triple=aarch64 -disassemble %s | FileCheck %s
-
-[0x23,0x43,0x38,0xd5]
-# CHECK:  mrs x3, PM
-
-[0x26,0x43,0x18,0xd5]
-# CHECK:  msr PM, x6
-
-[0x1f,0x42,0x01,0xd5]
-# CHECK:  msr PM, #0
-
-[0x1f,0x43,0x01,0xd5]
-# CHECK:  msr PM, #1
diff --git a/llvm/test/MC/Disassembler/AArch64/armv9.5a-e3dse.txt b/llvm/test/MC/Disassembler/AArch64/armv9.5a-e3dse.txt
deleted file mode 100644
index d2476dbf876d4..0000000000000
--- a/llvm/test/MC/Disassembler/AArch64/armv9.5a-e3dse.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-# RUN: llvm-mc -triple aarch64 -disassemble < %s | FileCheck %s
-
-[0x20,0xc1,0x3e,0xd5]
-# CHECK: mrs x0, VDISR_EL3
-
-[0x20,0xc1,0x1e,0xd5]
-# CHECK: msr VDISR_EL3, x0
-
-[0x60,0x52,0x3e,0xd5]
-# CHECK: mrs x0, VSESR_EL3
-
-[0x60,0x52,0x1e,0xd5]
-# CHECK: msr VSESR_EL3, x0
diff --git a/llvm/test/MC/Disassembler/AArch64/armv9.5a-fgwte3.txt b/llvm/test/MC/Disassembler/AArch64/armv9.5a-fgwte3.txt
deleted file mode 100644
index f7e355a700af0..0000000000000
--- a/llvm/test/MC/Disassembler/AArch64/armv9.5a-fgwte3.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-# RUN: llvm-mc -triple aarch64 -disassemble < %s | FileCheck %s
-
-[0xa0,0x11,0x3e,0xd5]
-# CHECK: mrs x0, FGWTE3_EL3
-
-[0xa0,0x11,0x1e,0xd5]
-# CHECK: msr FGWTE3_EL3, x0
diff --git a/llvm/test/MC/Disassembler/AArch64/armv9.5a-hacdbs.txt b/llvm/test/MC/Disassembler/AArch64/armv9.5a-hacdbs.txt
deleted file mode 100644
index d9be7e5ba4432..0000000000000
--- a/llvm/test/MC/Disassembler/AArch64/armv9.5a-hacdbs.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-# RUN: llvm-mc -triple aarch64 -disassemble < %s | FileCheck %s
-
-[0x80,0x23,0x3c,0xd5]
-# CHECK: mrs x0, HACDBSBR_EL2
-
-[0x80,0x23,0x1c,0xd5]
-# CHECK: msr HACDBSBR_EL2, x0
-
-[0xa0,0x23,0x3c,0xd5]
-# CHECK: mrs x0, HACDBSCONS_EL2
-
-[0xa0,0x23,0x1c,0xd5]
-# CHECK: msr HACDBSCONS_EL2, x0
-
diff --git a/llvm/test/MC/Disassembler/AArch64/armv9.5a-hdbss.txt b/llvm/test/MC/Disassembler/AArch64/armv9.5a-hdbss.txt
deleted file mode 100644
index 999f322548f46..0000000000000
--- a/llvm/test/MC/Disassembler/AArch64/armv9.5a-hdbss.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-# RUN: llvm-mc -triple aarch64 -disassemble < %s | FileCheck %s
-
-[0x40,0x23,0x3c,0xd5]
-# CHECK: mrs x0, HDBSSBR_EL2
-
-[0x40,0x23,0x1c,0xd5]
-# CHECK: msr HDBSSBR_EL2, x0
-
-[0x60,0x23,0x3c,0xd5]
-# CHECK: mrs x0, HDBSSPROD_EL2
-
-[0x60,0x23,0x1c,0xd5]
-# CHECK: msr HDBSSPROD_EL2, x0
-
diff --git a/llvm/test/MC/Disassembler/AArch64/armv9.5a-spmu2.txt b/llvm/test/MC/Disassembler/AArch64/armv9.5a-spmu2.txt
deleted file mode 100644
index 9d4fa1b1a078a..0000000000000
--- a/llvm/test/MC/Disassembler/AArch64/armv9.5a-spmu2.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-# RUN: llvm-mc -triple aarch64 -disassemble < %s | FileCheck %s
-
-[0x80,0x9c,0x13,0xd5]
-# CHECK: msr SPMZR_EL0, x0
diff --git a/llvm/test/MC/Disassembler/AArch64/armv9.5a-step2.txt b/llvm/test/MC/Disassembler/AArch64/armv9.5a-step2.txt
deleted file mode 100644
index 473c16d096012..0000000000000
--- a/llvm/test/MC/Disassembler/AArch64/armv9.5a-step2.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-# RUN: llvm-mc -triple aarch64 -disassemble < %s | FileCheck %s
-
-[0x40,0x05,0x30,0xd5]
-# CHECK: mrs x0, MDSTEPOP_EL1
-
-[0x40,0x05,0x10,0xd5]
-# CHECK: msr MDSTEPOP_EL1, x0
diff --git a/llvm/test/MC/Disassembler/AArch64/armv9.6a-srmask.txt b/llvm/test/MC/Disassembler/AArch64/armv9.6a-srmask.txt
deleted file mode 100644
index 30d0a60321881..0000000000000
--- a/llvm/test/MC/Disassembler/AArch64/armv9.6a-srmask.txt
+++ /dev/null
@@ -1,101 +0,0 @@
-# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
-# RUN: llvm-mc -triple aarch64 -disassemble < %s 2> %t | FileCheck %s
-
-[0x03,0x14,0x38,0xd5]
-[0x03,0x14,0x3c,0xd5]
-[0x03,0x14,0x3d,0xd5]
-[0x43,0x14,0x38,0xd5]
-[0x43,0x14,0x3c,0xd5]
-[0x43,0x14,0x3d,0xd5]
-[0x63,0x14,0x38,0xd5]
-[0x63,0x14,0x3c,0xd5]
-[0x63,0x14,0x3d,0xd5]
-[0x83,0x14,0x38,0xd5]
-[0xc3,0x14,0x38,0xd5]
-[0xe3,0x14,0x38,0xd5]
-[0x43,0x27,0x38,0xd5]
-[0x43,0x27,0x3c,0xd5]
-[0x43,0x27,0x3d,0xd5]
-[0x63,0x27,0x38,0xd5]
-[0x63,0x27,0x3c,0xd5]
-[0x63,0x27,0x3d,0xd5]
-[0xc3,0x27,0x38,0xd5]
-[0xe3,0x27,0x38,0xd5]
-[0x23,0x14,0x38,0xd5]
-[0x23,0x14,0x3c,0xd5]
-[0x23,0x14,0x3d,0xd5]
-[0xa3,0x14,0x38,0xd5]
-
-[0x03,0x14,0x18,0xd5]
-[0x03,0x14,0x1c,0xd5]
-[0x03,0x14,0x1d,0xd5]
-[0x43,0x14,0x18,0xd5]
-[0x43,0x14,0x1c,0xd5]
-[0x43,0x14,0x1d,0xd5]
-[0x63,0x14,0x18,0xd5]
-[0x63,0x14,0x1c,0xd5]
-[0x63,0x14,0x1d,0xd5]
-[0x83,0x14,0x18,0xd5]
-[0xc3,0x14,0x18,0xd5]
-[0xe3,0x14,0x18,0xd5]
-[0x43,0x27,0x18,0xd5]
-[0x43,0x27,0x1c,0xd5]
-[0x43,0x27,0x1d,0xd5]
-[0x63,0x27,0x18,0xd5]
-[0x63,0x27,0x1c,0xd5]
-[0x63,0x27,0x1d,0xd5]
-[0xc3,0x27,0x18,0xd5]
-[0xe3,0x27,0x18,0xd5]
-[0x23,0x14,0x18,0xd5]
-[0x23,0x14,0x1c,0xd5]
-[0x23,0x14,0x1d,0xd5]
-[0xa3,0x14,0x18,0xd5]
-
-# CHECK:      	mrs	x3, SCTLRMASK_EL1
-# CHECK-NEXT: 	mrs	x3, SCTLRMASK_EL2
-# CHECK-NEXT: 	mrs	x3, SCTLRMASK_EL12
-# CHECK-NEXT: 	mrs	x3, CPACRMASK_EL1
-# CHECK-NEXT: 	mrs	x3, CPTRMASK_EL2
-# CHECK-NEXT: 	mrs	x3, CPACRMASK_EL12
-# CHECK-NEXT: 	mrs	x3, SCTLR2MASK_EL1
-# CHECK-NEXT: 	mrs	x3, SCTLR2MASK_EL2
-# CHECK-NEXT: 	mrs	x3, SCTLR2MASK_EL12
-# CHECK-NEXT: 	mrs	x3, CPACRALIAS_EL1
-# CHECK-NEXT: 	mrs	x3, SCTLRALIAS_EL1
-# CHECK-NEXT: 	mrs	x3, SCTLR2ALIAS_EL1
-# CHECK-NEXT: 	mrs	x3, TCRMASK_EL1
-# CHECK-NEXT: 	mrs	x3, TCRMASK_EL2
-# CHECK-NEXT: 	mrs	x3, TCRMASK_EL12
-# CHECK-NEXT: 	mrs	x3, TCR2MASK_EL1
-# CHECK-NEXT: 	mrs	x3, TCR2MASK_EL2
-# CHECK-NEXT: 	mrs	x3, TCR2MASK_EL12
-# CHECK-NEXT: 	mrs	x3, TCRALIAS_EL1
-# CHECK-NEXT: 	mrs	x3, TCR2ALIAS_EL1
-# CHECK-NEXT: 	mrs	x3, ACTLRMASK_EL1
-# CHECK-NEXT: 	mrs	x3, ACTLRMASK_EL2
-# CHECK-NEXT: 	mrs	x3, ACTLRMASK_EL12
-# CHECK-NEXT: 	mrs	x3, ACTLRALIAS_EL1
-# CHECK-NEXT: 	msr	SCTLRMASK_EL1, x3
-# CHECK-NEXT: 	msr	SCTLRMASK_EL2, x3
-# CHECK-NEXT: 	msr	SCTLRMASK_EL12, x3
-# CHECK-NEXT: 	msr	CPACRMASK_EL1, x3
-# CHECK-NEXT: 	msr	CPTRMASK_EL2, x3
-# CHECK-NEXT: 	msr	CPACRMASK_EL12, x3
-# CHECK-NEXT: 	msr	SCTLR2MASK_EL1, x3
-# CHECK-NEXT: 	msr	SCTLR2MASK_EL2, x3
-# CHECK-NEXT: 	msr	SCTLR2MASK_EL12, x3
-# CHECK-NEXT: 	msr	CPACRALIAS_EL1, x3
-# CHECK-NEXT: 	msr	SCTLRALIAS_EL1, x3
-# CHECK-NEXT: 	msr	SCTLR2ALIAS_EL1, x3
-# CHECK-NEXT: 	msr	TCRMASK_EL1, x3
-# CHECK-NEXT: 	msr	TCRMASK_EL2, x3
-# CHECK-NEXT: 	msr	TCRMASK_EL12, x3
-# CHECK-NEXT: 	msr	TCR2MASK_EL1, x3
-# CHECK-NEXT: 	msr	TCR2MASK_EL2, x3
-# CHECK-NEXT: 	msr	TCR2MASK_EL12, x3
-# CHECK-NEXT: 	msr	TCRALIAS_EL1, x3
-# CHECK-NEXT: 	msr	TCR2ALIAS_EL1, x3
-# CHECK-NEXT: 	msr	ACTLRMASK_EL1, x3
-# CHECK-NEXT: 	msr	ACTLRMASK_EL2, x3
-# CHECK-NEXT: 	msr	ACTLRMASK_EL12, x3
-# CHECK-NEXT: 	msr	ACTLRALIAS_EL1, x3
diff --git a/llvm/test/MC/Disassembler/AArch64/armv9.6a-statistical-profiling.txt b/llvm/test/MC/Disassembler/AArch64/armv9.6a-statistical-profiling.txt
deleted file mode 100644
index 446e2f0eb05c4..0000000000000
--- a/llvm/test/MC/Disassembler/AArch64/armv9.6a-statistical-profiling.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-# RUN: llvm-mc -triple aarch64 -disassemble < %s | FileCheck %s
-
-[0x60,0x9a,0x1d,0xd5]
-# CHECK: msr PMBSR_EL12, x0
-[0x60,0x9a,0x1c,0xd5]
-# CHECK: msr PMBSR_EL2, x0
-[0x60,0x9a,0x1e,0xd5]
-# CHECK: msr PMBSR_EL3, x0
-
-[0x60,0x9a,0x3d,0xd5]
-# CHECK: mrs x0, PMBSR_EL12
-[0x60,0x9a,0x3c,0xd5]
-# CHECK: mrs x0, PMBSR_EL2
-[0x60,0x9a,0x3e,0xd5]
-# CHECK: mrs x0, PMBSR_EL3
diff --git a/llvm/test/MC/Disassembler/AArch64/armv9.6a-trbe-exception.txt b/llvm/test/MC/Disassembler/AArch64/armv9.6a-trbe-exception.txt
deleted file mode 100644
index 4b39e107538d9..0000000000000
--- a/llvm/test/MC/Disassembler/AArch64/armv9.6a-trbe-exception.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-# RUN: llvm-mc -triple aarch64 -disassemble < %s | FileCheck %s
-
-[0x60,0x9b,0x1d,0xd5]
-# CHECK: msr TRBSR_EL12, x0
-[0x60,0x9b,0x1c,0xd5]
-# CHECK: msr TRBSR_EL2, x0
-[0x60,0x9b,0x1e,0xd5]
-# CHECK: msr TRBSR_EL3, x0
-
-[0x60,0x9b,0x3d,0xd5]
-# CHECK: mrs x0, TRBSR_EL12
-[0x60,0x9b,0x3c,0xd5]
-# CHECK: mrs x0, TRBSR_EL2
-[0x60,0x9b,0x3e,0xd5]
-# CHECK: mrs x0, TRBSR_EL3

>From a788f61caffe1b6d9187e8524ae3d4fe12d37441 Mon Sep 17 00:00:00 2001
From: Jonathan Thackray <jonathan.thackray at arm.com>
Date: Mon, 30 Jun 2025 16:51:11 +0100
Subject: [PATCH 2/2] fixup! [AArch64][llvm] Unify AArch64 tests into a single
 file (1/4) (NFC)

This is a series of patches (1/4) to unify assembly/disassembly of
recent AArch64 tests into a single file. The aim is to improve
consistency, so that all instructions and system registers are
thoroughly tested, and future test cases will be in a unified format.

This patch:
 * unifies errorless .s and .txt tests into a single file
 * remove .txt tests which don't have feature requirements
 * makes the .s tests have a roundabout run line to test both encoding and assembly

Co-authored-by: Virginia Cangelosi <virginia.cangelosi at arm.com>
---
 llvm/test/MC/AArch64/armv8.9a-ats1a.s         |  4 +-
 llvm/test/MC/AArch64/armv9.4a-ebep.s          | 10 ++--
 llvm/test/MC/AArch64/armv9.5a-e3dse.s         |  4 +-
 llvm/test/MC/AArch64/armv9.5a-fgwte3.s        |  6 +--
 llvm/test/MC/AArch64/armv9.5a-hacdbs.s        |  7 ++-
 llvm/test/MC/AArch64/armv9.5a-hdbss.s         |  6 +--
 llvm/test/MC/AArch64/armv9.5a-spmu2.s         |  4 +-
 llvm/test/MC/AArch64/armv9.5a-step2.s         |  4 +-
 llvm/test/MC/AArch64/armv9.6a-srmask.s        | 50 +++++++++++++++++--
 .../AArch64/armv9.6a-statistical-profiling.s  |  4 +-
 .../test/MC/AArch64/armv9.6a-trbe-exception.s |  5 +-
 11 files changed, 67 insertions(+), 37 deletions(-)

diff --git a/llvm/test/MC/AArch64/armv8.9a-ats1a.s b/llvm/test/MC/AArch64/armv8.9a-ats1a.s
index d61d651b804e7..21b960e55d620 100644
--- a/llvm/test/MC/AArch64/armv8.9a-ats1a.s
+++ b/llvm/test/MC/AArch64/armv8.9a-ats1a.s
@@ -1,9 +1,7 @@
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
 // RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
-// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefixes=CHECK-UNKNOWN
 // Disassemble encoding and check the re-encoding (-show-encoding) matches.
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
diff --git a/llvm/test/MC/AArch64/armv9.4a-ebep.s b/llvm/test/MC/AArch64/armv9.4a-ebep.s
index adda45f1a56e7..2c7c7147333c0 100644
--- a/llvm/test/MC/AArch64/armv9.4a-ebep.s
+++ b/llvm/test/MC/AArch64/armv9.4a-ebep.s
@@ -1,9 +1,7 @@
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
 // RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:        | llvm-objdump -d --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-INST
-// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:   | llvm-objdump -d --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// RUN:        | llvm-objdump -d --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-UNKNOWN
 // Disassemble encoding and check the re-encoding (-show-encoding) matches.
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
@@ -11,27 +9,31 @@
 // RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
 
 
-
 mrs x2, PM
 // CHECK-INST: mrs x2, PM
 // CHECK-ENCODING: encoding: [0x22,0x43,0x38,0xd5]
 // CHECK-UNKNOWN:  d5384322 mrs x2, PM
+
 mrs x3, PM
 // CHECK-INST: mrs x3, PM
 // CHECK-ENCODING: encoding: [0x23,0x43,0x38,0xd5]
 // CHECK-UNKNOWN:  d5384323 mrs x3, PM
+
 msr PM, x3
 // CHECK-INST: msr PM, x3
 // CHECK-ENCODING: encoding: [0x23,0x43,0x18,0xd5]
 // CHECK-UNKNOWN:  d5184323 msr PM, x3
+
 msr PM, x6
 // CHECK-INST: msr PM, x6
 // CHECK-ENCODING: encoding: [0x26,0x43,0x18,0xd5]
 // CHECK-UNKNOWN:  d5184326 msr PM, x6
+
 msr PM, #0
 // CHECK-INST: msr PM, #0
 // CHECK-ENCODING: encoding: [0x1f,0x42,0x01,0xd5]
 // CHECK-UNKNOWN:  d501421f msr PM, #0
+
 msr PM, #1
 // CHECK-INST: msr PM, #1
 // CHECK-ENCODING: encoding: [0x1f,0x43,0x01,0xd5]
diff --git a/llvm/test/MC/AArch64/armv9.5a-e3dse.s b/llvm/test/MC/AArch64/armv9.5a-e3dse.s
index 1002ac1433178..9d9798a32c8c0 100644
--- a/llvm/test/MC/AArch64/armv9.5a-e3dse.s
+++ b/llvm/test/MC/AArch64/armv9.5a-e3dse.s
@@ -1,9 +1,7 @@
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
 // RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
-// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
 // Disassemble encoding and check the re-encoding (-show-encoding) matches.
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
diff --git a/llvm/test/MC/AArch64/armv9.5a-fgwte3.s b/llvm/test/MC/AArch64/armv9.5a-fgwte3.s
index 0e2976b4096d8..6546d517d208a 100644
--- a/llvm/test/MC/AArch64/armv9.5a-fgwte3.s
+++ b/llvm/test/MC/AArch64/armv9.5a-fgwte3.s
@@ -1,9 +1,7 @@
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
 // RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
-// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
 // Disassemble encoding and check the re-encoding (-show-encoding) matches.
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
@@ -11,11 +9,11 @@
 // RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
 
 
-
 mrs x0, FGWTE3_EL3
 // CHECK-INST: mrs x0, FGWTE3_EL3
 // CHECK-ENCODING: encoding: [0xa0,0x11,0x3e,0xd5]
 // CHECK-UNKNOWN:  d53e11a0 mrs x0, FGWTE3_EL3
+
 msr FGWTE3_EL3, x0
 // CHECK-INST: msr FGWTE3_EL3, x0
 // CHECK-ENCODING: encoding: [0xa0,0x11,0x1e,0xd5]
diff --git a/llvm/test/MC/AArch64/armv9.5a-hacdbs.s b/llvm/test/MC/AArch64/armv9.5a-hacdbs.s
index 44699a948013d..e1d1aaace574f 100644
--- a/llvm/test/MC/AArch64/armv9.5a-hacdbs.s
+++ b/llvm/test/MC/AArch64/armv9.5a-hacdbs.s
@@ -1,9 +1,7 @@
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
 // RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
-// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
 // Disassemble encoding and check the re-encoding (-show-encoding) matches.
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
@@ -11,11 +9,11 @@
 // RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
 
 
-
 mrs x0, HACDBSBR_EL2
 // CHECK-INST: mrs x0, HACDBSBR_EL2
 // CHECK-ENCODING: encoding: [0x80,0x23,0x3c,0xd5]
 // CHECK-UNKNOWN:  d53c2380 mrs x0, HACDBSBR_EL2
+
 msr HACDBSBR_EL2, x0
 // CHECK-INST: msr HACDBSBR_EL2, x0
 // CHECK-ENCODING: encoding: [0x80,0x23,0x1c,0xd5]
@@ -25,6 +23,7 @@ mrs x0, HACDBSCONS_EL2
 // CHECK-INST: mrs x0, HACDBSCONS_EL2
 // CHECK-ENCODING: encoding: [0xa0,0x23,0x3c,0xd5]
 // CHECK-UNKNOWN:  d53c23a0 mrs x0, HACDBSCONS_EL2
+
 msr HACDBSCONS_EL2, x0
 // CHECK-INST: msr HACDBSCONS_EL2, x0
 // CHECK-ENCODING: encoding: [0xa0,0x23,0x1c,0xd5]
diff --git a/llvm/test/MC/AArch64/armv9.5a-hdbss.s b/llvm/test/MC/AArch64/armv9.5a-hdbss.s
index 4582ed245beb9..3e18fe32aa620 100644
--- a/llvm/test/MC/AArch64/armv9.5a-hdbss.s
+++ b/llvm/test/MC/AArch64/armv9.5a-hdbss.s
@@ -1,9 +1,7 @@
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
 // RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
-// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
 // Disassemble encoding and check the re-encoding (-show-encoding) matches.
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
@@ -16,6 +14,7 @@ mrs x0, HDBSSBR_EL2
 // CHECK-INST: mrs x0, HDBSSBR_EL2
 // CHECK-ENCODING: encoding: [0x40,0x23,0x3c,0xd5]
 // CHECK-UNKNOWN:  d53c2340 mrs x0, HDBSSBR_EL2
+
 msr HDBSSBR_EL2, x0
 // CHECK-INST: msr HDBSSBR_EL2, x0
 // CHECK-ENCODING: encoding: [0x40,0x23,0x1c,0xd5]
@@ -25,6 +24,7 @@ mrs x0, HDBSSPROD_EL2
 // CHECK-INST: mrs x0, HDBSSPROD_EL2
 // CHECK-ENCODING: encoding: [0x60,0x23,0x3c,0xd5]
 // CHECK-UNKNOWN:  d53c2360 mrs x0, HDBSSPROD_EL2
+
 msr HDBSSPROD_EL2, x0
 // CHECK-INST: msr HDBSSPROD_EL2, x0
 // CHECK-ENCODING: encoding: [0x60,0x23,0x1c,0xd5]
diff --git a/llvm/test/MC/AArch64/armv9.5a-spmu2.s b/llvm/test/MC/AArch64/armv9.5a-spmu2.s
index c476cb642faf5..51770981ef9bf 100644
--- a/llvm/test/MC/AArch64/armv9.5a-spmu2.s
+++ b/llvm/test/MC/AArch64/armv9.5a-spmu2.s
@@ -1,9 +1,7 @@
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
 // RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
-// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
 // Disassemble encoding and check the re-encoding (-show-encoding) matches.
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
diff --git a/llvm/test/MC/AArch64/armv9.5a-step2.s b/llvm/test/MC/AArch64/armv9.5a-step2.s
index eda0050111db7..5d0768502785c 100644
--- a/llvm/test/MC/AArch64/armv9.5a-step2.s
+++ b/llvm/test/MC/AArch64/armv9.5a-step2.s
@@ -1,9 +1,7 @@
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
 // RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
-// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
 // Disassemble encoding and check the re-encoding (-show-encoding) matches.
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
diff --git a/llvm/test/MC/AArch64/armv9.6a-srmask.s b/llvm/test/MC/AArch64/armv9.6a-srmask.s
index 1829dc380be69..fb91993bad135 100644
--- a/llvm/test/MC/AArch64/armv9.6a-srmask.s
+++ b/llvm/test/MC/AArch64/armv9.6a-srmask.s
@@ -1,9 +1,7 @@
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
 // RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
-// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
 // Disassemble encoding and check the re-encoding (-show-encoding) matches.
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
@@ -16,94 +14,117 @@ mrs x3, SCTLRMASK_EL1
 // CHECK-INST: mrs x3, SCTLRMASK_EL1
 // CHECK-ENCODING: encoding: [0x03,0x14,0x38,0xd5]
 // CHECK-UNKNOWN:  d5381403 mrs x3, SCTLRMASK_EL1
+
 mrs x3, SCTLRMASK_EL2
 // CHECK-INST: mrs x3, SCTLRMASK_EL2
 // CHECK-ENCODING: encoding: [0x03,0x14,0x3c,0xd5]
 // CHECK-UNKNOWN:  d53c1403 mrs x3, SCTLRMASK_EL2
+
 mrs x3, SCTLRMASK_EL12
 // CHECK-INST: mrs x3, SCTLRMASK_EL12
 // CHECK-ENCODING: encoding: [0x03,0x14,0x3d,0xd5]
 // CHECK-UNKNOWN:  d53d1403 mrs x3, SCTLRMASK_EL12
+
 mrs x3, CPACRMASK_EL1
 // CHECK-INST: mrs x3, CPACRMASK_EL1
 // CHECK-ENCODING: encoding: [0x43,0x14,0x38,0xd5]
 // CHECK-UNKNOWN:  d5381443 mrs x3, CPACRMASK_EL1
+
 mrs x3, CPTRMASK_EL2
 // CHECK-INST: mrs x3, CPTRMASK_EL2
 // CHECK-ENCODING: encoding: [0x43,0x14,0x3c,0xd5]
 // CHECK-UNKNOWN:  d53c1443 mrs x3, CPTRMASK_EL2
+
 mrs x3, CPACRMASK_EL12
 // CHECK-INST: mrs x3, CPACRMASK_EL12
 // CHECK-ENCODING: encoding: [0x43,0x14,0x3d,0xd5]
 // CHECK-UNKNOWN:  d53d1443 mrs x3, CPACRMASK_EL12
+
 mrs x3, SCTLR2MASK_EL1
 // CHECK-INST: mrs x3, SCTLR2MASK_EL1
 // CHECK-ENCODING: encoding: [0x63,0x14,0x38,0xd5]
 // CHECK-UNKNOWN:  d5381463 mrs x3, SCTLR2MASK_EL1
+
 mrs x3, SCTLR2MASK_EL2
 // CHECK-INST: mrs x3, SCTLR2MASK_EL2
 // CHECK-ENCODING: encoding: [0x63,0x14,0x3c,0xd5]
 // CHECK-UNKNOWN:  d53c1463 mrs x3, SCTLR2MASK_EL2
+
 mrs x3, SCTLR2MASK_EL12
 // CHECK-INST: mrs x3, SCTLR2MASK_EL12
 // CHECK-ENCODING: encoding: [0x63,0x14,0x3d,0xd5]
 // CHECK-UNKNOWN:  d53d1463 mrs x3, SCTLR2MASK_EL12
+
 mrs x3, CPACRALIAS_EL1
 // CHECK-INST: mrs x3, CPACRALIAS_EL1
 // CHECK-ENCODING: encoding: [0x83,0x14,0x38,0xd5]
 // CHECK-UNKNOWN:  d5381483 mrs x3, CPACRALIAS_EL1
+
 mrs x3, SCTLRALIAS_EL1
 // CHECK-INST: mrs x3, SCTLRALIAS_EL1
 // CHECK-ENCODING: encoding: [0xc3,0x14,0x38,0xd5]
 // CHECK-UNKNOWN:  d53814c3 mrs x3, SCTLRALIAS_EL1
+
 mrs x3, SCTLR2ALIAS_EL1
 // CHECK-INST: mrs x3, SCTLR2ALIAS_EL1
 // CHECK-ENCODING: encoding: [0xe3,0x14,0x38,0xd5]
 // CHECK-UNKNOWN:  d53814e3 mrs x3, SCTLR2ALIAS_EL1
+
 mrs x3, TCRMASK_EL1
 // CHECK-INST: mrs x3, TCRMASK_EL1
 // CHECK-ENCODING: encoding: [0x43,0x27,0x38,0xd5]
 // CHECK-UNKNOWN:  d5382743 mrs x3, TCRMASK_EL1
+
 mrs x3, TCRMASK_EL2
 // CHECK-INST: mrs x3, TCRMASK_EL2
 // CHECK-ENCODING: encoding: [0x43,0x27,0x3c,0xd5]
 // CHECK-UNKNOWN:  d53c2743 mrs x3, TCRMASK_EL2
+
 mrs x3, TCRMASK_EL12
 // CHECK-INST: mrs x3, TCRMASK_EL12
 // CHECK-ENCODING: encoding: [0x43,0x27,0x3d,0xd5]
 // CHECK-UNKNOWN:  d53d2743 mrs x3, TCRMASK_EL12
+
 mrs x3, TCR2MASK_EL1
 // CHECK-INST: mrs x3, TCR2MASK_EL1
 // CHECK-ENCODING: encoding: [0x63,0x27,0x38,0xd5]
 // CHECK-UNKNOWN:  d5382763 mrs x3, TCR2MASK_EL1
+
 mrs x3, TCR2MASK_EL2
 // CHECK-INST: mrs x3, TCR2MASK_EL2
 // CHECK-ENCODING: encoding: [0x63,0x27,0x3c,0xd5]
 // CHECK-UNKNOWN:  d53c2763 mrs x3, TCR2MASK_EL2
+
 mrs x3, TCR2MASK_EL12
 // CHECK-INST: mrs x3, TCR2MASK_EL12
 // CHECK-ENCODING: encoding: [0x63,0x27,0x3d,0xd5]
 // CHECK-UNKNOWN:  d53d2763 mrs x3, TCR2MASK_EL12
+
 mrs x3, TCRALIAS_EL1
 // CHECK-INST: mrs x3, TCRALIAS_EL1
 // CHECK-ENCODING: encoding: [0xc3,0x27,0x38,0xd5]
 // CHECK-UNKNOWN:  d53827c3 mrs x3, TCRALIAS_EL1
+
 mrs x3, TCR2ALIAS_EL1
 // CHECK-INST: mrs x3, TCR2ALIAS_EL1
 // CHECK-ENCODING: encoding: [0xe3,0x27,0x38,0xd5]
 // CHECK-UNKNOWN:  d53827e3 mrs x3, TCR2ALIAS_EL1
+
 mrs x3, ACTLRMASK_EL1
 // CHECK-INST: mrs x3, ACTLRMASK_EL1
 // CHECK-ENCODING: encoding: [0x23,0x14,0x38,0xd5]
 // CHECK-UNKNOWN:  d5381423 mrs x3, ACTLRMASK_EL1
+
 mrs x3, ACTLRMASK_EL2
 // CHECK-INST: mrs x3, ACTLRMASK_EL2
 // CHECK-ENCODING: encoding: [0x23,0x14,0x3c,0xd5]
 // CHECK-UNKNOWN:  d53c1423 mrs x3, ACTLRMASK_EL2
+
 mrs x3, ACTLRMASK_EL12
 // CHECK-INST: mrs x3, ACTLRMASK_EL12
 // CHECK-ENCODING: encoding: [0x23,0x14,0x3d,0xd5]
 // CHECK-UNKNOWN:  d53d1423 mrs x3, ACTLRMASK_EL12
+
 mrs x3, ACTLRALIAS_EL1
 // CHECK-INST: mrs x3, ACTLRALIAS_EL1
 // CHECK-ENCODING: encoding: [0xa3,0x14,0x38,0xd5]
@@ -113,94 +134,117 @@ msr SCTLRMASK_EL1, x3
 // CHECK-INST: msr SCTLRMASK_EL1, x3
 // CHECK-ENCODING: encoding: [0x03,0x14,0x18,0xd5]
 // CHECK-UNKNOWN:  d5181403 msr SCTLRMASK_EL1, x3
+
 msr SCTLRMASK_EL2, x3
 // CHECK-INST: msr SCTLRMASK_EL2, x3
 // CHECK-ENCODING: encoding: [0x03,0x14,0x1c,0xd5]
 // CHECK-UNKNOWN:  d51c1403 msr SCTLRMASK_EL2, x3
+
 msr SCTLRMASK_EL12, x3
 // CHECK-INST: msr SCTLRMASK_EL12, x3
 // CHECK-ENCODING: encoding: [0x03,0x14,0x1d,0xd5]
 // CHECK-UNKNOWN:  d51d1403 msr SCTLRMASK_EL12, x3
+
 msr CPACRMASK_EL1, x3
 // CHECK-INST: msr CPACRMASK_EL1, x3
 // CHECK-ENCODING: encoding: [0x43,0x14,0x18,0xd5]
 // CHECK-UNKNOWN:  d5181443 msr CPACRMASK_EL1, x3
+
 msr CPTRMASK_EL2, x3
 // CHECK-INST: msr CPTRMASK_EL2, x3
 // CHECK-ENCODING: encoding: [0x43,0x14,0x1c,0xd5]
 // CHECK-UNKNOWN:  d51c1443 msr CPTRMASK_EL2, x3
+
 msr CPACRMASK_EL12, x3
 // CHECK-INST: msr CPACRMASK_EL12, x3
 // CHECK-ENCODING: encoding: [0x43,0x14,0x1d,0xd5]
 // CHECK-UNKNOWN:  d51d1443 msr CPACRMASK_EL12, x3
+
 msr SCTLR2MASK_EL1, x3
 // CHECK-INST: msr SCTLR2MASK_EL1, x3
 // CHECK-ENCODING: encoding: [0x63,0x14,0x18,0xd5]
 // CHECK-UNKNOWN:  d5181463 msr SCTLR2MASK_EL1, x3
+
 msr SCTLR2MASK_EL2, x3
 // CHECK-INST: msr SCTLR2MASK_EL2, x3
 // CHECK-ENCODING: encoding: [0x63,0x14,0x1c,0xd5]
 // CHECK-UNKNOWN:  d51c1463 msr SCTLR2MASK_EL2, x3
+
 msr SCTLR2MASK_EL12, x3
 // CHECK-INST: msr SCTLR2MASK_EL12, x3
 // CHECK-ENCODING: encoding: [0x63,0x14,0x1d,0xd5]
 // CHECK-UNKNOWN:  d51d1463 msr SCTLR2MASK_EL12, x3
+
 msr CPACRALIAS_EL1, x3
 // CHECK-INST: msr CPACRALIAS_EL1, x3
 // CHECK-ENCODING: encoding: [0x83,0x14,0x18,0xd5]
 // CHECK-UNKNOWN:  d5181483 msr CPACRALIAS_EL1, x3
+
 msr SCTLRALIAS_EL1, x3
 // CHECK-INST: msr SCTLRALIAS_EL1, x3
 // CHECK-ENCODING: encoding: [0xc3,0x14,0x18,0xd5]
 // CHECK-UNKNOWN:  d51814c3 msr SCTLRALIAS_EL1, x3
+
 msr SCTLR2ALIAS_EL1, x3
 // CHECK-INST: msr SCTLR2ALIAS_EL1, x3
 // CHECK-ENCODING: encoding: [0xe3,0x14,0x18,0xd5]
 // CHECK-UNKNOWN:  d51814e3 msr SCTLR2ALIAS_EL1, x3
+
 msr TCRMASK_EL1, x3
 // CHECK-INST: msr TCRMASK_EL1, x3
 // CHECK-ENCODING: encoding: [0x43,0x27,0x18,0xd5]
 // CHECK-UNKNOWN:  d5182743 msr TCRMASK_EL1, x3
+
 msr TCRMASK_EL2, x3
 // CHECK-INST: msr TCRMASK_EL2, x3
 // CHECK-ENCODING: encoding: [0x43,0x27,0x1c,0xd5]
 // CHECK-UNKNOWN:  d51c2743 msr TCRMASK_EL2, x3
+
 msr TCRMASK_EL12, x3
 // CHECK-INST: msr TCRMASK_EL12, x3
 // CHECK-ENCODING: encoding: [0x43,0x27,0x1d,0xd5]
 // CHECK-UNKNOWN:  d51d2743 msr TCRMASK_EL12, x3
+
 msr TCR2MASK_EL1, x3
 // CHECK-INST: msr TCR2MASK_EL1, x3
 // CHECK-ENCODING: encoding: [0x63,0x27,0x18,0xd5]
 // CHECK-UNKNOWN:  d5182763 msr TCR2MASK_EL1, x3
+
 msr TCR2MASK_EL2, x3
 // CHECK-INST: msr TCR2MASK_EL2, x3
 // CHECK-ENCODING: encoding: [0x63,0x27,0x1c,0xd5]
 // CHECK-UNKNOWN:  d51c2763 msr TCR2MASK_EL2, x3
+
 msr TCR2MASK_EL12, x3
 // CHECK-INST: msr TCR2MASK_EL12, x3
 // CHECK-ENCODING: encoding: [0x63,0x27,0x1d,0xd5]
 // CHECK-UNKNOWN:  d51d2763 msr TCR2MASK_EL12, x3
+
 msr TCRALIAS_EL1, x3
 // CHECK-INST: msr TCRALIAS_EL1, x3
 // CHECK-ENCODING: encoding: [0xc3,0x27,0x18,0xd5]
 // CHECK-UNKNOWN:  d51827c3 msr TCRALIAS_EL1, x3
+
 msr TCR2ALIAS_EL1, x3
 // CHECK-INST: msr TCR2ALIAS_EL1, x3
 // CHECK-ENCODING: encoding: [0xe3,0x27,0x18,0xd5]
 // CHECK-UNKNOWN:  d51827e3 msr TCR2ALIAS_EL1, x3
+
 msr ACTLRMASK_EL1, x3
 // CHECK-INST: msr ACTLRMASK_EL1, x3
 // CHECK-ENCODING: encoding: [0x23,0x14,0x18,0xd5]
 // CHECK-UNKNOWN:  d5181423 msr ACTLRMASK_EL1, x3
+
 msr ACTLRMASK_EL2, x3
 // CHECK-INST: msr ACTLRMASK_EL2, x3
 // CHECK-ENCODING: encoding: [0x23,0x14,0x1c,0xd5]
 // CHECK-UNKNOWN:  d51c1423 msr ACTLRMASK_EL2, x3
+
 msr ACTLRMASK_EL12, x3
 // CHECK-INST: msr ACTLRMASK_EL12, x3
 // CHECK-ENCODING: encoding: [0x23,0x14,0x1d,0xd5]
 // CHECK-UNKNOWN:  d51d1423 msr ACTLRMASK_EL12, x3
+
 msr ACTLRALIAS_EL1, x3
 // CHECK-INST: msr ACTLRALIAS_EL1, x3
 // CHECK-ENCODING: encoding: [0xa3,0x14,0x18,0xd5]
diff --git a/llvm/test/MC/AArch64/armv9.6a-statistical-profiling.s b/llvm/test/MC/AArch64/armv9.6a-statistical-profiling.s
index 554a5ea1dc350..4ef6367c62ea0 100644
--- a/llvm/test/MC/AArch64/armv9.6a-statistical-profiling.s
+++ b/llvm/test/MC/AArch64/armv9.6a-statistical-profiling.s
@@ -1,9 +1,7 @@
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
 // RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
-// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
 // Disassemble encoding and check the re-encoding (-show-encoding) matches.
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
diff --git a/llvm/test/MC/AArch64/armv9.6a-trbe-exception.s b/llvm/test/MC/AArch64/armv9.6a-trbe-exception.s
index fe127b3197c97..fb795aa8c64ca 100644
--- a/llvm/test/MC/AArch64/armv9.6a-trbe-exception.s
+++ b/llvm/test/MC/AArch64/armv9.6a-trbe-exception.s
@@ -1,9 +1,7 @@
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
 // RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
-// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
-// RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
 // Disassemble encoding and check the re-encoding (-show-encoding) matches.
 // RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
 // RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
@@ -27,7 +25,6 @@ msr trbsr_el3, x0
 // CHECK-ENCODING: encoding: [0x60,0x9b,0x1e,0xd5]
 // CHECK-UNKNOWN:  d51e9b60 msr TRBSR_EL3, x0
 
-
 mrs x0, trbsr_el12
 // CHECK-INST: mrs x0, TRBSR_EL12
 // CHECK-ENCODING: encoding: [0x60,0x9b,0x3d,0xd5]



More information about the llvm-commits mailing list