150
|
1 ; RUN: opt %loadPolly -polly-optree -analyze < %s | FileCheck %s -match-full-lines
|
|
2 ;
|
|
3 ; Do not move PHI nodes.
|
|
4 ;
|
|
5 ; for (int j = 0; j < n; j += 1) {
|
|
6 ; bodyA:
|
|
7 ; double val = 42.0;
|
|
8 ;
|
|
9 ; bodyB:
|
|
10 ; A[0] = val;
|
|
11 ; }
|
|
12 ;
|
|
13 define void @func(i32 %n, double* noalias nonnull %A) {
|
|
14 entry:
|
|
15 br label %for
|
|
16
|
|
17 for:
|
|
18 %j = phi i32 [0, %entry], [%j.inc, %inc]
|
|
19 %j.cmp = icmp slt i32 %j, %n
|
|
20 br i1 %j.cmp, label %bodyA, label %exit
|
|
21
|
|
22 bodyA:
|
|
23 %val = phi double [42.0, %for]
|
|
24 br label %bodyB
|
|
25
|
|
26 bodyB:
|
|
27 store double %val, double* %A
|
|
28 br label %inc
|
|
29
|
|
30 inc:
|
|
31 %j.inc = add nuw nsw i32 %j, 1
|
|
32 br label %for
|
|
33
|
|
34 exit:
|
|
35 br label %return
|
|
36
|
|
37 return:
|
|
38 ret void
|
|
39 }
|
|
40
|
|
41
|
|
42 ; CHECK: ForwardOpTree executed, but did not modify anything
|