[llvm] 9a8727d - [LoongArch] Remove AssemblerPredicate for features: f/d/lsx/lasx/lvz/lbt

Weining Lu via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 25 19:38:16 PDT 2023


Author: Weining Lu
Date: 2023-06-26T10:37:30+08:00
New Revision: 9a8727df35da562a3bd18f7356647092f1059188

URL: https://github.com/llvm/llvm-project/commit/9a8727df35da562a3bd18f7356647092f1059188
DIFF: https://github.com/llvm/llvm-project/commit/9a8727df35da562a3bd18f7356647092f1059188.diff

LOG: [LoongArch] Remove AssemblerPredicate for features: f/d/lsx/lasx/lvz/lbt

Linux LoongArch port [1] uses `-msoft-float` (implies no FPU) in its
`cflags` while it also uses floating-point insns in asm sources [2].
GAS allows this usage while IAS currently does not.

This patch removes `AssemblerPredicate`s for floating-point insns so
that to make IAS compitable with GAS. Similarly, also remove
`AssemblerPredicate`s for other ISA extensions, i.e. lsx/las/lvz/lbt.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/Makefile?h=v6.4-rc1#n49
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/kernel/fpu.S?h=v6.4-rc1#n29

Reviewed By: xen0n, hev

Differential Revision: https://reviews.llvm.org/D150196

Added: 
    

Modified: 
    llvm/lib/Target/LoongArch/LoongArch.td
    llvm/test/MC/LoongArch/Basic/Float/d-arith.s
    llvm/test/MC/LoongArch/Basic/Float/d-bound-check.s
    llvm/test/MC/LoongArch/Basic/Float/d-branch.s
    llvm/test/MC/LoongArch/Basic/Float/d-comp.s
    llvm/test/MC/LoongArch/Basic/Float/d-conv.s
    llvm/test/MC/LoongArch/Basic/Float/d-invalid.s
    llvm/test/MC/LoongArch/Basic/Float/d-memory.s
    llvm/test/MC/LoongArch/Basic/Float/d-move.s
    llvm/test/MC/LoongArch/Basic/Float/f-arith.s
    llvm/test/MC/LoongArch/Basic/Float/f-bound-check.s
    llvm/test/MC/LoongArch/Basic/Float/f-branch.s
    llvm/test/MC/LoongArch/Basic/Float/f-comp.s
    llvm/test/MC/LoongArch/Basic/Float/f-conv.s
    llvm/test/MC/LoongArch/Basic/Float/f-memory.s
    llvm/test/MC/LoongArch/Basic/Float/f-move.s
    llvm/test/MC/LoongArch/Basic/Integer/invalid.s

Removed: 
    llvm/test/MC/LoongArch/Basic/Float/f-invalid.s


################################################################################
diff  --git a/llvm/lib/Target/LoongArch/LoongArch.td b/llvm/lib/Target/LoongArch/LoongArch.td
index dbca1fa97f75a..6f4af3dc20b00 100644
--- a/llvm/lib/Target/LoongArch/LoongArch.td
+++ b/llvm/lib/Target/LoongArch/LoongArch.td
@@ -36,57 +36,39 @@ def LA64 : HwMode<"+64bit", [IsLA64]>;
 def FeatureBasicF
     : SubtargetFeature<"f", "HasBasicF", "true",
                        "'F' (Single-Precision Floating-Point)">;
-def HasBasicF
-    : Predicate<"Subtarget->hasBasicF()">,
-      AssemblerPredicate<(all_of FeatureBasicF),
-                         "'F' (Single-Precision Floating-Point)">;
+def HasBasicF : Predicate<"Subtarget->hasBasicF()">;
 
 // Double Precision floating point
 def FeatureBasicD
     : SubtargetFeature<"d", "HasBasicD", "true",
                        "'D' (Double-Precision Floating-Point)",
                        [FeatureBasicF]>;
-def HasBasicD
-    : Predicate<"Subtarget->hasBasicD()">,
-      AssemblerPredicate<(all_of FeatureBasicD),
-                         "'D' (Double-Precision Floating-Point)">;
+def HasBasicD : Predicate<"Subtarget->hasBasicD()">;
 
 // Loongson SIMD eXtension (LSX)
 def FeatureExtLSX
     : SubtargetFeature<"lsx", "HasExtLSX", "true",
                        "'LSX' (Loongson SIMD Extension)", [FeatureBasicD]>;
