brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · d81f3a4 Raw
164 lines · plain
1; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s2 3define void @f1(ptr %x) {4entry:5  store i8 0, ptr %x, align 1, !range !06  ret void7}8!0 = !{i8 0, i8 1}9; CHECK: Ranges are only for loads, calls and invokes!10; CHECK-NEXT: store i8 0, ptr %x, align 1, !range !011 12define i8 @f2(ptr %x) {13entry:14  %y = load i8, ptr %x, align 1, !range !115  ret i8 %y16}17!1 = !{}18; CHECK: It should have at least one range!19 20define i8 @f3(ptr %x) {21entry:22  %y = load i8, ptr %x, align 1, !range !223  ret i8 %y24}25!2 = !{i8 0}26; CHECK: Unfinished range!27 28define i8 @f4(ptr %x) {29entry:30  %y = load i8, ptr %x, align 1, !range !331  ret i8 %y32}33!3 = !{double 0.0, i8 0}34; CHECK: The lower limit must be an integer!35 36define i8 @f5(ptr %x) {37entry:38  %y = load i8, ptr %x, align 1, !range !439  ret i8 %y40}41!4 = !{i8 0, double 0.0}42; CHECK: The upper limit must be an integer!43 44define i8 @f6(ptr %x) {45entry:46  %y = load i8, ptr %x, align 1, !range !547  ret i8 %y48}49!5 = !{i32 0, i8 0}50; CHECK: Range pair types must match!51; CHECK:  %y = load52 53define i8 @f7(ptr %x) {54entry:55  %y = load i8, ptr %x, align 1, !range !656  ret i8 %y57}58!6 = !{i8 0, i32 0}59; CHECK: Range pair types must match!60; CHECK:  %y = load61 62define i8 @f8(ptr %x) {63entry:64  %y = load i8, ptr %x, align 1, !range !765  ret i8 %y66}67!7 = !{i32 0, i32 0}68; CHECK: Range types must match instruction type!69; CHECK:  %y = load70 71define i8 @f9(ptr %x) {72entry:73  %y = load i8, ptr %x, align 1, !range !874  ret i8 %y75}76!8 = !{i8 0, i8 0}77; CHECK: Range must not be empty!78 79define i8 @f10(ptr %x) {80entry:81  %y = load i8, ptr %x, align 1, !range !982  ret i8 %y83}84!9 = !{i8 0, i8 2, i8 1, i8 3}85; CHECK: Intervals are overlapping86 87define i8 @f11(ptr %x) {88entry:89  %y = load i8, ptr %x, align 1, !range !1090  ret i8 %y91}92!10 = !{i8 0, i8 2, i8 2, i8 3}93; CHECK: Intervals are contiguous94 95define i8 @f12(ptr %x) {96entry:97  %y = load i8, ptr %x, align 1, !range !1198  ret i8 %y99}100!11 = !{i8 1, i8 2, i8 -1, i8 0}101; CHECK: Intervals are not in order102 103define i8 @f13(ptr %x) {104entry:105  %y = load i8, ptr %x, align 1, !range !12106  ret i8 %y107}108!12 = !{i8 1, i8 3, i8 5, i8 1}109; CHECK: Intervals are contiguous110 111define i8 @f14(ptr %x) {112entry:113  %y = load i8, ptr %x, align 1, !range !13114  ret i8 %y115}116!13 = !{i8 1, i8 3, i8 5, i8 2}117; CHECK: Intervals are overlapping118 119define i8 @f15(ptr %x) {120entry:121  %y = load i8, ptr %x, align 1, !range !14122  ret i8 %y123}124!14 = !{i8 10, i8 1, i8 12, i8 13}125; CHECK: Intervals are overlapping126 127define i8 @f16(ptr %x) {128entry:129  %y = load i8, ptr %x, align 1, !range !16130  ret i8 %y131}132!16 = !{i8 1, i8 3, i8 4, i8 5, i8 6, i8 2}133; CHECK: Intervals are overlapping134 135define i8 @f17(ptr %x) {136entry:137  %y = load i8, ptr %x, align 1, !range !17138  ret i8 %y139}140!17 = !{i8 1, i8 3, i8 4, i8 5, i8 6, i8 1}141; CHECK: Intervals are contiguous142 143define i8 @f18() {144entry:145  %y = call i8 undef(), !range !18146  ret i8 %y147}148!18 = !{}149; CHECK: It should have at least one range!150 151define <2 x i8> @vector_range_wrong_type(ptr %x) {152  %y = load <2 x i8>, ptr %x, !range !19153  ret <2 x i8> %y154}155!19 = !{i16 0, i16 10}156; CHECK: Range types must match instruction type!157 158define i32 @range_assert(ptr %x) {159  %y = load i32, ptr %x, !range !20160  ret i32 %y161}162; CHECK: The upper and lower limits cannot be the same value{{$}}163!20 = !{i32 123, i32 123}164