1 ; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s
3 ; CHECK: It should have at least one range!
5 define i64 @noalias_addrspace__empty(ptr %ptr, i64 %val) {
6 %ret = atomicrmw add ptr %ptr, i64 %val seq_cst, !noalias.addrspace !0
10 ; CHECK: Unfinished range!
11 ; CHECK-NEXT: !1 = !{i32 0}
12 define i64 @noalias_addrspace__single_field(ptr %ptr, i64 %val) {
13 %ret = atomicrmw add ptr %ptr, i64 %val seq_cst, !noalias.addrspace !1
17 ; CHECK: Range must not be empty!
18 ; CHECK-NEXT: !2 = !{i32 0, i32 0}
19 define i64 @noalias_addrspace__0_0(ptr %ptr, i64 %val) {
20 %ret = atomicrmw add ptr %ptr, i64 %val seq_cst, !noalias.addrspace !2
24 ; CHECK: noalias.addrspace type must be i32!
25 ; CHECK-NEXT: %ret = atomicrmw add ptr %ptr, i64 %val seq_cst, align 8, !noalias.addrspace !3
26 define i64 @noalias_addrspace__i64(ptr %ptr, i64 %val) {
27 %ret = atomicrmw add ptr %ptr, i64 %val seq_cst, !noalias.addrspace !3
31 ; CHECK: The lower limit must be an integer!
32 define i64 @noalias_addrspace__fp(ptr %ptr, i64 %val) {
33 %ret = atomicrmw add ptr %ptr, i64 %val seq_cst, !noalias.addrspace !4
37 ; CHECK: The lower limit must be an integer!
38 define i64 @noalias_addrspace__ptr(ptr %ptr, i64 %val) {
39 %ret = atomicrmw add ptr %ptr, i64 %val seq_cst, !noalias.addrspace !5
43 ; CHECK: The lower limit must be an integer!
44 define i64 @noalias_addrspace__nonconstant(ptr %ptr, i64 %val) {
45 %ret = atomicrmw add ptr %ptr, i64 %val seq_cst, !noalias.addrspace !6
56 !4 = !{float 0.0, float 2.0}
57 !5 = !{ptr null, ptr addrspace(1) null}
58 !6 = !{i32 ptrtoint (ptr @gv0 to i32), i32 ptrtoint (ptr @gv1 to i32) }