-def HasExtLSX
-    : Predicate<"Subtarget->hasExtLSX()">,
-      AssemblerPredicate<(all_of FeatureExtLSX),
-                         "'LSX' (Loongson SIMD Extension)">;
+def HasExtLSX : Predicate<"Subtarget->hasExtLSX()">;
 
 // Loongson Advanced SIMD eXtension (LASX)
 def FeatureExtLASX
     : SubtargetFeature<"lasx", "HasExtLASX", "true",
                        "'LASX' (Loongson Advanced SIMD Extension)",
                        [FeatureExtLSX]>;
-def HasExtLASX
-    : Predicate<"Subtarget->hasExtLASX()">,
-      AssemblerPredicate<(all_of FeatureExtLASX),
-                         "'LASX' (Loongson Advanced SIMD Extension)">;
+def HasExtLASX : Predicate<"Subtarget->hasExtLASX()">;
 
 // Loongson VirtualiZation (LVZ)
 def FeatureExtLVZ
     : SubtargetFeature<"lvz", "HasExtLVZ", "true",
                        "'LVZ' (Loongson Virtualization Extension)">;
-def HasExtLVZ
-    : Predicate<"Subtarget->hasExtLVZ()">,
-      AssemblerPredicate<(all_of FeatureExtLVZ),
-                         "'LVZ' (Loongson Virtualization Extension)">;
+def HasExtLVZ : Predicate<"Subtarget->hasExtLVZ()">;
 
 // Loongson Binary Translation (LBT)
 def FeatureExtLBT
     : SubtargetFeature<"lbt", "HasExtLBT", "true",
                        "'LBT' (Loongson Binary Translation Extension)">;
