https://github.com/el-ev updated 
https://github.com/llvm/llvm-project/pull/139508

>From 450f49c9707bf8224e37de0cba45404d06b7e1ea Mon Sep 17 00:00:00 2001
From: Iris Shi <0...@owo.li>
Date: Mon, 12 May 2025 15:04:28 +0800
Subject: [PATCH] [RISCV][MC] Add Q support for Zfa

---
 llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td |  29 ++
 llvm/test/MC/RISCV/rv64zfa-only-valid.s    |  19 +
 llvm/test/MC/RISCV/zfa-invalid.s           |  13 +-
 llvm/test/MC/RISCV/zfa-quad-invalid.s      |  42 +++
 llvm/test/MC/RISCV/zfa-valid.s             | 391 ++++++++++++++++++++-
 5 files changed, 484 insertions(+), 10 deletions(-)
 create mode 100644 llvm/test/MC/RISCV/rv64zfa-only-valid.s
 create mode 100644 llvm/test/MC/RISCV/zfa-quad-invalid.s

diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td 
b/llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td
index 8a449d32e0104..0ad654db42f5c 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td
@@ -175,6 +175,28 @@ def FLEQ_H : FPCmp_rr<0b1010010, 0b100, "fleq.h", FPR16>;
 }
 } // Predicates = [HasStdExtZfa, HasStdExtZfh]
 
+let Predicates = [HasStdExtZfa, HasStdExtQ] in {
+let isReMaterializable = 1, isAsCheapAsAMove = 1 in
+def FLI_Q : FPFLI_r<0b1111011, 0b00001, 0b000, FPR128, "fli.q">;
+
+def FMINM_Q: FPALU_rr<0b0010111, 0b010, "fminm.q", FPR128, Commutable=1>;
+def FMAXM_Q: FPALU_rr<0b0010111, 0b011, "fmaxm.q", FPR128, Commutable=1>;
+
+def FROUND_Q : FPUnaryOp_r_frm<0b0100011, 0b00100, FPR128, FPR128, "fround.q">;
+def FROUNDNX_Q : FPUnaryOp_r_frm<0b0100011, 0b00101, FPR128, FPR128, 
+                                 "froundnx.q">;
+
+def FLTQ_Q : FPCmp_rr<0b1010011, 0b101, "fltq.q", FPR128>;
+def FLEQ_Q : FPCmp_rr<0b1010011, 0b100, "fleq.q", FPR128>;
+} // Predicates = [HasStdExtZfa, HasStdExtQ]
+
+let Predicates = [HasStdExtZfa, HasStdExtQ, IsRV64] in {
+  let mayRaiseFPException = 0 in {
+    def FMVH_X_Q : FPUnaryOp_r<0b1110011, 0b00001, 0b000, GPR, FPR128, 
"fmvh.x.q">;
+    def FMVP_Q_X : FPBinaryOp_rr<0b1011011, 0b000, FPR128, GPR, "fmvp.q.x">;
+  }
+} // Predicates = [HasStdExtZfa, HasStdExtQ, IsRV64]
+
 
//===----------------------------------------------------------------------===//
 // Pseudo-instructions and codegen patterns
 
//===----------------------------------------------------------------------===//
@@ -200,6 +222,13 @@ def : InstAlias<"fgeq.h $rd, $rs, $rt",
                 (FLEQ_H GPR:$rd, FPR16:$rt, FPR16:$rs), 0>;
 }
 
+let Predicates = [HasStdExtZfa, HasStdExtQ] in {
+def : InstAlias<"fgtq.q $rd, $rs, $rt",
+                (FLTQ_Q GPR:$rd, FPR128:$rt, FPR128:$rs), 0>;
+def : InstAlias<"fgeq.q $rd, $rs, $rt",
+                (FLEQ_Q GPR:$rd, FPR128:$rt, FPR128:$rs), 0>;
+}
+
 
//===----------------------------------------------------------------------===//
 // Codegen patterns
 
