1 ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
3 declare void @llvm.arm.cdp(i32, i32, i32, i32, i32, i32) nounwind
5 define void @cdp(i32 %a) #0 {
6 ; CHECK: immarg operand has non-immediate parameter
7 ; CHECK-NEXT: %load = load i32, ptr %a.addr, align 4
8 ; CHECK-NEXT: call void @llvm.arm.cdp(i32 %load, i32 2, i32 3, i32 4, i32 5, i32 6)
9 %a.addr = alloca i32, align 4
10 store i32 %a, ptr %a.addr, align 4
11 %load = load i32, ptr %a.addr, align 4
12 call void @llvm.arm.cdp(i32 %load, i32 2, i32 3, i32 4, i32 5, i32 6)
16 declare void @llvm.arm.cdp2(i32, i32, i32, i32, i32, i32) nounwind
17 define void @cdp2(i32 %a) #0 {
18 ; CHECK: immarg operand has non-immediate parameter
19 ; CHECK-NEXT: %load = load i32, ptr %a.addr, align 4
20 ; CHECK-NEXT: call void @llvm.arm.cdp2(i32 %load, i32 2, i32 3, i32 4, i32 5, i32 6)
21 %a.addr = alloca i32, align 4
22 store i32 %a, ptr %a.addr, align 4
23 %load = load i32, ptr %a.addr, align 4
24 call void @llvm.arm.cdp2(i32 %load, i32 2, i32 3, i32 4, i32 5, i32 6)
28 declare { i32, i32 } @llvm.arm.mrrc(i32, i32, i32) nounwind
29 define void @mrrc(i32 %arg0, i32 %arg1, i32 %arg2) #0 {
30 ; CHECK: immarg operand has non-immediate parameter
31 ; CHECK-NEXT: i32 %arg0
32 ; CHECK-NEXT: %ret0 = call { i32, i32 } @llvm.arm.mrrc(i32 %arg0, i32 0, i32 0)
33 %ret0 = call { i32, i32 } @llvm.arm.mrrc(i32 %arg0, i32 0, i32 0)
35 ; CHECK: immarg operand has non-immediate parameter
36 ; CHECK-NEXT: i32 %arg1
37 ; CHECK-NEXT: %ret1 = call { i32, i32 } @llvm.arm.mrrc(i32 0, i32 %arg1, i32 0)
38 %ret1 = call { i32, i32 } @llvm.arm.mrrc(i32 0, i32 %arg1, i32 0)
40 ; CHECK: immarg operand has non-immediate parameter
41 ; CHECK-NEXT: i32 %arg2
42 ; CHECK-NEXT: %ret2 = call { i32, i32 } @llvm.arm.mrrc(i32 0, i32 0, i32 %arg2)
43 %ret2 = call { i32, i32 } @llvm.arm.mrrc(i32 0, i32 0, i32 %arg2)
47 declare { i32, i32 } @llvm.arm.mrrc2(i32, i32, i32) nounwind
48 define void @mrrc2(i32 %arg0, i32 %arg1, i32 %arg2) #0 {
49 ; CHECK: immarg operand has non-immediate parameter
50 ; CHECK-NEXT: i32 %arg0
51 ; CHECK-NEXT: %ret0 = call { i32, i32 } @llvm.arm.mrrc2(i32 %arg0, i32 0, i32 0)
52 %ret0 = call { i32, i32 } @llvm.arm.mrrc2(i32 %arg0, i32 0, i32 0)
54 ; CHECK: immarg operand has non-immediate parameter
55 ; CHECK-NEXT: i32 %arg1
56 ; CHECK-NEXT: %ret1 = call { i32, i32 } @llvm.arm.mrrc2(i32 0, i32 %arg1, i32 0)
57 %ret1 = call { i32, i32 } @llvm.arm.mrrc2(i32 0, i32 %arg1, i32 0)
59 ; CHECK: immarg operand has non-immediate parameter
60 ; CHECK-NEXT: i32 %arg2
61 ; CHECK-NEXT: %ret2 = call { i32, i32 } @llvm.arm.mrrc2(i32 0, i32 0, i32 %arg2)
62 %ret2 = call { i32, i32 } @llvm.arm.mrrc2(i32 0, i32 0, i32 %arg2)
66 declare void @llvm.arm.mcrr(i32, i32, i32, i32, i32) nounwind
67 define void @mcrr(i32 %arg0, i32 %arg1, i32 %arg2, i32 %arg3, i32 %arg4) {
68 ; CHECK: immarg operand has non-immediate parameter
69 ; CHECK-NEXT: i32 %arg0
70 ; CHECK-NEXT: call void @llvm.arm.mcrr(i32 %arg0, i32 1, i32 2, i32 3, i32 4)
71 call void @llvm.arm.mcrr(i32 %arg0, i32 1, i32 2, i32 3, i32 4)
73 ; CHECK: immarg operand has non-immediate parameter
74 ; CHECK-NEXT: i32 %arg1
75 ; CHECK-NEXT: call void @llvm.arm.mcrr(i32 0, i32 %arg1, i32 2, i32 3, i32 4)
76 call void @llvm.arm.mcrr(i32 0, i32 %arg1, i32 2, i32 3, i32 4)
78 ; CHECK: immarg operand has non-immediate parameter
79 ; CHECK-NEXT: i32 %arg4
80 ; CHECK-NEXT: call void @llvm.arm.mcrr(i32 0, i32 1, i32 2, i32 3, i32 %arg4)
81 call void @llvm.arm.mcrr(i32 0, i32 1, i32 2, i32 3, i32 %arg4)
85 declare void @llvm.arm.mcrr2(i32, i32, i32, i32, i32) nounwind
86 define void @mcrr2(i32 %arg0, i32 %arg1, i32 %arg2, i32 %arg3, i32 %arg4) {
87 ; CHECK: immarg operand has non-immediate parameter
88 ; CHECK-NEXT: i32 %arg0
89 ; CHECK-NEXT: call void @llvm.arm.mcrr2(i32 %arg0, i32 1, i32 2, i32 3, i32 4)
90 call void @llvm.arm.mcrr2(i32 %arg0, i32 1, i32 2, i32 3, i32 4)
92 ; CHECK: immarg operand has non-immediate parameter
93 ; CHECK-NEXT: i32 %arg1
94 ; CHECK-NEXT: call void @llvm.arm.mcrr2(i32 0, i32 %arg1, i32 2, i32 3, i32 4)
95 call void @llvm.arm.mcrr2(i32 0, i32 %arg1, i32 2, i32 3, i32 4)
97 ; CHECK: immarg operand has non-immediate parameter
98 ; CHECK-NEXT: i32 %arg4
99 ; CHECK-NEXT: call void @llvm.arm.mcrr2(i32 0, i32 1, i32 2, i32 3, i32 %arg4)
100 call void @llvm.arm.mcrr2(i32 0, i32 1, i32 2, i32 3, i32 %arg4)
104 declare i32 @llvm.arm.space(i32, i32) nounwind
105 define i32 @space(i32 %arg0, i32 %arg1) {
106 ; CHECK: immarg operand has non-immediate parameter
107 ; CHECK-NEXT: i32 %arg0
108 ; CHECK-NEXT: call i32 @llvm.arm.space(i32 %arg0, i32 %arg1)
109 %space = call i32 @llvm.arm.space(i32 %arg0, i32 %arg1)