1 ; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s
3 define void @f1(i8* %x) {
5 store i8 0, i8* %x, align 1, !range !0
9 ; CHECK: Ranges are only for loads, calls and invokes!
10 ; CHECK-NEXT: store i8 0, i8* %x, align 1, !range !0
12 define i8 @f2(i8* %x) {
14 %y = load i8, i8* %x, align 1, !range !1
18 ; CHECK: It should have at least one range!
20 define i8 @f3(i8* %x) {
22 %y = load i8, i8* %x, align 1, !range !2
26 ; CHECK: Unfinished range!
28 define i8 @f4(i8* %x) {
30 %y = load i8, i8* %x, align 1, !range !3
33 !3 = !{double 0.0, i8 0}
34 ; CHECK: The lower limit must be an integer!
36 define i8 @f5(i8* %x) {
38 %y = load i8, i8* %x, align 1, !range !4
41 !4 = !{i8 0, double 0.0}
42 ; CHECK: The upper limit must be an integer!
44 define i8 @f6(i8* %x) {
46 %y = load i8, i8* %x, align 1, !range !5
50 ; CHECK: Range types must match instruction type!
53 define i8 @f7(i8* %x) {
55 %y = load i8, i8* %x, align 1, !range !6
59 ; CHECK: Range types must match instruction type!
62 define i8 @f8(i8* %x) {
64 %y = load i8, i8* %x, align 1, !range !7
68 ; CHECK: Range types must match instruction type!
71 define i8 @f9(i8* %x) {
73 %y = load i8, i8* %x, align 1, !range !8
77 ; CHECK: Range must not be empty!
79 define i8 @f10(i8* %x) {
81 %y = load i8, i8* %x, align 1, !range !9
84 !9 = !{i8 0, i8 2, i8 1, i8 3}
85 ; CHECK: Intervals are overlapping
87 define i8 @f11(i8* %x) {
89 %y = load i8, i8* %x, align 1, !range !10
92 !10 = !{i8 0, i8 2, i8 2, i8 3}
93 ; CHECK: Intervals are contiguous
95 define i8 @f12(i8* %x) {
97 %y = load i8, i8* %x, align 1, !range !11
100 !11 = !{i8 1, i8 2, i8 -1, i8 0}
101 ; CHECK: Intervals are not in order
103 define i8 @f13(i8* %x) {
105 %y = load i8, i8* %x, align 1, !range !12
108 !12 = !{i8 1, i8 3, i8 5, i8 1}
109 ; CHECK: Intervals are contiguous
111 define i8 @f14(i8* %x) {
113 %y = load i8, i8* %x, align 1, !range !13
116 !13 = !{i8 1, i8 3, i8 5, i8 2}
117 ; CHECK: Intervals are overlapping
119 define i8 @f15(i8* %x) {
121 %y = load i8, i8* %x, align 1, !range !14
124 !14 = !{i8 10, i8 1, i8 12, i8 13}
125 ; CHECK: Intervals are overlapping
127 define i8 @f16(i8* %x) {
129 %y = load i8, i8* %x, align 1, !range !16
132 !16 = !{i8 1, i8 3, i8 4, i8 5, i8 6, i8 2}
133 ; CHECK: Intervals are overlapping
135 define i8 @f17(i8* %x) {
137 %y = load i8, i8* %x, align 1, !range !17
140 !17 = !{i8 1, i8 3, i8 4, i8 5, i8 6, i8 1}
141 ; CHECK: Intervals are contiguous
145 %y = call i8 undef(), !range !18
149 ; CHECK: It should have at least one range!