//===----------------------------------------------------------------------===//
diff --git a/llvm/test/MC/RISCV/rv64zfa-only-valid.s 
b/llvm/test/MC/RISCV/rv64zfa-only-valid.s
new file mode 100644
index 0000000000000..95fb253b145c1
--- /dev/null
+++ b/llvm/test/MC/RISCV/rv64zfa-only-valid.s
@@ -0,0 +1,19 @@
+# RUN: llvm-mc %s -triple=riscv64 -mattr=+zfa,+q,+zfh -M no-aliases 
-show-encoding \
+# RUN:     | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
+# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+zfa,+q,+zfh < %s \
+# RUN:     | llvm-objdump --mattr=+zfa,+q,+zfh -M no-aliases -d -r - \
+# RUN:     | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
+#
+# RUN: not llvm-mc -triple riscv64 -mattr=+q,+zfh \
+# RUN:     -M no-aliases -show-encoding < %s 2>&1 \
+# RUN:     | FileCheck -check-prefixes=CHECK-NO-EXT %s
+
+# CHECK-ASM-AND-OBJ: fmvh.x.q a1, fs1
+# CHECK-ASM: encoding: [0xd3,0x85,0x14,0xe6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fmvh.x.q a1, fs1
+
+# CHECK-ASM-AND-OBJ: fmvp.q.x fs1, a1, a2
+# CHECK-ASM: encoding: [0xd3,0x84,0xc5,0xb6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fmvp.q.x fs1, a1, a2
diff --git a/llvm/test/MC/RISCV/zfa-invalid.s b/llvm/test/MC/RISCV/zfa-invalid.s
index c2537c3fc5102..cedc9279db3cb 100644
--- a/llvm/test/MC/RISCV/zfa-invalid.s
+++ b/llvm/test/MC/RISCV/zfa-invalid.s
@@ -1,5 +1,5 @@
-# RUN: not llvm-mc -triple riscv64 -mattr=+zfa,+d,+zfh < %s 2>&1 | FileCheck 
-check-prefixes=CHECK-NO-RV32 %s
-# RUN: not llvm-mc -triple riscv32 -mattr=+zfa,+d,+zfh < %s 2>&1 | FileCheck 
-check-prefixes=CHECK-NO-RV64 %s
+# RUN: not llvm-mc -triple riscv64 -mattr=+zfa,+q,+zfh < %s 2>&1 | FileCheck 
-check-prefixes=CHECK-NO-RV32 %s
+# RUN: not llvm-mc -triple riscv32 -mattr=+zfa,+q,+zfh < %s 2>&1 | FileCheck 
-check-prefixes=CHECK-NO-RV64 %s
 
 # Invalid rounding modes
 # CHECK-NO-RV64: error: operand must be 'rtz' floating-point rounding mode
@@ -35,6 +35,10 @@ fli.d ft1, 3.560000e+02
 # CHECK-NO-RV32: error: operand must be a valid floating-point constant
 fli.h ft1, 1.600000e+00
 
+# CHECK-NO-RV64: error: operand must be a valid floating-point constant
+# CHECK-NO-RV32: error: operand must be a valid floating-point constant
+fli.q ft1, 2.250000e+00
+
 # CHECK-NO-RV64: error: invalid floating point immediate
 # CHECK-NO-RV32: error: invalid floating point immediate
 fli.s ft1, -min
@@ -72,6 +76,11 @@ fli.d ft1, 
1.1754943508222875079687365372222456778186655567720875215087517062784
 # CHECK-NO-RV32: error: operand must be a valid floating-point constant
 fli.h ft1, 
1.1754943508222875079687365372222456778186655567720875215087517062784172594547271728515625e-38
 
+# Don't accept single precision minimum for quad.
+# CHECK-NO-RV64: error: operand must be a valid floating-point constant
+# CHECK-NO-RV32: error: operand must be a valid floating-point constant
+fli.q ft1, 
1.1754943508222875079687365372222456778186655567720875215087517062784172594547271728515625e-38
+
 # Don't accept integers.
 # CHECK-NO-RV32: error: invalid floating point immediate
 # CHECK-NO-RV64: error: invalid floating point immediate