-def HasExtLBT
-    : Predicate<"Subtarget->hasExtLBT()">,
-      AssemblerPredicate<(all_of FeatureExtLBT),
-                         "'LBT' (Loongson Binary Translation Extension)">;
+def HasExtLBT : Predicate<"Subtarget->hasExtLBT()">;
 
 // Expand la.global as la.pcrel
 def LaGlobalWithPcrel

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/d-arith.s b/llvm/test/MC/LoongArch/Basic/Float/d-arith.s
index 5639ec886017f..6b2c67e9a2cc1 100644
--- a/llvm/test/MC/LoongArch/Basic/Float/d-arith.s
+++ b/llvm/test/MC/LoongArch/Basic/Float/d-arith.s
@@ -1,11 +1,11 @@
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+d --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+d --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch64 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+d --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+d --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
 

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/d-bound-check.s b/llvm/test/MC/LoongArch/Basic/Float/d-bound-check.s
index bd625dc5549f8..414d1329caf35 100644
--- a/llvm/test/MC/LoongArch/Basic/Float/d-bound-check.s
+++ b/llvm/test/MC/LoongArch/Basic/Float/d-bound-check.s
@@ -1,11 +1,11 @@
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+d --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+d --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch64 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+d --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+d --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
 

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/d-branch.s b/llvm/test/MC/LoongArch/Basic/Float/d-branch.s
index a310cb755fcdc..06198d8e4d992 100644
--- a/llvm/test/MC/LoongArch/Basic/Float/d-branch.s
+++ b/llvm/test/MC/LoongArch/Basic/Float/d-branch.s
@@ -1,11 +1,11 @@
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+d --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+d --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch64 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+d --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+d --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
 

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/d-comp.s b/llvm/test/MC/LoongArch/Basic/Float/d-comp.s
index 07f3b6276017f..19abebd9d817b 100644
--- a/llvm/test/MC/LoongArch/Basic/Float/d-comp.s
+++ b/llvm/test/MC/LoongArch/Basic/Float/d-comp.s
@@ -1,11 +1,11 @@
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+d --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+d --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch64 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+d --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+d --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
 

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/d-conv.s b/llvm/test/MC/LoongArch/Basic/Float/d-conv.s
index 10dd822a4c922..2d6eae98d5381 100644
--- a/llvm/test/MC/LoongArch/Basic/Float/d-conv.s
+++ b/llvm/test/MC/LoongArch/Basic/Float/d-conv.s
@@ -1,11 +1,11 @@
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+d --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+d --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch64 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+d --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+d --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
 

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/d-invalid.s b/llvm/test/MC/LoongArch/Basic/Float/d-invalid.s
index b38a4461afcb4..255fd839e08a3 100644
--- a/llvm/test/MC/LoongArch/Basic/Float/d-invalid.s
+++ b/llvm/test/MC/LoongArch/Basic/Float/d-invalid.s
@@ -1,4 +1,4 @@
-# RUN: not llvm-mc --triple=loongarch32 -mattr=+d %s 2>&1 | FileCheck %s
+# RUN: not llvm-mc --triple=loongarch32 %s 2>&1 | FileCheck %s
 
 # CHECK: :[[#@LINE+1]]:1: error: instruction requires the following: LA64 Basic Integer and Privilege Instruction Set
 movgr2fr.d $fa0, $a0

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/d-memory.s b/llvm/test/MC/LoongArch/Basic/Float/d-memory.s
index 4cb7e6fe951c1..bce4563de86f0 100644
--- a/llvm/test/MC/LoongArch/Basic/Float/d-memory.s
+++ b/llvm/test/MC/LoongArch/Basic/Float/d-memory.s
@@ -1,11 +1,11 @@
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+d --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+d --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch64 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+d --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+d --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
 

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/d-move.s b/llvm/test/MC/LoongArch/Basic/Float/d-move.s
index c5d4b6a5fda97..afe8a51ec1b64 100644
--- a/llvm/test/MC/LoongArch/Basic/Float/d-move.s
+++ b/llvm/test/MC/LoongArch/Basic/Float/d-move.s
@@ -1,11 +1,11 @@
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+d --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+d --show-encoding --defsym=LA64=1 \
+# RUN: llvm-mc %s --triple=loongarch64 --show-encoding --defsym=LA64=1 \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM,ASM-AND-OBJ64,ASM64 %s
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+d --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+d --filetype=obj --defsym=LA64=1 \
+# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj --defsym=LA64=1 \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM-AND-OBJ64 %s
 

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/f-arith.s b/llvm/test/MC/LoongArch/Basic/Float/f-arith.s
index 5865d6b6e152f..155e783cf4350 100644
--- a/llvm/test/MC/LoongArch/Basic/Float/f-arith.s
+++ b/llvm/test/MC/LoongArch/Basic/Float/f-arith.s
@@ -1,11 +1,11 @@
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+f --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+f --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch64 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+f --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+f --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
 

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/f-bound-check.s b/llvm/test/MC/LoongArch/Basic/Float/f-bound-check.s
index cdfb67b52af0c..4b56bebf3aa6d 100644
--- a/llvm/test/MC/LoongArch/Basic/Float/f-bound-check.s
+++ b/llvm/test/MC/LoongArch/Basic/Float/f-bound-check.s
@@ -1,11 +1,11 @@
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+f --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+f --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch64 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+f --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+f --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
 

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/f-branch.s b/llvm/test/MC/LoongArch/Basic/Float/f-branch.s
index 656808f60f4f6..2ac63cdc7c9b5 100644
--- a/llvm/test/MC/LoongArch/Basic/Float/f-branch.s
+++ b/llvm/test/MC/LoongArch/Basic/Float/f-branch.s
@@ -1,11 +1,11 @@
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+f --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+f --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch64 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+f --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+f --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
 

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/f-comp.s b/llvm/test/MC/LoongArch/Basic/Float/f-comp.s
index 8ba38426d3aa7..221bea21ca13d 100644
--- a/llvm/test/MC/LoongArch/Basic/Float/f-comp.s
+++ b/llvm/test/MC/LoongArch/Basic/Float/f-comp.s
@@ -1,11 +1,11 @@
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+f --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+f --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch64 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+f --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+f --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
 

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/f-conv.s b/llvm/test/MC/LoongArch/Basic/Float/f-conv.s
index 069dab10c25a0..b68c472cdbf11 100644
--- a/llvm/test/MC/LoongArch/Basic/Float/f-conv.s
+++ b/llvm/test/MC/LoongArch/Basic/Float/f-conv.s
@@ -1,11 +1,11 @@
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+f --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+f --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch64 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+f --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+f --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
 

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/f-invalid.s b/llvm/test/MC/LoongArch/Basic/Float/f-invalid.s
deleted file mode 100644
index 2ab91b3f1a777..0000000000000
--- a/llvm/test/MC/LoongArch/Basic/Float/f-invalid.s
+++ /dev/null
@@ -1,4 +0,0 @@
-# RUN: not llvm-mc --triple=loongarch32 -mattr=+f %s 2>&1 | FileCheck %s
-
-# CHECK: :[[#@LINE+1]]:1: error: instruction requires the following: 'D' (Double-Precision Floating-Point)
-fadd.d $fa0, $fa0, $fa0

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/f-memory.s b/llvm/test/MC/LoongArch/Basic/Float/f-memory.s
index a614e867e1d92..935deb3ebc232 100644
--- a/llvm/test/MC/LoongArch/Basic/Float/f-memory.s
+++ b/llvm/test/MC/LoongArch/Basic/Float/f-memory.s
@@ -1,11 +1,11 @@
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+f --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+f --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch64 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+f --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+f --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
 

