Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / RISCV / rv32zacas-valid.s
blobd80b963f0a047798139c774b9ceec5054d6a93ce
1 # RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zacas -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=+experimental-zacas -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=+experimental-zacas < %s \
6 # RUN: | llvm-objdump --mattr=+experimental-zacas -M no-aliases -d -r - \
7 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
8 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zacas < %s \
9 # RUN: | llvm-objdump --mattr=+experimental-zacas -M no-aliases -d -r - \
10 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
11 # RUN: not llvm-mc -triple=riscv32 -mattr=+a -show-encoding %s 2>&1 \
12 # RUN: | FileCheck %s --check-prefix=CHECK-ERROR
13 # RUN: not llvm-mc -triple=riscv64 -mattr=+a -show-encoding %s 2>&1 \
14 # RUN: | FileCheck %s --check-prefix=CHECK-ERROR
16 # CHECK-ASM-AND-OBJ: amocas.w a1, a3, (a5)
17 # CHECK-ASM: encoding: [0xaf,0xa5,0xd7,0x28]
18 # CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}
19 amocas.w a1, a3, (a5)
20 # CHECK-ASM-AND-OBJ: amocas.w a1, a3, (a5)
21 # CHECK-ASM: encoding: [0xaf,0xa5,0xd7,0x28]
22 # CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}
23 amocas.w a1, a3, 0(a5)
24 # CHECK-ASM-AND-OBJ: amocas.w zero, zero, (a5)
25 # CHECK-ASM: encoding: [0x2f,0xa0,0x07,0x28]
26 # CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}
27 amocas.w zero, zero, (a5)
28 # CHECK-ASM-AND-OBJ: amocas.w.aq zero, zero, (a5)
29 # CHECK-ASM: encoding: [0x2f,0xa0,0x07,0x2c]
30 # CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}
31 amocas.w.aq zero, zero, (a5)
32 # CHECK-ASM-AND-OBJ: amocas.w.rl zero, zero, (a5)
33 # CHECK-ASM: encoding: [0x2f,0xa0,0x07,0x2a]
34 # CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}
35 amocas.w.rl zero, zero, (a5)
36 # CHECK-ASM-AND-OBJ: amocas.w.aqrl zero, zero, (a5)
37 # CHECK-ASM: encoding: [0x2f,0xa0,0x07,0x2e]
38 # CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}
39 amocas.w.aqrl zero, zero, (a5)
41 # CHECK-ASM-AND-OBJ: amocas.d a0, a2, (a1)
42 # CHECK-ASM: encoding: [0x2f,0xb5,0xc5,0x28]
43 # CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}
44 amocas.d a0, a2, (a1)
45 # CHECK-ASM-AND-OBJ: amocas.d a0, a2, (a1)
46 # CHECK-ASM: encoding: [0x2f,0xb5,0xc5,0x28]
47 # CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}
48 amocas.d a0, a2, 0(a1)
49 # CHECK-ASM-AND-OBJ: amocas.d zero, zero, (a1)
50 # CHECK-ASM: encoding: [0x2f,0xb0,0x05,0x28]
51 # CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}
52 amocas.d zero, zero, (a1)
53 # CHECK-ASM-AND-OBJ: amocas.d.aq zero, zero, (a1)
54 # CHECK-ASM: encoding: [0x2f,0xb0,0x05,0x2c]
55 # CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}
56 amocas.d.aq zero, zero, (a1)
57 # CHECK-ASM-AND-OBJ: amocas.d.rl zero, zero, (a1)
58 # CHECK-ASM: encoding: [0x2f,0xb0,0x05,0x2a]
59 # CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}
60 amocas.d.rl zero, zero, (a1)
61 # CHECK-ASM-AND-OBJ: amocas.d.aqrl zero, zero, (a1)
62 # CHECK-ASM: encoding: [0x2f,0xb0,0x05,0x2e]
63 # CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}
64 amocas.d.aqrl zero, zero, (a1)