diff --git a/llvm/test/MC/RISCV/zfa-quad-invalid.s 
b/llvm/test/MC/RISCV/zfa-quad-invalid.s
new file mode 100644
index 0000000000000..3ca89c6ebe627
--- /dev/null
+++ b/llvm/test/MC/RISCV/zfa-quad-invalid.s
@@ -0,0 +1,42 @@
+# RUN: not llvm-mc -triple riscv32 -mattr=+zfa,+zfh \
+# RUN:     -M no-aliases -show-encoding < %s 2>&1 \
+# RUN:     | FileCheck -check-prefixes=CHECK-NO-EXTQ %s
+# RUN: not llvm-mc -triple riscv64 -mattr=+zfa,+zfh \
+# RUN:     -M no-aliases -show-encoding < %s 2>&1 \
+# RUN:     | FileCheck -check-prefixes=CHECK-NO-EXTQ %s
+
+# CHECK-NO-EXTQ: error: instruction requires the following: 'Q' 
(Quad-Precision Floating-Point){{$}}
+fminm.q fa0, fa1, fa2
+
+# CHECK-NO-EXTQ: error: instruction requires the following: 'Q' 
(Quad-Precision Floating-Point){{$}}
+fmaxm.q fs3, fs4, fs5
+
+# CHECK-NO-EXTQ: error: instruction requires the following: 'Q' 
(Quad-Precision Floating-Point){{$}}
+fround.q fs1, fs2
+
+# CHECK-NO-EXTQ: error: instruction requires the following: 'Q' 
(Quad-Precision Floating-Point){{$}}
+fround.q fs1, fs2, dyn
+
+# CHECK-NO-EXTQ: error: instruction requires the following: 'Q' 
(Quad-Precision Floating-Point){{$}}
+fround.q fs1, fs2, rtz
+
+# CHECK-NO-EXTQ: error: instruction requires the following: 'Q' 
(Quad-Precision Floating-Point){{$}}
+fround.q fs1, fs2, rne
+
+# CHECK-NO-EXTQ: error: instruction requires the following: 'Q' 
(Quad-Precision Floating-Point){{$}}
+froundnx.q fs1, fs2
+
+# CHECK-NO-EXTQ: error: instruction requires the following: 'Q' 
(Quad-Precision Floating-Point){{$}}
+froundnx.q fs1, fs2, dyn
+
+# CHECK-NO-EXTQ: error: instruction requires the following: 'Q' 
(Quad-Precision Floating-Point){{$}}
+froundnx.q fs1, fs2, rtz
+
+# CHECK-NO-EXTQ: error: instruction requires the following: 'Q' 
(Quad-Precision Floating-Point){{$}}
+froundnx.q fs1, fs2, rne
+
+# CHECK-NO-EXTQ: error: instruction requires the following: 'Q' 
(Quad-Precision Floating-Point){{$}}
+fltq.q a1, fs1, fs2
+
+# CHECK-NO-EXTQ: error: instruction requires the following: 'Q' 
(Quad-Precision Floating-Point){{$}}
+fleq.q a1, ft1, ft2
diff --git a/llvm/test/MC/RISCV/zfa-valid.s b/llvm/test/MC/RISCV/zfa-valid.s
index 6e78a4c0f2584..edf830642c263 100644
--- a/llvm/test/MC/RISCV/zfa-valid.s
+++ b/llvm/test/MC/RISCV/zfa-valid.s
@@ -1,18 +1,18 @@
-# RUN: llvm-mc %s -triple=riscv32 -mattr=+zfa,+d,+zfh -M no-aliases 
-show-encoding \
+# RUN: llvm-mc %s -triple=riscv32 -mattr=+zfa,+q,+zfh -M no-aliases 
-show-encoding \
 # RUN:     | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
-# RUN: llvm-mc %s -triple=riscv64 -mattr=+zfa,+d,+zfh -M no-aliases 
-show-encoding \
+# RUN: llvm-mc %s -triple=riscv64 -mattr=+zfa,+q,+zfh -M no-aliases 
-show-encoding \
 # RUN:     | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
-# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+zfa,+d,+zfh < %s \
-# RUN:     | llvm-objdump --mattr=+zfa,+d,+zfh -M no-aliases -d -r - \
+# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+zfa,+q,+zfh < %s \
+# RUN:     | llvm-objdump --mattr=+zfa,+q,+zfh -M no-aliases -d -r - \
 # RUN:     | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
-# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+zfa,+d,+zfh < %s \
-# RUN:     | llvm-objdump --mattr=+zfa,+d,+zfh -M no-aliases -d -r - \
+# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+zfa,+q,+zfh < %s \
+# RUN:     | llvm-objdump --mattr=+zfa,+q,+zfh -M no-aliases -d -r - \
 # RUN:     | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
 #
-# RUN: not llvm-mc -triple riscv32 -mattr=+d,+zfh \
+# RUN: not llvm-mc -triple riscv32 -mattr=+q,+zfh \
 # RUN:     -M no-aliases -show-encoding < %s 2>&1 \
 # RUN:     | FileCheck -check-prefixes=CHECK-NO-EXT %s
-# RUN: not llvm-mc -triple riscv64 -mattr=+d,+zfh \
+# RUN: not llvm-mc -triple riscv64 -mattr=+q,+zfh \
 # RUN:     -M no-aliases -show-encoding < %s 2>&1 \
 # RUN:     | FileCheck -check-prefixes=CHECK-NO-EXT %s
 
@@ -933,6 +933,311 @@ fli.h ft1, INF
 # CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
 fli.h ft1, nan
 
+# CHECK-ASM-AND-OBJ: fli.q ft1, -1.0
+# CHECK-ASM: encoding: [0xd3,0x00,0x10,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, -1.000000e+00
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, -1.0
+# CHECK-ASM: encoding: [0xd3,0x00,0x10,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, -0x1p+0
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, min
+# CHECK-ASM: encoding: [0xd3,0x80,0x10,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, min
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 1.52587890625e-05
+# CHECK-ASM: encoding: [0xd3,0x00,0x11,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 1.52587890625e-05
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 1.52587890625e-05
+# CHECK-ASM: encoding: [0xd3,0x00,0x11,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p-16
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 3.0517578125e-05
+# CHECK-ASM: encoding: [0xd3,0x80,0x11,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 3.0517578125e-05
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 3.0517578125e-05
+# CHECK-ASM: encoding: [0xd3,0x80,0x11,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p-15
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.00390625
+# CHECK-ASM: encoding: [0xd3,0x00,0x12,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 3.906250e-03
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.00390625
+# CHECK-ASM: encoding: [0xd3,0x00,0x12,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p-8
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.0078125
+# CHECK-ASM: encoding: [0xd3,0x80,0x12,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 7.812500e-03
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.0078125
+# CHECK-ASM: encoding: [0xd3,0x80,0x12,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p-7
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.0625
+# CHECK-ASM: encoding: [0xd3,0x00,0x13,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 6.250000e-02
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.0625
+# CHECK-ASM: encoding: [0xd3,0x00,0x13,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p-4
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.125
+# CHECK-ASM: encoding: [0xd3,0x80,0x13,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 1.250000e-01
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.125
+# CHECK-ASM: encoding: [0xd3,0x80,0x13,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p-3
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.25
+# CHECK-ASM: encoding: [0xd3,0x00,0x14,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 2.500000e-01
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.25
+# CHECK-ASM: encoding: [0xd3,0x00,0x14,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p-2
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.3125
+# CHECK-ASM: encoding: [0xd3,0x80,0x14,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 3.125000e-01
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.3125
+# CHECK-ASM: encoding: [0xd3,0x80,0x14,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1.4p-2
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.375
+# CHECK-ASM: encoding: [0xd3,0x00,0x15,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 3.750000e-01
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.375
+# CHECK-ASM: encoding: [0xd3,0x00,0x15,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1.8p-2
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.4375
+# CHECK-ASM: encoding: [0xd3,0x80,0x15,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 4.375000e-01
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.4375
+# CHECK-ASM: encoding: [0xd3,0x80,0x15,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1.cp-2
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.5
+# CHECK-ASM: encoding: [0xd3,0x00,0x16,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 5.000000e-01
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.5
+# CHECK-ASM: encoding: [0xd3,0x00,0x16,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p-1
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.625
+# CHECK-ASM: encoding: [0xd3,0x80,0x16,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 6.250000e-01
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.625
+# CHECK-ASM: encoding: [0xd3,0x80,0x16,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1.4p-1
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.75
+# CHECK-ASM: encoding: [0xd3,0x00,0x17,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 7.500000e-01
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.75
+# CHECK-ASM: encoding: [0xd3,0x00,0x17,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1.8p-1
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.875
+# CHECK-ASM: encoding: [0xd3,0x80,0x17,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 8.750000e-01
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 0.875
+# CHECK-ASM: encoding: [0xd3,0x80,0x17,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1.cp-1
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 1.0
+# CHECK-ASM: encoding: [0xd3,0x00,0x18,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 1.000000e+00
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 1.0
+# CHECK-ASM: encoding: [0xd3,0x00,0x18,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p+0
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 1.25
+# CHECK-ASM: encoding: [0xd3,0x80,0x18,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 1.250000e+00
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 1.25
+# CHECK-ASM: encoding: [0xd3,0x80,0x18,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1.4p+0
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 1.5
+# CHECK-ASM: encoding: [0xd3,0x00,0x19,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 1.500000e+00
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 1.5
+# CHECK-ASM: encoding: [0xd3,0x00,0x19,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1.8p+0
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 1.75
+# CHECK-ASM: encoding: [0xd3,0x80,0x19,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 1.750000e+00
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 1.75
+# CHECK-ASM: encoding: [0xd3,0x80,0x19,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1.cp+0
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 2.0
+# CHECK-ASM: encoding: [0xd3,0x00,0x1a,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 2.000000e+00
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 2.0
+# CHECK-ASM: encoding: [0xd3,0x00,0x1a,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p+1
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 2.5
+# CHECK-ASM: encoding: [0xd3,0x80,0x1a,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 2.500000e+00
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 2.5
+# CHECK-ASM: encoding: [0xd3,0x80,0x1a,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1.4p+1
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 3.0
+# CHECK-ASM: encoding: [0xd3,0x00,0x1b,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 3.000000e+00
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 3.0
+# CHECK-ASM: encoding: [0xd3,0x00,0x1b,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1.8p+1
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 4.0
+# CHECK-ASM: encoding: [0xd3,0x80,0x1b,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 4.000000e+00
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 4.0
+# CHECK-ASM: encoding: [0xd3,0x80,0x1b,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p+2
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 8.0
+# CHECK-ASM: encoding: [0xd3,0x00,0x1c,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 8.000000e+00
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 8.0
+# CHECK-ASM: encoding: [0xd3,0x00,0x1c,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p+3
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 16.0
+# CHECK-ASM: encoding: [0xd3,0x80,0x1c,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 1.600000e+01
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 16.0
+# CHECK-ASM: encoding: [0xd3,0x80,0x1c,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p+4
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 128.0
+# CHECK-ASM: encoding: [0xd3,0x00,0x1d,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 1.280000e+02
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 128.0
+# CHECK-ASM: encoding: [0xd3,0x00,0x1d,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p+7
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 256.0
+# CHECK-ASM: encoding: [0xd3,0x80,0x1d,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 2.560000e+02
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 256.0
+# CHECK-ASM: encoding: [0xd3,0x80,0x1d,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p+8
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 32768.0
+# CHECK-ASM: encoding: [0xd3,0x00,0x1e,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 3.276800e+04
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 32768.0
+# CHECK-ASM: encoding: [0xd3,0x00,0x1e,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p+15
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 65536.0
+# CHECK-ASM: encoding: [0xd3,0x80,0x1e,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 6.553600e+04
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, 65536.0
+# CHECK-ASM: encoding: [0xd3,0x80,0x1e,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, 0x1p+16
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, inf
+# CHECK-ASM: encoding: [0xd3,0x00,0x1f,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, INF
+
+# CHECK-ASM-AND-OBJ: fli.q ft1, nan
+# CHECK-ASM: encoding: [0xd3,0x80,0x1f,0xf6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fli.q ft1, nan
+
 # CHECK-ASM-AND-OBJ: fminm.s fa0, fa1, fa2
 # CHECK-ASM: encoding: [0x53,0xa5,0xc5,0x28]
 # CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
