236
|
1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
|
150
|
2 ;
|
|
3 ; Unsigned wrap-around check.
|
|
4 ;
|
|
5 ; for (int i = -1; i < 65 ; i ++ )
|
|
6 ; if ( 63 >= (unsigned)i )
|
|
7 ; A[i] = 42;
|
|
8
|
|
9
|
|
10 define void @func(double* noalias nonnull %A) {
|
|
11 entry:
|
|
12 br label %for
|
|
13
|
|
14 for:
|
|
15 %j = phi i32 [-1, %entry], [%j.inc, %inc]
|
|
16 %j.cmp = icmp slt i32 %j, 65
|
|
17 br i1 %j.cmp, label %body, label %exit
|
|
18
|
|
19 body:
|
|
20 %inbounds = icmp uge i32 63, %j
|
|
21 br i1 %inbounds, label %ifinbounds, label %ifoutbounds
|
|
22
|
|
23 ifinbounds:
|
|
24 %A_idx = getelementptr inbounds double, double* %A, i32 %j
|
|
25 store double 42.0, double* %A_idx
|
|
26 br label %inc
|
|
27
|
|
28 ifoutbounds:
|
|
29 br label %inc
|
|
30
|
|
31 inc:
|
|
32 %j.inc = add nuw nsw i32 %j, 1
|
|
33 br label %for
|
|
34
|
|
35 exit:
|
|
36 br label %return
|
|
37
|
|
38 return:
|
|
39 ret void
|
|
40 }
|
|
41
|
|
42
|
|
43 ; CHECK: Region: %for---%return
|
|
44 ; CHECK: Domain :=
|
|
45 ; CHECK-NEXT: { Stmt_ifinbounds[i0] : 0 < i0 <= 64 };
|
|
46
|