[llvm] 67ff5ba - [AArch64] Add assembly/disaasembly of atomic ld/st (#112892)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 07:18:25 PDT 2024


Author: Lukacma
Date: 2024-10-21T15:18:19+01:00
New Revision: 67ff5ba9af9754261abe11d762af11532a816126

URL: https://github.com/llvm/llvm-project/commit/67ff5ba9af9754261abe11d762af11532a816126
DIFF: https://github.com/llvm/llvm-project/commit/67ff5ba9af9754261abe11d762af11532a816126.diff

LOG: [AArch64] Add assembly/disaasembly of atomic ld/st (#112892)

This patch adds assembly/disassembly for the following instructions:
   ldfadd{a,al,l,}, ldbfadd{a,al,l,}
   ldfmax{a,al,l,}, ldbfmax{a,al,l,}
   ldfmaxnm{a,al,l,}, ldbfmaxnm{a,al,l,}
   ldfmin{a,al,l,}, ldbfmin{a,al,l,}
   ldfminnm{a,al,l,} ldbfminnm{a,al,l,}
   stfadd{l,}, stbfadd{l,}
   stfmax{l,}, stbfmax{l,}
   stfmaxnm{l,}, stbfmaxnm{l,}
   stfmin{l,}, stbfmin{l,}
   stfminnm{l,}, stbfminnm{l,}

According to [1]

[1]https://developer.arm.com/documentation/ddi0602

Co-authored-by: Spencer Abson
[spencer.abson at arm.com](mailto:spencer.abson at arm.com)
Co-authored-by: Caroline Concatto
[caroline.concatto at arm.com](mailto:caroline.concatto at arm.com)

Added: 
    llvm/test/MC/AArch64/LSFE/directive-arch-negative.s
    llvm/test/MC/AArch64/LSFE/directive-arch.s
    llvm/test/MC/AArch64/LSFE/directive-arch_extension-negative.s
    llvm/test/MC/AArch64/LSFE/directive-arch_extension.s
    llvm/test/MC/AArch64/LSFE/directive-cpu-negative.s
    llvm/test/MC/AArch64/LSFE/directive-cpu.s
    llvm/test/MC/AArch64/LSFE/ldfadd-diagnostics.s
    llvm/test/MC/AArch64/LSFE/ldfadd.s
    llvm/test/MC/AArch64/LSFE/ldfmax-diagnostics.s
    llvm/test/MC/AArch64/LSFE/ldfmax.s
    llvm/test/MC/AArch64/LSFE/ldfmaxnm-diagnostics.s
    llvm/test/MC/AArch64/LSFE/ldfmaxnm.s
    llvm/test/MC/AArch64/LSFE/ldfmin-diagnostics.s
    llvm/test/MC/AArch64/LSFE/ldfmin.s
    llvm/test/MC/AArch64/LSFE/ldfminnm-diagnostics.s
    llvm/test/MC/AArch64/LSFE/ldfminnm.s
    llvm/test/MC/AArch64/LSFE/stfadd-diagnostics.s
    llvm/test/MC/AArch64/LSFE/stfadd.s
    llvm/test/MC/AArch64/LSFE/stfmax-diagnostics.s
    llvm/test/MC/AArch64/LSFE/stfmax.s
    llvm/test/MC/AArch64/LSFE/stfmaxnm-diagnostics.s
    llvm/test/MC/AArch64/LSFE/stfmaxnm.s
    llvm/test/MC/AArch64/LSFE/stfmin-diagnostics.s
    llvm/test/MC/AArch64/LSFE/stfmin.s
    llvm/test/MC/AArch64/LSFE/stfminnm-diagnostics.s
    llvm/test/MC/AArch64/LSFE/stfminnm.s

Modified: 
    llvm/lib/Target/AArch64/AArch64InstrFormats.td
    llvm/lib/Target/AArch64/AArch64InstrInfo.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AArch64/AArch64InstrFormats.td b/llvm/lib/Target/AArch64/AArch64InstrFormats.td
index 1d1d9b5512cfc7..4b24b166143dca 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrFormats.td
+++ b/llvm/lib/Target/AArch64/AArch64InstrFormats.td
@@ -12626,3 +12626,64 @@ def : TokenAlias<".H", ".h">;
 def : TokenAlias<".S", ".s">;
 def : TokenAlias<".D", ".d">;
 def : TokenAlias<".Q", ".q">;
+
+//----------------------------------------------------------------------------
+// 2024 Armv9.6 Extensions
+//----------------------------------------------------------------------------
+
+let mayLoad = 1, mayStore = 1 in
+class BaseAtomicFPLoad<RegisterClass regtype, bits<2> sz, bits<2> AR,
+                     bits<3> op0, string asm>
+: I<(outs regtype:$Rt),
+    (ins regtype:$Rs, GPR64sp:$Rn),
+    asm, "\t$Rs, $Rt, [$Rn]","", []>,
+  Sched<[]> {
+  bits<5> Rt;
+  bits<5> Rs;
+  bits<5> Rn;
+  let Inst{31-30} = sz;
+  let Inst{29-24} = 0b111100;
+  let Inst{23-22} = AR;
+  let Inst{21}    = 0b1;
+  let Inst{20-16} = Rs;
+  let Inst{15}    = 0b0;
+  let Inst{14-12} = op0;
+  let Inst{11-10} = 0b00;
+  let Inst{9-5}   = Rn;
+  let Inst{4-0}   = Rt;
+}
+
+multiclass AtomicFPLoad<bits<2> AR, bits<3> op0, string asm> {
+  def D : BaseAtomicFPLoad<FPR64, 0b11, AR, op0, asm>;
+  def S : BaseAtomicFPLoad<FPR32, 0b10, AR, op0, asm>;
+  def H : BaseAtomicFPLoad<FPR16, 0b01, AR, op0, asm>;
+}
+
+let mayLoad = 1, mayStore = 1 in
+class BaseAtomicFPStore<RegisterClass regtype, bits<2> sz, bit R,
+                      bits<3> op0, string asm>
+: I<(outs),
+    (ins  regtype:$Rs, GPR64sp:$Rn),
+    asm, "\t$Rs,  [$Rn]",
+    "", []>,
+  Sched<[]> {
+  bits<5> Rt;
+  bits<5> Rs;
+  bits<5> Rn;
+  let Inst{31-30} = sz;
+  let Inst{29-23} = 0b1111000;
+  let Inst{22}    = R;
+  let Inst{21}    = 0b1;
+  let Inst{20-16} = Rs;
+  let Inst{15}    = 0b1;
+  let Inst{14-12} = op0;
+  let Inst{11-10} = 0b00;
+  let Inst{9-5}   = Rn;
+  let Inst{4-0}   = 0b11111;
+}
+
+multiclass AtomicFPStore<bit R, bits<3> op0, string asm> {
+  def D : BaseAtomicFPStore<FPR64, 0b11, R, op0, asm>;
+  def S : BaseAtomicFPStore<FPR32, 0b10, R, op0, asm>;
+  def H : BaseAtomicFPStore<FPR16, 0b01, R, op0, asm>;
+}

diff  --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.td b/llvm/lib/Target/AArch64/AArch64InstrInfo.td
index 76a1029415b16f..1eb93066cfd876 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.td
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.td
@@ -10299,6 +10299,78 @@ defm : PromoteBinaryv8f16Tov4f32<any_fdiv, FDIVv4f32>;
 defm : PromoteBinaryv8f16Tov4f32<any_fmul, FMULv4f32>;
 defm : PromoteBinaryv8f16Tov4f32<any_fsub, FSUBv4f32>;
 
+//===-----------------------------------------------------===//
+// Atomic floating-point in-memory instructions (FEAT_LSFE)
+//===-----------------------------------------------------===//
+
+let Predicates = [HasLSFE] in {
+  // Floating-point Atomic Load
+  defm LDFADDA    : AtomicFPLoad<0b10, 0b000, "ldfadda">;
+  defm LDFADDAL   : AtomicFPLoad<0b11, 0b000, "ldfaddal">;
+  defm LDFADD     : AtomicFPLoad<0b00, 0b000, "ldfadd">;
+  defm LDFADDL    : AtomicFPLoad<0b01, 0b000, "ldfaddl">;
+  defm LDFMAXA    : AtomicFPLoad<0b10, 0b100, "ldfmaxa">;
+  defm LDFMAXAL   : AtomicFPLoad<0b11, 0b100, "ldfmaxal">;
+  defm LDFMAX     : AtomicFPLoad<0b00, 0b100, "ldfmax">;
+  defm LDFMAXL    : AtomicFPLoad<0b01, 0b100, "ldfmaxl">;
+  defm LDFMINA    : AtomicFPLoad<0b10, 0b101, "ldfmina">;
+  defm LDFMINAL   : AtomicFPLoad<0b11, 0b101, "ldfminal">;
+  defm LDFMIN     : AtomicFPLoad<0b00, 0b101, "ldfmin">;
+  defm LDFMINL    : AtomicFPLoad<0b01, 0b101, "ldfminl">;
+  defm LDFMAXNMA  : AtomicFPLoad<0b10, 0b110, "ldfmaxnma">;
+  defm LDFMAXNMAL : AtomicFPLoad<0b11, 0b110, "ldfmaxnmal">;
+  defm LDFMAXNM   : AtomicFPLoad<0b00, 0b110, "ldfmaxnm">;
+  defm LDFMAXNML  : AtomicFPLoad<0b01, 0b110, "ldfmaxnml">;
+  defm LDFMINNMA  : AtomicFPLoad<0b10, 0b111, "ldfminnma">;
+  defm LDFMINNMAL : AtomicFPLoad<0b11, 0b111, "ldfminnmal">;
+  defm LDFMINMN   : AtomicFPLoad<0b00, 0b111, "ldfminnm">;
+  defm LDFMINNML  : AtomicFPLoad<0b01, 0b111, "ldfminnml">;
+  // BFloat16
+  def LDBFADDA    : BaseAtomicFPLoad<FPR16, 0b00, 0b10, 0b000, "ldbfadda">;
+  def LDBFADDAL   : BaseAtomicFPLoad<FPR16, 0b00, 0b11, 0b000, "ldbfaddal">;
+  def LDBFADD     : BaseAtomicFPLoad<FPR16, 0b00, 0b00, 0b000, "ldbfadd">;
+  def LDBFADDL    : BaseAtomicFPLoad<FPR16, 0b00, 0b01, 0b000, "ldbfaddl">;
+  def LDBFMAXA    : BaseAtomicFPLoad<FPR16, 0b00, 0b10, 0b100, "ldbfmaxa">;
+  def LDBFMAXAL   : BaseAtomicFPLoad<FPR16, 0b00, 0b11, 0b100, "ldbfmaxal">;
+  def LDBFMAX     : BaseAtomicFPLoad<FPR16, 0b00, 0b00, 0b100, "ldbfmax">;
+  def LDBFMAXL    : BaseAtomicFPLoad<FPR16, 0b00, 0b01, 0b100, "ldbfmaxl">;
+  def LDBFMINA    : BaseAtomicFPLoad<FPR16, 0b00, 0b10, 0b101, "ldbfmina">;
+  def LDBFMINAL   : BaseAtomicFPLoad<FPR16, 0b00, 0b11, 0b101, "ldbfminal">;
+  def LDBFMIN     : BaseAtomicFPLoad<FPR16, 0b00, 0b00, 0b101, "ldbfmin">;
+  def LDBFMINL    : BaseAtomicFPLoad<FPR16, 0b00, 0b01, 0b101, "ldbfminl">;
+  def LDBFMAXNMA  : BaseAtomicFPLoad<FPR16, 0b00, 0b10, 0b110, "ldbfmaxnma">;
+  def LDBFMAXNMAL : BaseAtomicFPLoad<FPR16, 0b00, 0b11, 0b110, "ldbfmaxnmal">;
+  def LDBFMAXNM   : BaseAtomicFPLoad<FPR16, 0b00, 0b00, 0b110, "ldbfmaxnm">;
+  def LDBFMAXNML  : BaseAtomicFPLoad<FPR16, 0b00, 0b01, 0b110, "ldbfmaxnml">;
+  def LDBFMINNMA  : BaseAtomicFPLoad<FPR16, 0b00, 0b10, 0b111, "ldbfminnma">;
+  def LDBFMINNMAL : BaseAtomicFPLoad<FPR16, 0b00, 0b11, 0b111, "ldbfminnmal">;
+  def LDBFMINNM   : BaseAtomicFPLoad<FPR16, 0b00, 0b00, 0b111, "ldbfminnm">;
+  def LDBFMINNML  : BaseAtomicFPLoad<FPR16, 0b00, 0b01, 0b111, "ldbfminnml">;
+
+  // Floating-point Atomic Store
+  defm STFADD    : AtomicFPStore<0b0, 0b000, "stfadd">;
+  defm STFADDL   : AtomicFPStore<0b1, 0b000, "stfaddl">;
+  defm STFMAX    : AtomicFPStore<0b0, 0b100, "stfmax">;
+  defm STFMAXL   : AtomicFPStore<0b1, 0b100, "stfmaxl">;
+  defm STFMIN    : AtomicFPStore<0b0, 0b101, "stfmin">;
+  defm STFMINL   : AtomicFPStore<0b1, 0b101, "stfminl">;
+  defm STFMAXNM  : AtomicFPStore<0b0, 0b110, "stfmaxnm">;
+  defm STFMAXNML : AtomicFPStore<0b1, 0b110, "stfmaxnml">;
+  defm STFMINNM  : AtomicFPStore<0b0, 0b111, "stfminnm">;
+  defm STFMINNML : AtomicFPStore<0b1, 0b111, "stfminnml">;
+  // BFloat16
+  def STBFADD    : BaseAtomicFPStore<FPR16, 0b00, 0b0, 0b000, "stbfadd">;
+  def STBFADDL   : BaseAtomicFPStore<FPR16, 0b00, 0b1, 0b000, "stbfaddl">;
+  def STBFMAX    : BaseAtomicFPStore<FPR16, 0b00, 0b0, 0b100, "stbfmax">;
+  def STBFMAXL   : BaseAtomicFPStore<FPR16, 0b00, 0b1, 0b100, "stbfmaxl">;
+  def STBFMIN    : BaseAtomicFPStore<FPR16, 0b00, 0b0, 0b101, "stbfmin">;
+  def STBFMINL   : BaseAtomicFPStore<FPR16, 0b00, 0b1, 0b101, "stbfminl">;
+  def STBFMAXNM  : BaseAtomicFPStore<FPR16, 0b00, 0b0, 0b110, "stbfmaxnm">;
+  def STBFMAXNML : BaseAtomicFPStore<FPR16, 0b00, 0b1, 0b110, "stbfmaxnml">;
+  def STBFMINNM  : BaseAtomicFPStore<FPR16, 0b00, 0b0, 0b111, "stbfminnm">;
+  def STBFMINNML : BaseAtomicFPStore<FPR16, 0b00, 0b1, 0b111, "stbfminnml">;
+}
+
 include "AArch64InstrAtomics.td"
 include "AArch64SVEInstrInfo.td"
 include "AArch64SMEInstrInfo.td"

diff  --git a/llvm/test/MC/AArch64/LSFE/directive-arch-negative.s b/llvm/test/MC/AArch64/LSFE/directive-arch-negative.s
new file mode 100644
index 00000000000000..2520d777f4cf64
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/directive-arch-negative.s
@@ -0,0 +1,7 @@
+// RUN: not llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s
+
+.arch armv9.6-a+lsfe
+.arch armv9.6-a+nolsfe
+ldfadd h0, h1, [x2]
+// CHECK: error: instruction requires: lsfe
+// CHECK: ldfadd h0, h1, [x2]
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/directive-arch.s b/llvm/test/MC/AArch64/LSFE/directive-arch.s
new file mode 100644
index 00000000000000..4fd6135e1a5123
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/directive-arch.s
@@ -0,0 +1,5 @@
+// RUN: llvm-mc -triple aarch64 -o - %s 2>&1 | FileCheck %s
+
+.arch armv9.6-a+lsfe
+ldfadd h0, h1, [x2]
+// CHECK: ldfadd h0, h1, [x2]
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/directive-arch_extension-negative.s b/llvm/test/MC/AArch64/LSFE/directive-arch_extension-negative.s
new file mode 100644
index 00000000000000..f74dfb13e8245d
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/directive-arch_extension-negative.s
@@ -0,0 +1,7 @@
+// RUN: not llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s
+
+.arch_extension lsfe
+.arch_extension nolsfe
+ldfadd h0, h1, [x2]
+// CHECK: error: instruction requires: lsfe
+// CHECK-NEXT: ldfadd h0, h1, [x2]
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/directive-arch_extension.s b/llvm/test/MC/AArch64/LSFE/directive-arch_extension.s
new file mode 100644
index 00000000000000..1dfca73aeb3403
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/directive-arch_extension.s
@@ -0,0 +1,5 @@
+// RUN: llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s
+
+.arch_extension lsfe
+ldfadd h0, h1, [x2]
+// CHECK: ldfadd h0, h1, [x2]
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/directive-cpu-negative.s b/llvm/test/MC/AArch64/LSFE/directive-cpu-negative.s
new file mode 100644
index 00000000000000..443161b51e947d
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/directive-cpu-negative.s
@@ -0,0 +1,7 @@
+// RUN: not llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s
+
+.cpu generic+lsfe
+.cpu generic+nolsfe
+ldfadd h0, h1, [x2]
+// CHECK: error: instruction requires: lsfe
+// CHECK-NEXT: ldfadd h0, h1, [x2]
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/directive-cpu.s b/llvm/test/MC/AArch64/LSFE/directive-cpu.s
new file mode 100644
index 00000000000000..ae58cd67c2c7d4
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/directive-cpu.s
@@ -0,0 +1,5 @@
+// RUN: llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s
+
+.cpu generic+lsfe
+ldfadd h0, h1, [x2]
+// CHECK: ldfadd h0, h1, [x2]

diff  --git a/llvm/test/MC/AArch64/LSFE/ldfadd-diagnostics.s b/llvm/test/MC/AArch64/LSFE/ldfadd-diagnostics.s
new file mode 100644
index 00000000000000..eb36a0286db7d8
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/ldfadd-diagnostics.s
@@ -0,0 +1,241 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s
+
+//------------------------------------------------------------------------------
+// LDFADD
+//------------------------------------------------------------------------------
+
+ldfadd h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfadd h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfadd s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfadd s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfadd d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfadd d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfadd d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfadd d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfadd s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfadd s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldfadda
+
+ldfadda h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfadda h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfadda s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfadda s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfadda d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfadda d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfadda d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfadda d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfadda s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfadda s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldfaddal
+
+ldfaddal h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfaddal h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfaddal s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfaddal s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfaddal d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfaddal d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfaddal d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfaddal d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfaddal s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfaddal s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldfaddl
+
+ldfaddl h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfaddl h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfaddl s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfaddl s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfaddl d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfaddl d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfaddl d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfaddl d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfaddl s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfaddl s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+//------------------------------------------------------------------------------
+// LDBFADD
+//------------------------------------------------------------------------------
+
+ldbfadd s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfadd s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfadd h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfadd h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfadd s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfadd s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfadd d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfadd d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfadd h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfadd h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfadd h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfadd h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldbfadda
+
+ldbfadda s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfadda s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfadda h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfadda h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfadda s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfadda s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfadda d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfadda d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfadda h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfadda h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfadda h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfadda h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldbfaddal
+
+ldbfaddal s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfaddal s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfaddal h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfaddal h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfaddal s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfaddal s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfaddal d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfaddal d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfaddal h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfaddal h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfaddal h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfaddal h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldbfaddl
+
+ldbfaddl s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfaddl s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfaddl h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfaddl h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfaddl s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfaddl s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfaddl d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfaddl d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfaddl h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfaddl h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfaddl h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfaddl h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/ldfadd.s b/llvm/test/MC/AArch64/LSFE/ldfadd.s
new file mode 100644
index 00000000000000..e80ca3b70533af
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/ldfadd.s
@@ -0,0 +1,225 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+//------------------------------------------------------------------------------
+// LDFADD
+//------------------------------------------------------------------------------
+
+ldfadd h0, h1, [x2]
+// CHECK-INST: ldfadd h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0x20,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c200041 <unknown>
+
+ldfadd h2, h3, [sp]
+// CHECK-INST: ldfadd h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0x22,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c2203e3 <unknown>
+
+ldfadd s0, s1, [x2]
+// CHECK-INST: ldfadd s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0x20,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc200041 <unknown>
+
+ldfadd s2, s3, [sp]
+// CHECK-INST: ldfadd s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0x22,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc2203e3 <unknown>
+
+ldfadd d0, d1, [x2]
+// CHECK-INST: ldfadd d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0x20,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc200041 <unknown>
+
+ldfadd d2, d3, [sp]
+// CHECK-INST: ldfadd d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0x22,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc2203e3 <unknown>
+
+// -- ldfadda
+
+ldfadda h0, h1, [x2]
+// CHECK-INST: ldfadda h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0xa0,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ca00041 <unknown>
+
+ldfadda h2, h3, [sp]
+// CHECK-INST: ldfadda h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0xa2,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ca203e3 <unknown>
+
+ldfadda s0, s1, [x2]
+// CHECK-INST: ldfadda s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0xa0,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bca00041 <unknown>
+
+ldfadda s2, s3, [sp]
+// CHECK-INST: ldfadda s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0xa2,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bca203e3 <unknown>
+
+ldfadda d0, d1, [x2]
+// CHECK-INST: ldfadda d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0xa0,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fca00041 <unknown>
+
+ldfadda d2, d3, [sp]
+// CHECK-INST: ldfadda d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0xa2,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fca203e3 <unknown>
+
+// -- ldfaddal
+
+ldfaddal h0, h1, [x2]
+// CHECK-INST: ldfaddal h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0xe0,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ce00041 <unknown>
+
+ldfaddal h2, h3, [sp]
+// CHECK-INST: ldfaddal h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0xe2,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ce203e3 <unknown>
+
+ldfaddal s0, s1, [x2]
+// CHECK-INST: ldfaddal s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0xe0,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bce00041 <unknown>
+
+ldfaddal s2, s3, [sp]
+// CHECK-INST: ldfaddal s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0xe2,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bce203e3 <unknown>
+
+ldfaddal d0, d1, [x2]
+// CHECK-INST: ldfaddal d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0xe0,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fce00041 <unknown>
+
+ldfaddal d2, d3, [sp]
+// CHECK-INST: ldfaddal d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0xe2,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fce203e3 <unknown>
+
+// -- ldfaddl
+
+ldfaddl h0, h1, [x2]
+// CHECK-INST: ldfaddl h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0x60,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN:  7c600041 <unknown>
+
+ldfaddl h2, h3, [sp]
+// CHECK-INST: ldfaddl h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0x62,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c6203e3 <unknown>
+
+ldfaddl s0, s1, [x2]
+// CHECK-INST: ldfaddl s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0x60,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc600041 <unknown>
+
+ldfaddl s2, s3, [sp]
+// CHECK-INST: ldfaddl s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0x62,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc6203e3 <unknown>
+
+ldfaddl d0, d1, [x2]
+// CHECK-INST: ldfaddl d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0x60,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc600041 <unknown>
+
+ldfaddl d2, d3, [sp]
+// CHECK-INST: ldfaddl d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0x62,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc6203e3 <unknown
+
+//------------------------------------------------------------------------------
+// LDBFADD
+//------------------------------------------------------------------------------
+
+ldbfadd h0, h1, [x2]
+// CHECK-INST: ldbfadd h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0x20,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c200041 <unknown>
+
+ldbfadd h2, h3, [sp]
+// CHECK-INST: ldbfadd h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0x22,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c2203e3 <unknown>
+
+// -- ldbfadda
+
+ldbfadda h0, h1, [x2]
+// CHECK-INST: ldbfadda h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0xa0,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ca00041 <unknown>
+
+ldbfadda h2, h3, [sp]
+// CHECK-INST: ldbfadda h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0xa2,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ca203e3 <unknown>
+
+// -- ldbfaddal
+
+ldbfaddal h0, h1, [x2]
+// CHECK-INST: ldbfaddal h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0xe0,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ce00041 <unknown>
+
+ldbfaddal h2, h3, [sp]
+// CHECK-INST: ldbfaddal h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0xe2,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ce203e3 <unknown>
+
+// -- ldbfaddl
+
+ldbfaddl h0, h1, [x2]
+// CHECK-INST: ldbfaddl h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x00,0x60,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c600041 <unknown>
+
+ldbfaddl h2, h3, [sp]
+// CHECK-INST: ldbfaddl h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x03,0x62,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c6203e3 <unknown>
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/ldfmax-diagnostics.s b/llvm/test/MC/AArch64/LSFE/ldfmax-diagnostics.s
new file mode 100644
index 00000000000000..e062e400b67ff9
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/ldfmax-diagnostics.s
@@ -0,0 +1,241 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s
+
+//------------------------------------------------------------------------------
+// LDFMAX
+//------------------------------------------------------------------------------
+
+ldfmax h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmax h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmax s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmax s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmax d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmax d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmax d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmax d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmax s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmax s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldfmaxa
+
+ldfmaxa h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxa h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxa s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxa s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxa d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxa d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxa d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxa d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxa s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxa s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldfmaxal
+
+ldfmaxal h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxal h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxal s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxal s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxal d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxal d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxal d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxal d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxal s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxal s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldfmaxl
+
+ldfmaxl h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxl h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxl s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxl s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxl d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxl d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxl d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxl d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxl s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxl s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+//------------------------------------------------------------------------------
+// LDBFMAX
+//------------------------------------------------------------------------------
+
+ldbfmax s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmax s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmax h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmax h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmax s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmax s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmax d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmax d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmax h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmax h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmax h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmax h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldbfmaxa
+
+ldbfmaxa s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxa s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxa h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxa h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxa s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxa s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxa d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxa d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxa h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxa h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxa h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxa h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldbfmaxal
+
+ldbfmaxal s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxal s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxal h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxal h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxal s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxal s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxal d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxal d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxal h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxal h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxal h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxal h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldbfmaxl
+
+ldbfmaxl s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxl s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxl h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxl h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxl s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxl s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxl d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxl d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxl h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxl h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxl h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxl h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/ldfmax.s b/llvm/test/MC/AArch64/LSFE/ldfmax.s
new file mode 100644
index 00000000000000..40c9e05d1b233c
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/ldfmax.s
@@ -0,0 +1,225 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+//------------------------------------------------------------------------------
+// LDFMAX
+//------------------------------------------------------------------------------
+
+ldfmax h0, h1, [x2]
+// CHECK-INST: ldfmax h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0x20,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c204041 <unknown>
+
+ldfmax h2, h3, [sp]
+// CHECK-INST: ldfmax h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0x22,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c2243e3 <unknown>
+
+ldfmax s0, s1, [x2]
+// CHECK-INST: ldfmax s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0x20,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc204041 <unknown>
+
+ldfmax s2, s3, [sp]
+// CHECK-INST: ldfmax s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0x22,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc2243e3 <unknown>
+
+ldfmax d0, d1, [x2]
+// CHECK-INST: ldfmax d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0x20,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc204041 <unknown>
+
+ldfmax d2, d3, [sp]
+// CHECK-INST: ldfmax d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0x22,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc2243e3 <unknown>
+
+// -- ldfmaxa
+
+ldfmaxa h0, h1, [x2]
+// CHECK-INST: ldfmaxa h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0xa0,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ca04041 <unknown>
+
+ldfmaxa h2, h3, [sp]
+// CHECK-INST: ldfmaxa h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0xa2,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ca243e3 <unknown>
+
+ldfmaxa s0, s1, [x2]
+// CHECK-INST: ldfmaxa s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0xa0,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bca04041 <unknown>
+
+ldfmaxa s2, s3, [sp]
+// CHECK-INST: ldfmaxa s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0xa2,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bca243e3 <unknown>
+
+ldfmaxa d0, d1, [x2]
+// CHECK-INST: ldfmaxa d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0xa0,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fca04041 <unknown>
+
+ldfmaxa d2, d3, [sp]
+// CHECK-INST: ldfmaxa d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0xa2,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fca243e3 <unknown>
+
+// -- ldfmaxal
+
+ldfmaxal h0, h1, [x2]
+// CHECK-INST: ldfmaxal h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0xe0,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ce04041 <unknown>
+
+ldfmaxal h2, h3, [sp]
+// CHECK-INST: ldfmaxal h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0xe2,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ce243e3 <unknown>
+
+ldfmaxal s0, s1, [x2]
+// CHECK-INST: ldfmaxal s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0xe0,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bce04041 <unknown>
+
+ldfmaxal s2, s3, [sp]
+// CHECK-INST: ldfmaxal s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0xe2,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bce243e3 <unknown>
+
+ldfmaxal d0, d1, [x2]
+// CHECK-INST: ldfmaxal d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0xe0,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fce04041 <unknown>
+
+ldfmaxal d2, d3, [sp]
+// CHECK-INST: ldfmaxal d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0xe2,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fce243e3 <unknown>
+
+// -- ldfmaxl
+
+ldfmaxl h0, h1, [x2]
+// CHECK-INST: ldfmaxl h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0x60,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c604041 <unknown>
+
+ldfmaxl h2, h3, [sp]
+// CHECK-INST: ldfmaxl h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0x62,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c6243e3 <unknown>
+
+ldfmaxl s0, s1, [x2]
+// CHECK-INST: ldfmaxl s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0x60,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc604041 <unknown>
+
+ldfmaxl s2, s3, [sp]
+// CHECK-INST: ldfmaxl s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0x62,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc6243e3 <unknown>
+
+ldfmaxl d0, d1, [x2]
+// CHECK-INST: ldfmaxl d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0x60,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc604041 <unknown>
+
+ldfmaxl d2, d3, [sp]
+// CHECK-INST: ldfmaxl d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0x62,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc6243e3 <unknown>
+
+//------------------------------------------------------------------------------
+// LDBFMAX
+//------------------------------------------------------------------------------
+
+ldbfmax h0, h1, [x2]
+// CHECK-INST: ldbfmax h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0x20,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c204041 <unknown>
+
+ldbfmax h2, h3, [sp]
+// CHECK-INST: ldbfmax h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0x22,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c2243e3 <unknown>
+
+// -- ldbfmaxa
+
+ldbfmaxa h0, h1, [x2]
+// CHECK-INST: ldbfmaxa h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0xa0,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ca04041 <unknown>
+
+ldbfmaxa h2, h3, [sp]
+// CHECK-INST: ldbfmaxa h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0xa2,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ca243e3 <unknown>
+
+// -- ldbfmaxal
+
+ldbfmaxal h0, h1, [x2]
+// CHECK-INST: ldbfmaxal h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0xe0,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ce04041 <unknown>
+
+ldbfmaxal h2, h3, [sp]
+// CHECK-INST: ldbfmaxal h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0xe2,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ce243e3 <unknown>
+
+// -- ldbfmaxl
+
+ldbfmaxl h0, h1, [x2]
+// CHECK-INST: ldbfmaxl h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x40,0x60,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c604041 <unknown>
+
+ldbfmaxl h2, h3, [sp]
+// CHECK-INST: ldbfmaxl h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x43,0x62,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c6243e3 <unknown>
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/ldfmaxnm-diagnostics.s b/llvm/test/MC/AArch64/LSFE/ldfmaxnm-diagnostics.s
new file mode 100644
index 00000000000000..2bd4da5624b0a7
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/ldfmaxnm-diagnostics.s
@@ -0,0 +1,241 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s
+
+//------------------------------------------------------------------------------
+// LDFMAXNM
+//------------------------------------------------------------------------------
+
+ldfmaxnm h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnm h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnm s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnm s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnm d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnm d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnm d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnm d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnm s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnm s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldfmaxnma
+
+ldfmaxnma h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnma h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnma s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnma s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnma d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnma d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnma d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnma d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnma s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnma s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldfmaxnmal
+
+ldfmaxnmal h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnmal h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnmal s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnmal s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnmal d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnmal d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnmal d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnmal d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnmal s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnmal s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldfmaxnml
+
+ldfmaxnml h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnml h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnml s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnml s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnml d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnml d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnml d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnml d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmaxnml s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmaxnml s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+//------------------------------------------------------------------------------
+// LDBFMAXNM
+//------------------------------------------------------------------------------
+
+ldbfmaxnm s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnm s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnm h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnm h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnm s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnm s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnm d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnm d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnm h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnm h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnm h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnm h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldbfmaxnma
+
+ldbfmaxnma s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnma s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnma h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnma h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnma s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnma s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnma d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnma d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnma h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnma h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnma h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnma h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldbfmaxnmal
+
+ldbfmaxnmal s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnmal s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnmal h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnmal h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnmal s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnmal s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnmal d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnmal d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnmal h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnmal h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnmal h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnmal h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldbfmaxnml
+
+ldbfmaxnml s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnml s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnml h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnml h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnml s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnml s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnml d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnml d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmaxnml h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnml h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+ldbfmaxnml h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmaxnml h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/ldfmaxnm.s b/llvm/test/MC/AArch64/LSFE/ldfmaxnm.s
new file mode 100644
index 00000000000000..bfa1c50d41bfa7
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/ldfmaxnm.s
@@ -0,0 +1,225 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+//------------------------------------------------------------------------------
+// LDFMAXNM
+//------------------------------------------------------------------------------
+
+ldfmaxnm h0, h1, [x2]
+// CHECK-INST: ldfmaxnm h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0x20,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c206041 <unknown>
+
+ldfmaxnm h2, h3, [sp]
+// CHECK-INST: ldfmaxnm h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0x22,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c2263e3 <unknown>
+
+ldfmaxnm s0, s1, [x2]
+// CHECK-INST: ldfmaxnm s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0x20,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc206041 <unknown>
+
+ldfmaxnm s2, s3, [sp]
+// CHECK-INST: ldfmaxnm s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0x22,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc2263e3 <unknown>
+
+ldfmaxnm d0, d1, [x2]
+// CHECK-INST: ldfmaxnm d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0x20,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc206041 <unknown>
+
+ldfmaxnm d2, d3, [sp]
+// CHECK-INST: ldfmaxnm d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0x22,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc2263e3 <unknown>
+
+// -- ldfmaxnma
+
+ldfmaxnma h0, h1, [x2]
+// CHECK-INST: ldfmaxnma h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0xa0,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ca06041 <unknown>
+
+ldfmaxnma h2, h3, [sp]
+// CHECK-INST: ldfmaxnma h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0xa2,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ca263e3 <unknown>
+
+ldfmaxnma s0, s1, [x2]
+// CHECK-INST: ldfmaxnma s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0xa0,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bca06041 <unknown>
+
+ldfmaxnma s2, s3, [sp]
+// CHECK-INST: ldfmaxnma s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0xa2,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bca263e3 <unknown>
+
+ldfmaxnma d0, d1, [x2]
+// CHECK-INST: ldfmaxnma d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0xa0,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fca06041 <unknown>
+
+ldfmaxnma d2, d3, [sp]
+// CHECK-INST: ldfmaxnma d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0xa2,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fca263e3 <unknown>
+
+// -- ldfmaxnmal
+
+ldfmaxnmal h0, h1, [x2]
+// CHECK-INST: ldfmaxnmal h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0xe0,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ce06041 <unknown>
+
+ldfmaxnmal h2, h3, [sp]
+// CHECK-INST: ldfmaxnmal h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0xe2,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ce263e3 <unknown>
+
+ldfmaxnmal s0, s1, [x2]
+// CHECK-INST: ldfmaxnmal s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0xe0,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bce06041 <unknown>
+
+ldfmaxnmal s2, s3, [sp]
+// CHECK-INST: ldfmaxnmal s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0xe2,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bce263e3 <unknown>
+
+ldfmaxnmal d0, d1, [x2]
+// CHECK-INST: ldfmaxnmal d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0xe0,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fce06041 <unknown>
+
+ldfmaxnmal d2, d3, [sp]
+// CHECK-INST: ldfmaxnmal d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0xe2,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fce263e3 <unknown>
+
+// -- ldfmaxnml
+
+ldfmaxnml h0, h1, [x2]
+// CHECK-INST: ldfmaxnml h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0x60,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN:  7c606041 <unknown>
+
+ldfmaxnml h2, h3, [sp]
+// CHECK-INST: ldfmaxnml h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0x62,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c6263e3 <unknown>
+
+ldfmaxnml s0, s1, [x2]
+// CHECK-INST: ldfmaxnml s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0x60,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc606041 <unknown>
+
+ldfmaxnml s2, s3, [sp]
+// CHECK-INST: ldfmaxnml s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0x62,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc6263e3 <unknown>
+
+ldfmaxnml d0, d1, [x2]
+// CHECK-INST: ldfmaxnml d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0x60,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc606041 <unknown>
+
+ldfmaxnml d2, d3, [sp]
+// CHECK-INST: ldfmaxnml d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0x62,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc6263e3 <unknown>
+
+//------------------------------------------------------------------------------
+// LDBFMAXNM
+//------------------------------------------------------------------------------
+
+ldbfmaxnm h0, h1, [x2]
+// CHECK-INST: ldbfmaxnm h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0x20,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c206041 <unknown>
+
+ldbfmaxnm h2, h3, [sp]
+// CHECK-INST: ldbfmaxnm h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0x22,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c2263e3 <unknown>
+
+// -- ldbfmaxnma
+
+ldbfmaxnma h0, h1, [x2]
+// CHECK-INST: ldbfmaxnma h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0xa0,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ca06041 <unknown>
+
+ldbfmaxnma h2, h3, [sp]
+// CHECK-INST: ldbfmaxnma h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0xa2,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ca263e3 <unknown>
+
+// -- ldbfmaxnmal
+
+ldbfmaxnmal h0, h1, [x2]
+// CHECK-INST: ldbfmaxnmal h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0xe0,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ce06041 <unknown>
+
+ldbfmaxnmal h2, h3, [sp]
+// CHECK-INST: ldbfmaxnmal h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0xe2,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ce263e3 <unknown>
+
+// -- ldbfmaxnml
+
+ldbfmaxnml h0, h1, [x2]
+// CHECK-INST: ldbfmaxnml h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x60,0x60,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c606041 <unknown>
+
+ldbfmaxnml h2, h3, [sp]
+// CHECK-INST: ldbfmaxnml h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x63,0x62,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c6263e3 <unknown>
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/ldfmin-diagnostics.s b/llvm/test/MC/AArch64/LSFE/ldfmin-diagnostics.s
new file mode 100644
index 00000000000000..e50f94e8ec45db
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/ldfmin-diagnostics.s
@@ -0,0 +1,241 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s
+
+//------------------------------------------------------------------------------
+// LDFMIN
+//------------------------------------------------------------------------------
+
+ldfmin h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmin h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmin s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmin s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmin d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmin d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmin d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmin d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmin s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmin s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldfmina
+
+ldfmina h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmina h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmina s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmina s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmina d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmina d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmina d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmina d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfmina s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfmina s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldfminal
+
+ldfminal h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminal h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminal s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminal s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminal d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminal d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminal d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminal d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminal s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminal s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldfminl
+
+ldfminl h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminl h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminl s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminl s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminl d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminl d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminl d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminl d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminl s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminl s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+//------------------------------------------------------------------------------
+// LDBFMIN
+//------------------------------------------------------------------------------
+
+ldbfmin s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmin s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmin h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmin h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmin s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmin s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmin d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmin d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmin h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmin h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmin h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmin h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldbfmina
+
+ldbfmina s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmina s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmina h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmina h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmina s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmina s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmina d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmina d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmina h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmina h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfmina h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfmina h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldbfminal
+
+ldbfminal s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminal s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminal h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminal h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminal s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminal s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminal d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminal d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminal h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminal h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminal h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminal h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldbfminl
+
+ldbfminl s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminl s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminl h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminl h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminl s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminl s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminl d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminl d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminl h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminl h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminl h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminl h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/ldfmin.s b/llvm/test/MC/AArch64/LSFE/ldfmin.s
new file mode 100644
index 00000000000000..4867db04a69caa
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/ldfmin.s
@@ -0,0 +1,225 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+//------------------------------------------------------------------------------
+// LDFMIN
+//------------------------------------------------------------------------------
+
+ldfmin h0, h1, [x2]
+// CHECK-INST: ldfmin h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0x20,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c205041 <unknown>
+
+ldfmin h2, h3, [sp]
+// CHECK-INST: ldfmin h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0x22,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c2253e3 <unknown>
+
+ldfmin s0, s1, [x2]
+// CHECK-INST: ldfmin s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0x20,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc205041 <unknown>
+
+ldfmin s2, s3, [sp]
+// CHECK-INST: ldfmin s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0x22,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc2253e3 <unknown>
+
+ldfmin d0, d1, [x2]
+// CHECK-INST: ldfmin d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0x20,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc205041 <unknown>
+
+ldfmin d2, d3, [sp]
+// CHECK-INST: ldfmin d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0x22,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc2253e3 <unknown>
+
+// -- ldfmina
+
+ldfmina h0, h1, [x2]
+// CHECK-INST: ldfmina h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0xa0,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ca05041 <unknown>
+
+ldfmina h2, h3, [sp]
+// CHECK-INST: ldfmina h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0xa2,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ca253e3 <unknown>
+
+ldfmina s0, s1, [x2]
+// CHECK-INST: ldfmina s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0xa0,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bca05041 <unknown>
+
+ldfmina s2, s3, [sp]
+// CHECK-INST: ldfmina s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0xa2,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bca253e3 <unknown>
+
+ldfmina d0, d1, [x2]
+// CHECK-INST: ldfmina d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0xa0,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fca05041 <unknown>
+
+ldfmina d2, d3, [sp]
+// CHECK-INST: ldfmina d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0xa2,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fca253e3 <unknown>
+
+// -- ldfminal
+
+ldfminal h0, h1, [x2]
+// CHECK-INST: ldfminal h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0xe0,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ce05041 <unknown>
+
+ldfminal h2, h3, [sp]
+// CHECK-INST: ldfminal h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0xe2,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ce253e3 <unknown>
+
+ldfminal s0, s1, [x2]
+// CHECK-INST: ldfminal s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0xe0,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bce05041 <unknown>
+
+ldfminal s2, s3, [sp]
+// CHECK-INST: ldfminal s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0xe2,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bce253e3 <unknown>
+
+ldfminal d0, d1, [x2]
+// CHECK-INST: ldfminal d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0xe0,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fce05041 <unknown>
+
+ldfminal d2, d3, [sp]
+// CHECK-INST: ldfminal d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0xe2,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fce253e3 <unknown>
+
+// -- ldfminl
+
+ldfminl h0, h1, [x2]
+// CHECK-INST: ldfminl h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0x60,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c605041 <unknown>
+
+ldfminl h2, h3, [sp]
+// CHECK-INST: ldfminl h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0x62,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c6253e3 <unknown>
+
+ldfminl s0, s1, [x2]
+// CHECK-INST: ldfminl s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0x60,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc605041 <unknown>
+
+ldfminl s2, s3, [sp]
+// CHECK-INST: ldfminl s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0x62,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc6253e3 <unknown>
+
+ldfminl d0, d1, [x2]
+// CHECK-INST: ldfminl d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0x60,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc605041 <unknown>
+
+ldfminl d2, d3, [sp]
+// CHECK-INST: ldfminl d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0x62,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc6253e3 <unknown>
+
+//------------------------------------------------------------------------------
+// LDBFMIN
+//------------------------------------------------------------------------------
+
+ldbfmin h0, h1, [x2]
+// CHECK-INST: ldbfmin h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0x20,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c205041 <unknown>
+
+ldbfmin h2, h3, [sp]
+// CHECK-INST: ldbfmin h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0x22,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c2253e3 <unknown>
+
+// -- ldbfmina
+
+ldbfmina h0, h1, [x2]
+// CHECK-INST: ldbfmina h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0xa0,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ca05041 <unknown>
+
+ldbfmina h2, h3, [sp]
+// CHECK-INST: ldbfmina h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0xa2,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ca253e3 <unknown>
+
+// -- ldbfminal
+
+ldbfminal h0, h1, [x2]
+// CHECK-INST: ldbfminal h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0xe0,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ce05041 <unknown>
+
+ldbfminal h2, h3, [sp]
+// CHECK-INST: ldbfminal h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0xe2,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ce253e3 <unknown>
+
+// -- ldbfminl
+
+ldbfminl h0, h1, [x2]
+// CHECK-INST: ldbfminl h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x50,0x60,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c605041 <unknown>
+
+ldbfminl h2, h3, [sp]
+// CHECK-INST: ldbfminl h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x53,0x62,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c6253e3 <unknown>
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/ldfminnm-diagnostics.s b/llvm/test/MC/AArch64/LSFE/ldfminnm-diagnostics.s
new file mode 100644
index 00000000000000..e31adb51568060
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/ldfminnm-diagnostics.s
@@ -0,0 +1,241 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s
+
+//------------------------------------------------------------------------------
+// ldfmin
+//------------------------------------------------------------------------------
+
+ldfminnm h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnm h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnm s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnm s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnm d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnm d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnm d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnm d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnm s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnm s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldfminnma
+
+ldfminnma h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnma h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnma s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnma s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnma d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnma d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnma d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnma d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnma s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnma s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldfminnmal
+
+ldfminnmal h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnmal h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnmal s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnmal s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnmal d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnmal d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnmal d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnmal d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnmal s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnmal s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldfminnml
+
+ldfminnml h0, s2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnml h0, s2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnml s0, d2, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnml s0, d2, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnml d0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnml d0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnml d0, d1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnml d0, d1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldfminnml s0, s1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldfminnml s0, s1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+//------------------------------------------------------------------------------
+// LDBFMINNM
+//------------------------------------------------------------------------------
+
+ldbfminnm s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnm s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnm h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnm h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnm s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnm s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnm d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnm d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnm h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnm h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnm h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnm h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldbfminnma
+
+ldbfminnma s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnma s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnma h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnma h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnma s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnma s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnma d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnma d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnma h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnma h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnma h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnma h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldbfminnmal
+
+ldbfminnmal s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnmal s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnmal h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnmal h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnmal s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnmal s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnmal d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnmal d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnmal h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnmal h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnmal h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnmal h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- ldbfminnml
+
+ldbfminnml s0, h1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnml s0, h1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnml h0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnml h0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnml s0, s1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnml s0, s1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnml d0, d1, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnml d0, d1, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnml h0, h1, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnml h0, h1, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ldbfminnml h0, h1, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: ldbfminnml h0, h1, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/ldfminnm.s b/llvm/test/MC/AArch64/LSFE/ldfminnm.s
new file mode 100644
index 00000000000000..ae027aa1f8aed2
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/ldfminnm.s
@@ -0,0 +1,225 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+//------------------------------------------------------------------------------
+// LDFMINNM
+//------------------------------------------------------------------------------
+
+ldfminnm h0, h1, [x2]
+// CHECK-INST: ldfminnm h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0x20,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c207041 <unknown>
+
+ldfminnm h2, h3, [sp]
+// CHECK-INST: ldfminnm h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0x22,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c2273e3 <unknown>
+
+ldfminnm s0, s1, [x2]
+// CHECK-INST: ldfminnm s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0x20,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc207041 <unknown>
+
+ldfminnm s2, s3, [sp]
+// CHECK-INST: ldfminnm s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0x22,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc2273e3 <unknown>
+
+ldfminnm d0, d1, [x2]
+// CHECK-INST: ldfminnm d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0x20,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc207041 <unknown>
+
+ldfminnm d2, d3, [sp]
+// CHECK-INST: ldfminnm d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0x22,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc2273e3 <unknown>
+
+// -- ldfminnma
+
+ldfminnma h0, h1, [x2]
+// CHECK-INST: ldfminnma h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0xa0,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ca07041 <unknown>
+
+ldfminnma h2, h3, [sp]
+// CHECK-INST: ldfminnma h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0xa2,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ca273e3 <unknown>
+
+ldfminnma s0, s1, [x2]
+// CHECK-INST: ldfminnma s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0xa0,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bca07041 <unknown>
+
+ldfminnma s2, s3, [sp]
+// CHECK-INST: ldfminnma s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0xa2,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bca273e3 <unknown>
+
+ldfminnma d0, d1, [x2]
+// CHECK-INST: ldfminnma d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0xa0,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fca07041 <unknown>
+
+ldfminnma d2, d3, [sp]
+// CHECK-INST: ldfminnma d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0xa2,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fca273e3 <unknown>
+
+// -- ldfminnmal
+
+ldfminnmal h0, h1, [x2]
+// CHECK-INST: ldfminnmal h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0xe0,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ce07041 <unknown>
+
+ldfminnmal h2, h3, [sp]
+// CHECK-INST: ldfminnmal h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0xe2,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7ce273e3 <unknown>
+
+ldfminnmal s0, s1, [x2]
+// CHECK-INST: ldfminnmal s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0xe0,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bce07041 <unknown>
+
+ldfminnmal s2, s3, [sp]
+// CHECK-INST: ldfminnmal s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0xe2,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bce273e3 <unknown>
+
+ldfminnmal d0, d1, [x2]
+// CHECK-INST: ldfminnmal d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0xe0,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fce07041 <unknown>
+
+ldfminnmal d2, d3, [sp]
+// CHECK-INST: ldfminnmal d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0xe2,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fce273e3 <unknown>
+
+// -- ldfminnml
+
+ldfminnml h0, h1, [x2]
+// CHECK-INST: ldfminnml h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0x60,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN:  7c607041 <unknown>
+
+ldfminnml h2, h3, [sp]
+// CHECK-INST: ldfminnml h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0x62,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c6273e3 <unknown>
+
+ldfminnml s0, s1, [x2]
+// CHECK-INST: ldfminnml s0, s1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0x60,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc607041 <unknown>
+
+ldfminnml s2, s3, [sp]
+// CHECK-INST: ldfminnml s2, s3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0x62,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc6273e3 <unknown>
+
+ldfminnml d0, d1, [x2]
+// CHECK-INST: ldfminnml d0, d1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0x60,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc607041 <unknown>
+
+ldfminnml d2, d3, [sp]
+// CHECK-INST: ldfminnml d2, d3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0x62,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc6273e3 <unknown>
+
+//------------------------------------------------------------------------------
+// LDBFMINNM
+//------------------------------------------------------------------------------
+
+ldbfminnm h0, h1, [x2]
+// CHECK-INST: ldbfminnm h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0x20,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c207041 <unknown>
+
+ldbfminnm h2, h3, [sp]
+// CHECK-INST: ldbfminnm h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0x22,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c2273e3 <unknown>
+
+// -- ldbfminnma
+
+ldbfminnma h0, h1, [x2]
+// CHECK-INST: ldbfminnma h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0xa0,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ca07041 <unknown>
+
+ldbfminnma h2, h3, [sp]
+// CHECK-INST: ldbfminnma h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0xa2,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ca273e3 <unknown>
+
+// -- ldbfminnmal
+
+ldbfminnmal h0, h1, [x2]
+// CHECK-INST: ldbfminnmal h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0xe0,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ce07041 <unknown>
+
+ldbfminnmal h2, h3, [sp]
+// CHECK-INST: ldbfminnmal h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0xe2,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3ce273e3 <unknown>
+
+// -- ldbfminnml
+
+ldbfminnml h0, h1, [x2]
+// CHECK-INST: ldbfminnml h0, h1, [x2]
+// CHECK-ENCODING: [0x41,0x70,0x60,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c607041 <unknown>
+
+ldbfminnml h2, h3, [sp]
+// CHECK-INST: ldbfminnml h2, h3, [sp]
+// CHECK-ENCODING: [0xe3,0x73,0x62,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c6273e3 <unknown>
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/stfadd-diagnostics.s b/llvm/test/MC/AArch64/LSFE/stfadd-diagnostics.s
new file mode 100644
index 00000000000000..9cfb35f7ca1850
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/stfadd-diagnostics.s
@@ -0,0 +1,73 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s
+
+//------------------------------------------------------------------------------
+// STFADD
+//------------------------------------------------------------------------------
+
+stfadd h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfadd h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stfadd s0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfadd s0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- stfaddl
+
+stfaddl h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfaddl h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stfaddl s0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfaddl s0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+//------------------------------------------------------------------------------
+// STBFADD
+//------------------------------------------------------------------------------
+
+stbfadd s0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfadd s0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stbfadd d0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfadd d0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfadd h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfadd h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfadd h0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfadd h0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+// -- stbfaddl
+
+stbfaddl s0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfaddl s0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stbfaddl d0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfaddl d0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfaddl h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfaddl h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfaddl h0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfaddl h0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/stfadd.s b/llvm/test/MC/AArch64/LSFE/stfadd.s
new file mode 100644
index 00000000000000..5bf3f5eaee9e80
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/stfadd.s
@@ -0,0 +1,121 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+//------------------------------------------------------------------------------
+// STFADD
+//------------------------------------------------------------------------------
+
+stfadd h0, [x2]
+// CHECK-INST: stfadd h0, [x2]
+// CHECK-ENCODING: [0x5f,0x80,0x20,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c20805f <unknown>
+
+stfadd h2, [sp]
+// CHECK-INST: stfadd h2, [sp]
+// CHECK-ENCODING: [0xff,0x83,0x22,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c2283ff <unknown>
+
+stfadd s0, [x2]
+// CHECK-INST: stfadd s0, [x2]
+// CHECK-ENCODING: [0x5f,0x80,0x20,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc20805f <unknown>
+
+stfadd s2, [sp]
+// CHECK-INST: stfadd s2, [sp]
+// CHECK-ENCODING: [0xff,0x83,0x22,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc2283ff <unknown>
+
+stfadd d0, [x2]
+// CHECK-INST: stfadd d0, [x2]
+// CHECK-ENCODING: [0x5f,0x80,0x20,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc20805f <unknown>
+
+stfadd d2, [sp]
+// CHECK-INST: stfadd d2, [sp]
+// CHECK-ENCODING: [0xff,0x83,0x22,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc2283ff <unknown>
+
+// -- stfaddl
+
+stfaddl h0, [x2]
+// CHECK-INST: stfaddl h0, [x2]
+// CHECK-ENCODING: [0x5f,0x80,0x60,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c60805f <unknown>
+
+stfaddl h2, [sp]
+// CHECK-INST: stfaddl h2, [sp]
+// CHECK-ENCODING: [0xff,0x83,0x62,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c6283ff <unknown>
+
+stfaddl s0, [x2]
+// CHECK-INST: stfaddl s0, [x2]
+// CHECK-ENCODING: [0x5f,0x80,0x60,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc60805f <unknown>
+
+stfaddl s2, [sp]
+// CHECK-INST: stfaddl s2, [sp]
+// CHECK-ENCODING: [0xff,0x83,0x62,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc6283ff <unknown>
+
+stfaddl d0, [x2]
+// CHECK-INST: stfaddl d0, [x2]
+// CHECK-ENCODING: [0x5f,0x80,0x60,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc60805f <unknown>
+
+stfaddl d2, [sp]
+// CHECK-INST: stfaddl d2, [sp]
+// CHECK-ENCODING: [0xff,0x83,0x62,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc6283ff <unknown>
+
+//------------------------------------------------------------------------------
+// STBFADD
+//------------------------------------------------------------------------------
+
+stbfadd h0, [x2]
+// CHECK-INST: stbfadd h0, [x2]
+// CHECK-ENCODING: [0x5f,0x80,0x20,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c20805f <unknown>
+
+stbfadd h2, [sp]
+// CHECK-INST: stbfadd h2, [sp]
+// CHECK-ENCODING: [0xff,0x83,0x22,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c2283ff <unknown>
+
+// -- stbfaddl
+
+stbfaddl h0, [x2]
+// CHECK-INST: stbfaddl h0, [x2]
+// CHECK-ENCODING: [0x5f,0x80,0x60,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c60805f <unknown>
+
+stbfaddl h2, [sp]
+// CHECK-INST: stbfaddl h2, [sp]
+// CHECK-ENCODING: [0xff,0x83,0x62,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c6283ff <unknown>
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/stfmax-diagnostics.s b/llvm/test/MC/AArch64/LSFE/stfmax-diagnostics.s
new file mode 100644
index 00000000000000..932ba5ccf6bbdd
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/stfmax-diagnostics.s
@@ -0,0 +1,73 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s
+
+//------------------------------------------------------------------------------
+// STFMAX
+//------------------------------------------------------------------------------
+
+stfmax h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfmax h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stfmax s0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfmax s0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- stfmaxl
+
+stfmaxl h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfmaxl h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stfmaxl s0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfmaxl s0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+//------------------------------------------------------------------------------
+// STBFMAX
+//------------------------------------------------------------------------------
+
+stbfmax s0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmax s0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stbfmax d0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmax d0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfmax h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmax h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfmax h0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmax h0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+// -- stbfmaxl
+
+stbfmaxl s0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmaxl s0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stbfmaxl d0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmaxl d0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfmaxl h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmaxl h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfmaxl h0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmaxl h0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/stfmax.s b/llvm/test/MC/AArch64/LSFE/stfmax.s
new file mode 100644
index 00000000000000..7c2c9ffd26b33f
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/stfmax.s
@@ -0,0 +1,121 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+//------------------------------------------------------------------------------
+// STFMAX
+//------------------------------------------------------------------------------
+
+stfmax h0, [x2]
+// CHECK-INST: stfmax h0, [x2]
+// CHECK-ENCODING: [0x5f,0xc0,0x20,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c20c05f <unknown>
+
+stfmax h2, [sp]
+// CHECK-INST: stfmax h2, [sp]
+// CHECK-ENCODING: [0xff,0xc3,0x22,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c22c3ff <unknown>
+
+stfmax s0, [x2]
+// CHECK-INST: stfmax s0, [x2]
+// CHECK-ENCODING: [0x5f,0xc0,0x20,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc20c05f <unknown>
+
+stfmax s2, [sp]
+// CHECK-INST: stfmax s2, [sp]
+// CHECK-ENCODING: [0xff,0xc3,0x22,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc22c3ff <unknown>
+
+stfmax d0, [x2]
+// CHECK-INST: stfmax d0, [x2]
+// CHECK-ENCODING: [0x5f,0xc0,0x20,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc20c05f <unknown>
+
+stfmax d2, [sp]
+// CHECK-INST: stfmax d2, [sp]
+// CHECK-ENCODING: [0xff,0xc3,0x22,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc22c3ff <unknown>
+
+// -- stfmaxl
+
+stfmaxl h0, [x2]
+// CHECK-INST: stfmaxl h0, [x2]
+// CHECK-ENCODING: [0x5f,0xc0,0x60,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c60c05f <unknown>
+
+stfmaxl h2, [sp]
+// CHECK-INST: stfmaxl h2, [sp]
+// CHECK-ENCODING: [0xff,0xc3,0x62,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c62c3ff <unknown>
+
+stfmaxl s0, [x2]
+// CHECK-INST: stfmaxl s0, [x2]
+// CHECK-ENCODING: [0x5f,0xc0,0x60,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc60c05f <unknown>
+
+stfmaxl s2, [sp]
+// CHECK-INST: stfmaxl s2, [sp]
+// CHECK-ENCODING: [0xff,0xc3,0x62,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc62c3ff <unknown>
+
+stfmaxl d0, [x2]
+// CHECK-INST: stfmaxl d0, [x2]
+// CHECK-ENCODING: [0x5f,0xc0,0x60,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc60c05f <unknown>
+
+stfmaxl d2, [sp]
+// CHECK-INST: stfmaxl d2, [sp]
+// CHECK-ENCODING: [0xff,0xc3,0x62,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc62c3ff <unknown>
+
+//------------------------------------------------------------------------------
+// STBFMAX
+//------------------------------------------------------------------------------
+
+stbfmax h0, [x2]
+// CHECK-INST: stbfmax h0, [x2]
+// CHECK-ENCODING: [0x5f,0xc0,0x20,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c20c05f <unknown>
+
+stbfmax h2, [sp]
+// CHECK-INST: stbfmax h2, [sp]
+// CHECK-ENCODING: [0xff,0xc3,0x22,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c22c3ff <unknown>
+
+// -- stbfmaxl
+
+stbfmaxl h0, [x2]
+// CHECK-INST: stbfmaxl h0, [x2]
+// CHECK-ENCODING: [0x5f,0xc0,0x60,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c60c05f <unknown>
+
+stbfmaxl h2, [sp]
+// CHECK-INST: stbfmaxl h2, [sp]
+// CHECK-ENCODING: [0xff,0xc3,0x62,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c62c3ff <unknown>
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/stfmaxnm-diagnostics.s b/llvm/test/MC/AArch64/LSFE/stfmaxnm-diagnostics.s
new file mode 100644
index 00000000000000..db9ff49b1661c4
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/stfmaxnm-diagnostics.s
@@ -0,0 +1,73 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s
+
+//------------------------------------------------------------------------------
+// STFMAXNM
+//------------------------------------------------------------------------------
+
+stfmaxnm h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfmaxnm h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stfmaxnm s0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfmaxnm s0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- stfmaxnml
+
+stfmaxnml h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfmaxnml h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stfmaxnml s0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfmaxnml s0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+//------------------------------------------------------------------------------
+// STBFMAXNM
+//------------------------------------------------------------------------------
+
+stbfmaxnm s0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmaxnm s0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stbfmaxnm d0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmaxnm d0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfmaxnm h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmaxnm h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfmaxnm h0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmaxnm h0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+// --stbfmaxnml
+
+stbfmaxnml s0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmaxnml s0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stbfmaxnml d0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmaxnml d0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfmaxnml h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmaxnml h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfmaxnml h0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmaxnml h0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/stfmaxnm.s b/llvm/test/MC/AArch64/LSFE/stfmaxnm.s
new file mode 100644
index 00000000000000..3f544fda98c24c
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/stfmaxnm.s
@@ -0,0 +1,121 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+//------------------------------------------------------------------------------
+// STFMAXNM
+//------------------------------------------------------------------------------
+
+stfmaxnm h0, [x2]
+// CHECK-INST: stfmaxnm h0, [x2]
+// CHECK-ENCODING: [0x5f,0xe0,0x20,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c20e05f <unknown>
+
+stfmaxnm h2, [sp]
+// CHECK-INST: stfmaxnm h2, [sp]
+// CHECK-ENCODING: [0xff,0xe3,0x22,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c22e3ff <unknown>
+
+stfmaxnm s0, [x2]
+// CHECK-INST: stfmaxnm s0, [x2]
+// CHECK-ENCODING: [0x5f,0xe0,0x20,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc20e05f <unknown>
+
+stfmaxnm s2, [sp]
+// CHECK-INST: stfmaxnm s2, [sp]
+// CHECK-ENCODING: [0xff,0xe3,0x22,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc22e3ff <unknown>
+
+stfmaxnm d0, [x2]
+// CHECK-INST: stfmaxnm d0, [x2]
+// CHECK-ENCODING: [0x5f,0xe0,0x20,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc20e05f <unknown>
+
+stfmaxnm d2, [sp]
+// CHECK-INST: stfmaxnm d2, [sp]
+// CHECK-ENCODING: [0xff,0xe3,0x22,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc22e3ff <unknown>
+
+// -- stfmaxnml
+
+stfmaxnml h0, [x2]
+// CHECK-INST: stfmaxnml h0, [x2]
+// CHECK-ENCODING: [0x5f,0xe0,0x60,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN:  7c60e05f <unknown>
+
+stfmaxnml h2, [sp]
+// CHECK-INST: stfmaxnml h2, [sp]
+// CHECK-ENCODING: [0xff,0xe3,0x62,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c62e3ff <unknown>
+
+stfmaxnml s0, [x2]
+// CHECK-INST: stfmaxnml s0, [x2]
+// CHECK-ENCODING: [0x5f,0xe0,0x60,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc60e05f <unknown>
+
+stfmaxnml s2, [sp]
+// CHECK-INST: stfmaxnml s2, [sp]
+// CHECK-ENCODING: [0xff,0xe3,0x62,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc62e3ff <unknown>
+
+stfmaxnml d0, [x2]
+// CHECK-INST: stfmaxnml d0, [x2]
+// CHECK-ENCODING: [0x5f,0xe0,0x60,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc60e05f <unknown>
+
+stfmaxnml d2, [sp]
+// CHECK-INST: stfmaxnml d2, [sp]
+// CHECK-ENCODING: [0xff,0xe3,0x62,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc62e3ff <unknown>
+
+//------------------------------------------------------------------------------
+// STBFMAXNM
+//------------------------------------------------------------------------------
+
+stbfmaxnm h0, [x2]
+// CHECK-INST: stbfmaxnm h0, [x2]
+// CHECK-ENCODING: [0x5f,0xe0,0x20,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c20e05f <unknown>
+
+stbfmaxnm h2, [sp]
+// CHECK-INST: stbfmaxnm h2, [sp]
+// CHECK-ENCODING: [0xff,0xe3,0x22,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c22e3ff <unknown>
+
+// -- stbfmaxnml
+
+stbfmaxnml h0, [x2]
+// CHECK-INST: stbfmaxnml h0, [x2]
+// CHECK-ENCODING: [0x5f,0xe0,0x60,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c60e05f <unknown>
+
+stbfmaxnml h2, [sp]
+// CHECK-INST: stbfmaxnml h2, [sp]
+// CHECK-ENCODING: [0xff,0xe3,0x62,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c62e3ff <unknown>

diff  --git a/llvm/test/MC/AArch64/LSFE/stfmin-diagnostics.s b/llvm/test/MC/AArch64/LSFE/stfmin-diagnostics.s
new file mode 100644
index 00000000000000..111c1b56c18162
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/stfmin-diagnostics.s
@@ -0,0 +1,73 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s
+
+//------------------------------------------------------------------------------
+// STFMIN
+//------------------------------------------------------------------------------
+
+stfmin h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfmin h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stfmin s0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfmin s0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- stfminl
+
+stfminl h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfminl h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stfminl s0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfminl s0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+//------------------------------------------------------------------------------
+// STBFMIN
+//------------------------------------------------------------------------------
+
+stbfmin s0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmin s0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stbfmin d0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmin d0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfmin h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmin h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfmin h0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfmin h0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+// -- stbfminl
+
+stbfminl s0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfminl s0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stbfminl d0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfminl d0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfminl h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfminl h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfminl h0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfminl h0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/stfmin.s b/llvm/test/MC/AArch64/LSFE/stfmin.s
new file mode 100644
index 00000000000000..b94689931c9524
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/stfmin.s
@@ -0,0 +1,121 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+//------------------------------------------------------------------------------
+// STFMIN
+//------------------------------------------------------------------------------
+
+stfmin h0, [x2]
+// CHECK-INST: stfmin h0, [x2]
+// CHECK-ENCODING: [0x5f,0xd0,0x20,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c20d05f <unknown>
+
+stfmin h2, [sp]
+// CHECK-INST: stfmin h2, [sp]
+// CHECK-ENCODING: [0xff,0xd3,0x22,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c22d3ff <unknown>
+
+stfmin s0, [x2]
+// CHECK-INST: stfmin s0, [x2]
+// CHECK-ENCODING: [0x5f,0xd0,0x20,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc20d05f <unknown>
+
+stfmin s2, [sp]
+// CHECK-INST: stfmin s2, [sp]
+// CHECK-ENCODING: [0xff,0xd3,0x22,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc22d3ff <unknown>
+
+stfmin d0, [x2]
+// CHECK-INST: stfmin d0, [x2]
+// CHECK-ENCODING: [0x5f,0xd0,0x20,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc20d05f <unknown>
+
+stfmin d2, [sp]
+// CHECK-INST: stfmin d2, [sp]
+// CHECK-ENCODING: [0xff,0xd3,0x22,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc22d3ff <unknown>
+
+// --stfminl
+
+stfminl h0, [x2]
+// CHECK-INST: stfminl h0, [x2]
+// CHECK-ENCODING: [0x5f,0xd0,0x60,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c60d05f <unknown>
+
+stfminl h2, [sp]
+// CHECK-INST: stfminl h2, [sp]
+// CHECK-ENCODING: [0xff,0xd3,0x62,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c62d3ff <unknown>
+
+stfminl s0, [x2]
+// CHECK-INST: stfminl s0, [x2]
+// CHECK-ENCODING: [0x5f,0xd0,0x60,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc60d05f <unknown>
+
+stfminl s2, [sp]
+// CHECK-INST: stfminl s2, [sp]
+// CHECK-ENCODING: [0xff,0xd3,0x62,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc62d3ff <unknown>
+
+stfminl d0, [x2]
+// CHECK-INST: stfminl d0, [x2]
+// CHECK-ENCODING: [0x5f,0xd0,0x60,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc60d05f <unknown>
+
+stfminl d2, [sp]
+// CHECK-INST: stfminl d2, [sp]
+// CHECK-ENCODING: [0xff,0xd3,0x62,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc62d3ff <unknown>
+
+//------------------------------------------------------------------------------
+// STBFMIN
+//------------------------------------------------------------------------------
+
+stbfmin h0, [x2]
+// CHECK-INST: stbfmin h0, [x2]
+// CHECK-ENCODING: [0x5f,0xd0,0x20,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c20d05f <unknown>
+
+stbfmin h2, [sp]
+// CHECK-INST: stbfmin h2, [sp]
+// CHECK-ENCODING: [0xff,0xd3,0x22,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c22d3ff <unknown>
+
+// -- stbfminl
+
+stbfminl h0, [x2]
+// CHECK-INST: stbfminl h0, [x2]
+// CHECK-ENCODING: [0x5f,0xd0,0x60,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c60d05f <unknown>
+
+stbfminl h2, [sp]
+// CHECK-INST: stbfminl h2, [sp]
+// CHECK-ENCODING: [0xff,0xd3,0x62,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c62d3ff <unknown>
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/stfminnm-diagnostics.s b/llvm/test/MC/AArch64/LSFE/stfminnm-diagnostics.s
new file mode 100644
index 00000000000000..cfaae50b17adf8
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/stfminnm-diagnostics.s
@@ -0,0 +1,73 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s
+
+//------------------------------------------------------------------------------
+// STFMINNM
+//------------------------------------------------------------------------------
+
+stfminnm h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfminnm h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stfminnm s0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfminnm s0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// -- stfminnml
+
+stfminnml h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfminnml h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stfminnml s0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stfminnml s0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+//------------------------------------------------------------------------------
+// STBFMINNM
+//------------------------------------------------------------------------------
+
+stbfminnm s0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfminnm s0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stbfminnm d0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfminnm d0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfminnm h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfminnm h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfminnm h0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfminnm h0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+// -- stbfminnml
+
+stbfminnml s0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfminnml s0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+stbfminnml d0, [x2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfminnml d0, [x2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfminnml h0, [w2]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfminnml h0, [w2]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
+
+stbfminnml h0, [x2, #4]
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// CHECK-NEXT: stbfminnml h0, [x2, #4]
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}
\ No newline at end of file

diff  --git a/llvm/test/MC/AArch64/LSFE/stfminnm.s b/llvm/test/MC/AArch64/LSFE/stfminnm.s
new file mode 100644
index 00000000000000..20c429cca588cb
--- /dev/null
+++ b/llvm/test/MC/AArch64/LSFE/stfminnm.s
@@ -0,0 +1,121 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \
+// RUN:        | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+//------------------------------------------------------------------------------
+// STFMINNM
+//------------------------------------------------------------------------------
+
+stfminnm h0, [x2]
+// CHECK-INST: stfminnm h0, [x2]
+// CHECK-ENCODING: [0x5f,0xf0,0x20,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c20f05f <unknown>
+
+stfminnm h2, [sp]
+// CHECK-INST: stfminnm h2, [sp]
+// CHECK-ENCODING: [0xff,0xf3,0x22,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c22f3ff <unknown>
+
+stfminnm s0, [x2]
+// CHECK-INST: stfminnm s0, [x2]
+// CHECK-ENCODING: [0x5f,0xf0,0x20,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc20f05f <unknown>
+
+stfminnm s2, [sp]
+// CHECK-INST: stfminnm s2, [sp]
+// CHECK-ENCODING: [0xff,0xf3,0x22,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc22f3ff <unknown>
+
+stfminnm d0, [x2]
+// CHECK-INST: stfminnm d0, [x2]
+// CHECK-ENCODING: [0x5f,0xf0,0x20,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc20f05f <unknown>
+
+stfminnm d2, [sp]
+// CHECK-INST: stfminnm d2, [sp]
+// CHECK-ENCODING: [0xff,0xf3,0x22,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc22f3ff <unknown>
+
+// -- stfminnml
+
+stfminnml h0, [x2]
+// CHECK-INST: stfminnml h0, [x2]
+// CHECK-ENCODING: [0x5f,0xf0,0x60,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c60f05f <unknown>
+
+stfminnml h2, [sp]
+// CHECK-INST: stfminnml h2, [sp]
+// CHECK-ENCODING: [0xff,0xf3,0x62,0x7c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 7c62f3ff <unknown>
+
+stfminnml s0, [x2]
+// CHECK-INST: stfminnml s0, [x2]
+// CHECK-ENCODING: [0x5f,0xf0,0x60,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc60f05f <unknown>
+
+stfminnml s2, [sp]
+// CHECK-INST: stfminnml s2, [sp]
+// CHECK-ENCODING: [0xff,0xf3,0x62,0xbc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: bc62f3ff <unknown>
+
+stfminnml d0, [x2]
+// CHECK-INST: stfminnml d0, [x2]
+// CHECK-ENCODING: [0x5f,0xf0,0x60,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc60f05f <unknown>
+
+stfminnml d2, [sp]
+// CHECK-INST: stfminnml d2, [sp]
+// CHECK-ENCODING: [0xff,0xf3,0x62,0xfc]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: fc62f3ff <unknown>
+
+//------------------------------------------------------------------------------
+// STBFMINNM
+//------------------------------------------------------------------------------
+
+stbfminnm h0, [x2]
+// CHECK-INST: stbfminnm h0, [x2]
+// CHECK-ENCODING: [0x5f,0xf0,0x20,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c20f05f <unknown>
+
+stbfminnm h2, [sp]
+// CHECK-INST: stbfminnm h2, [sp]
+// CHECK-ENCODING: [0xff,0xf3,0x22,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c22f3ff <unknown>
+
+// -- stbfminnml
+
+stbfminnml h0, [x2]
+// CHECK-INST: stbfminnml h0, [x2]
+// CHECK-ENCODING: [0x5f,0xf0,0x60,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c60f05f <unknown>
+
+stbfminnml h2, [sp]
+// CHECK-INST: stbfminnml h2, [sp]
+// CHECK-ENCODING: [0xff,0xf3,0x62,0x3c]
+// CHECK-ERROR: instruction requires: lsfe
+// CHECK-UNKNOWN: 3c62f3ff <unknown>
\ No newline at end of file


        


More information about the llvm-commits mailing list