Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / RISCV / rv32zfhmin-valid.s
blob736ff566805eb588ad8da638ebbb0a675b12a2a9
1 # RUN: llvm-mc %s -triple=riscv32 -mattr=+zfhmin,+d -riscv-no-aliases -show-encoding \
2 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3 # RUN: llvm-mc %s -triple=riscv64 -mattr=+zfhmin,+d -riscv-no-aliases -show-encoding \
4 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
5 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+zfhmin,+d < %s \
6 # RUN: | llvm-objdump --mattr=+zfhmin,+d -M no-aliases -d -r - \
7 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
8 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+zfhmin,+d < %s \
9 # RUN: | llvm-objdump --mattr=+zfhmin,+d -M no-aliases -d -r - \
10 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
12 # CHECK-ASM-AND-OBJ: flh ft0, 12(a0)
13 # CHECK-ASM: encoding: [0x07,0x10,0xc5,0x00]
14 flh f0, 12(a0)
15 # CHECK-ASM-AND-OBJ: flh ft1, 4(ra)
16 # CHECK-ASM: encoding: [0x87,0x90,0x40,0x00]
17 flh f1, +4(ra)
18 # CHECK-ASM-AND-OBJ: flh ft2, -2048(a3)
19 # CHECK-ASM: encoding: [0x07,0x91,0x06,0x80]
20 flh f2, -2048(x13)
21 # CHECK-ASM-AND-OBJ: flh ft3, -2048(s1)
22 # CHECK-ASM: encoding: [0x87,0x91,0x04,0x80]
23 flh f3, %lo(2048)(s1)
24 # CHECK-ASM-AND-OBJ: flh ft4, 2047(s2)
25 # CHECK-ASM: encoding: [0x07,0x12,0xf9,0x7f]
26 flh f4, 2047(s2)
27 # CHECK-ASM-AND-OBJ: flh ft5, 0(s3)
28 # CHECK-ASM: encoding: [0x87,0x92,0x09,0x00]
29 flh f5, 0(s3)
31 # CHECK-ASM-AND-OBJ: fsh ft6, 2047(s4)
32 # CHECK-ASM: encoding: [0xa7,0x1f,0x6a,0x7e]
33 fsh f6, 2047(s4)
34 # CHECK-ASM-AND-OBJ: fsh ft7, -2048(s5)
35 # CHECK-ASM: encoding: [0x27,0x90,0x7a,0x80]
36 fsh f7, -2048(s5)
37 # CHECK-ASM-AND-OBJ: fsh fs0, -2048(s6)
38 # CHECK-ASM: encoding: [0x27,0x10,0x8b,0x80]
39 fsh f8, %lo(2048)(s6)
40 # CHECK-ASM-AND-OBJ: fsh fs1, 999(s7)
41 # CHECK-ASM: encoding: [0xa7,0x93,0x9b,0x3e]
42 fsh f9, 999(s7)
44 # CHECK-ASM-AND-OBJ: fmv.x.h a2, fs7
45 # CHECK-ASM: encoding: [0x53,0x86,0x0b,0xe4]
46 fmv.x.h a2, fs7
47 # CHECK-ASM-AND-OBJ: fmv.h.x ft1, a6
48 # CHECK-ASM: encoding: [0xd3,0x00,0x08,0xf4]
49 fmv.h.x ft1, a6
51 # CHECK-ASM-AND-OBJ: fcvt.s.h fa0, ft0
52 # CHECK-ASM: encoding: [0x53,0x05,0x20,0x40]
53 fcvt.s.h fa0, ft0
54 # CHECK-ASM-AND-OBJ: fcvt.s.h fa0, ft0, rup
55 # CHECK-ASM: encoding: [0x53,0x35,0x20,0x40]
56 fcvt.s.h fa0, ft0, rup
57 # CHECK-ASM-AND-OBJ: fcvt.h.s ft2, fa2
58 # CHECK-ASM: encoding: [0x53,0x71,0x06,0x44]
59 fcvt.h.s ft2, fa2
60 # CHECK-ASM-AND-OBJ: fcvt.d.h fa0, ft0
61 # CHECK-ASM: encoding: [0x53,0x05,0x20,0x42]
62 fcvt.d.h fa0, ft0
63 # CHECK-ASM-AND-OBJ: fcvt.d.h fa0, ft0, rup
64 # CHECK-ASM: encoding: [0x53,0x35,0x20,0x42]
65 fcvt.d.h fa0, ft0, rup
66 # CHECK-ASM-AND-OBJ: fcvt.h.d ft2, fa2
67 # CHECK-ASM: encoding: [0x53,0x71,0x16,0x44]
68 fcvt.h.d ft2, fa2