@@ -963,6 +1268,16 @@ fminm.h fa0, fa1, fa2
 # CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
 fmaxm.h fs3, fs4, fs5
 
+# CHECK-ASM-AND-OBJ: fminm.q fa0, fa1, fa2
+# CHECK-ASM: encoding: [0x53,0xa5,0xc5,0x2e]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fminm.q fa0, fa1, fa2
+
+# CHECK-ASM-AND-OBJ: fmaxm.q fs3, fs4, fs5
+# CHECK-ASM: encoding: [0xd3,0x39,0x5a,0x2f]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fmaxm.q fs3, fs4, fs5
+
 # CHECK-ASM-AND-OBJ: fround.s fs1, fs2, dyn
 # CHECK-ASM: encoding: [0xd3,0x74,0x49,0x40]
 # CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
@@ -1083,6 +1398,46 @@ froundnx.h ft1, fa1, rtz
 # CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
 froundnx.h fs1, fs2, rne
 
+# CHECK-ASM-AND-OBJ: fround.q fs1, fs2, dyn
+# CHECK-ASM: encoding: [0xd3,0x74,0x49,0x46]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fround.q fs1, fs2
+
+# CHECK-ASM-AND-OBJ: fround.q fs1, fs2, dyn
+# CHECK-ASM: encoding: [0xd3,0x74,0x49,0x46]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fround.q fs1, fs2, dyn
+
+# CHECK-ASM-AND-OBJ: fround.q fs1, fs2, rtz
+# CHECK-ASM: encoding: [0xd3,0x14,0x49,0x46]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fround.q fs1, fs2, rtz
+
+# CHECK-ASM-AND-OBJ: fround.q fs1, fs2, rne
+# CHECK-ASM: encoding: [0xd3,0x04,0x49,0x46]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fround.q fs1, fs2, rne
+
+# CHECK-ASM-AND-OBJ: froundnx.q fs1, fs2, dyn
+# CHECK-ASM: encoding: [0xd3,0x74,0x59,0x46]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+froundnx.q fs1, fs2
+
+# CHECK-ASM-AND-OBJ: froundnx.q fs1, fs2, dyn
+# CHECK-ASM: encoding: [0xd3,0x74,0x59,0x46]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+froundnx.q fs1, fs2, dyn
+
+# CHECK-ASM-AND-OBJ: froundnx.q fs1, fs2, rtz
+# CHECK-ASM: encoding: [0xd3,0x14,0x59,0x46]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+froundnx.q fs1, fs2, rtz
+
+# CHECK-ASM-AND-OBJ: froundnx.q fs1, fs2, rne
+# CHECK-ASM: encoding: [0xd3,0x04,0x59,0x46]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+froundnx.q fs1, fs2, rne
+
 # CHECK-ASM-AND-OBJ: fcvtmod.w.d a1, ft1, rtz
 # CHECK-ASM: encoding: [0xd3,0x95,0x80,0xc2]
 # CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
@@ -1147,3 +1502,23 @@ fgtq.h a1, fs1, fs2
 # CHECK-ASM: encoding: [0xd3,0x45,0x11,0xa4]
 # CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
 fgeq.h a1, ft1, ft2
+
+# CHECK-ASM-AND-OBJ: fltq.q a1, fs1, fs2
+# CHECK-ASM: encoding: [0xd3,0xd5,0x24,0xa7]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fltq.q a1, fs1, fs2
+
+# CHECK-ASM-AND-OBJ: fleq.q a1, ft1, ft2
+# CHECK-ASM: encoding: [0xd3,0xc5,0x20,0xa6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fleq.q a1, ft1, ft2
+
+# CHECK-ASM-AND-OBJ: fltq.q a1, fs2, fs1
+# CHECK-ASM: encoding: [0xd3,0x55,0x99,0xa6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fgtq.q a1, fs1, fs2
+
+# CHECK-ASM-AND-OBJ: fleq.q a1, ft2, ft1
+# CHECK-ASM: encoding: [0xd3,0x45,0x11,0xa6]
+# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional 
Floating-Point){{$}}
+fgeq.q a1, ft1, ft2

_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to