diff  --git a/llvm/test/MC/LoongArch/Basic/Float/f-move.s b/llvm/test/MC/LoongArch/Basic/Float/f-move.s
index 26702d60b68a0..ed6d68f438a73 100644
--- a/llvm/test/MC/LoongArch/Basic/Float/f-move.s
+++ b/llvm/test/MC/LoongArch/Basic/Float/f-move.s
@@ -1,11 +1,11 @@
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+f --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+f --show-encoding \
+# RUN: llvm-mc %s --triple=loongarch64 --show-encoding \
 # RUN:     | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
-# RUN: llvm-mc %s --triple=loongarch32 --mattr=+f --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
-# RUN: llvm-mc %s --triple=loongarch64 --mattr=+f --filetype=obj \
+# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj \
 # RUN:     | llvm-objdump -d - \
 # RUN:     | FileCheck --check-prefix=ASM-AND-OBJ %s
 

diff  --git a/llvm/test/MC/LoongArch/Basic/Integer/invalid.s b/llvm/test/MC/LoongArch/Basic/Integer/invalid.s
index b226d8c9b7d24..958d5cab6f2f3 100644
--- a/llvm/test/MC/LoongArch/Basic/Integer/invalid.s
+++ b/llvm/test/MC/LoongArch/Basic/Integer/invalid.s
@@ -1,9 +1,7 @@
 ## Test invalid instructions on both loongarch32 and loongarch64 target.
 
-# RUN: not llvm-mc --triple=loongarch32 --mattr=-f %s 2>&1 \
-# RUN:         | FileCheck %s --check-prefixes=CHECK,CHECK64
-# RUN: not llvm-mc --triple=loongarch64 --mattr=-f %s 2>&1 --defsym=LA64=1 \
-# RUN:         | FileCheck %s
+# RUN: not llvm-mc --triple=loongarch32 %s 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK64
+# RUN: not llvm-mc --triple=loongarch64 %s 2>&1 --defsym=LA64=1 | FileCheck %s
 
 ## Out of range immediates
 ## uimm2
@@ -181,12 +179,6 @@ andi $a0, $a0
 ## Instructions outside the base integer ISA
 ## TODO: Test instructions in LSX/LASX/LBT/LVZ after their introduction.
 
-## Floating-Point mnemonics
-fadd.s $fa0, $fa0, $fa0
-# CHECK:   :[[#@LINE-1]]:1: error: instruction requires the following: 'F' (Single-Precision Floating-Point)
-fadd.d $fa0, $fa0, $fa0
-# CHECK:   :[[#@LINE-1]]:1: error: instruction requires the following: 'D' (Double-Precision Floating-Point)
-
 ## Using floating point registers when integer registers are expected
 sll.w $a0, $a0, $fa0
 # CHECK: :[[#@LINE-1]]:18: error: invalid operand for instruction


        


More information about the llvm-commits mailing list