• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt %loadPolly -polly-codegen \
2; RUN:     -S < %s | FileCheck %s
3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4
5
6; CHECK: polly.stmt.bb3:                                   ; preds = %polly.stmt.bb3.entry
7; CHECK:   %tmp6_p_scalar_ = load double, double* %arg1{{[0-9]*}}, align 8, !alias.scope !0, !noalias !2
8; CHECK:   %p_tmp7 = fadd double 1.000000e+00, %tmp6_p_scalar_
9; CHECK:   %p_tmp8 = fcmp olt double 1.400000e+01, %p_tmp7
10; CHECK:   br i1 %p_tmp8, label %polly.stmt.bb9, label %polly.stmt.bb10
11
12; CHECK: polly.stmt.bb9:                                   ; preds = %polly.stmt.bb3
13; CHECK:   br label %polly.stmt.bb11.exit
14
15; CHECK: polly.stmt.bb10:                                  ; preds = %polly.stmt.bb3
16; CHECK:   br label %polly.stmt.bb11.exit
17
18; CHECK: polly.stmt.bb11.exit:                             ; preds = %polly.stmt.bb10, %polly.stmt.bb9
19; CHECK:   %polly.tmp12 = phi double [ 1.000000e+00, %polly.stmt.bb9 ], [ 2.000000e+00, %polly.stmt.bb10 ]
20; CHECK:   store double %polly.tmp12, double* %tmp12.phiops
21
22define void @hoge(i32 %arg, [1024 x double]* %arg1) {
23bb:
24  br label %bb2
25
26bb2:                                              ; preds = %bb
27  br label %bb3
28
29bb3:                                              ; preds = %bb11, %bb2
30  %tmp = phi i64 [ 0, %bb11 ], [ 0, %bb2 ]
31  %tmp4 = icmp sgt i32 %arg, 0
32  %tmp5 = getelementptr inbounds [1024 x double], [1024 x double]* %arg1, i64 0, i64 0
33  %tmp6 = load double, double* %tmp5
34  %tmp7 = fadd double 1.0, %tmp6
35  %tmp8 = fcmp olt double 14.0, %tmp7
36  br i1 %tmp8, label %bb9, label %bb10
37
38bb9:                                              ; preds = %bb3
39  br label %bb11
40
41bb10:                                             ; preds = %bb3
42  br label %bb11
43
44bb11:                                             ; preds = %bb10, %bb9
45  %tmp12 = phi double [ 1.0, %bb9 ], [ 2.0, %bb10 ]
46  %tmp13 = getelementptr inbounds [1024 x double], [1024 x double]* %arg1, i64 %tmp, i64 0
47  store double %tmp12, double* %tmp13
48  %tmp14 = add nuw nsw i64 0, 1
49  %tmp15 = trunc i64 %tmp14 to i32
50  br i1 false, label %bb3, label %bb16
51
52bb16:                                             ; preds = %bb11
53  br label %bb17
54
55bb17:                                             ; preds = %bb16
56  ret void
57}
58