Fix Polly
[polly-mirror.git] / test / ScopInfo / infeasible_invalid_context.ll
blob9922bbc650c78464095fb18987c2d4ef3a4197fc
1 ; RUN: opt %loadPolly -polly-detect -analyze < %s \
2 ; RUN:  | FileCheck %s -check-prefix=DETECT
4 ; RUN: opt %loadPolly -polly-scops -analyze < %s \
5 ; RUN:  | FileCheck %s -check-prefix=SCOPS
7 ; DETECT: Valid Region for Scop: if.end116 => for.inc216
8 ; SCOPS-NOT: Statements
10 ; Verify that we detect this scop, but that, due to an infeasible run-time
11 ; check, we refuse to model it.
13 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
15 %struct.tnode.1.7.13.67.121.175.217.307.325.337.349.367.379.391.433.445.667.727.733.739 = type { i32, i32, %struct.tnode.1.7.13.67.121.175.217.307.325.337.349.367.379.391.433.445.667.727.733.739*, %struct.tnode.1.7.13.67.121.175.217.307.325.337.349.367.379.391.433.445.667.727.733.739*, %struct.tnode.1.7.13.67.121.175.217.307.325.337.349.367.379.391.433.445.667.727.733.739*, %struct.tnode.1.7.13.67.121.175.217.307.325.337.349.367.379.391.433.445.667.727.733.739*, %struct.tnode.1.7.13.67.121.175.217.307.325.337.349.367.379.391.433.445.667.727.733.739*, i32, i32, %struct.plist.0.6.12.66.120.174.216.306.324.336.348.366.378.390.432.444.666.726.732.738* }
16 %struct.plist.0.6.12.66.120.174.216.306.324.336.348.366.378.390.432.444.666.726.732.738 = type { i32, %struct.plist.0.6.12.66.120.174.216.306.324.336.348.366.378.390.432.444.666.726.732.738* }
18 @vFixedEdgeRoot = external global %struct.tnode.1.7.13.67.121.175.217.307.325.337.349.367.379.391.433.445.667.727.733.739*, align 8
19 @hEdgeRoot = external global %struct.tnode.1.7.13.67.121.175.217.307.325.337.349.367.379.391.433.445.667.727.733.739*, align 8
21 ; Function Attrs: nounwind uwtable
22 define void @readgeo() #0 {
23 entry:
24   %vx = alloca i32, align 4
25   br label %if.end64
27 if.end64:                                         ; preds = %entry
28   br label %for.body73
30 for.body73:                                       ; preds = %for.inc216, %if.end64
31   %v.0101 = phi i32 [ 0, %for.inc216 ], [ 1, %if.end64 ]
32   br i1 undef, label %if.then93, label %if.else
34 if.then93:                                        ; preds = %for.body73
35   br label %for.inc216
37 if.else:                                          ; preds = %for.body73
38   br i1 undef, label %if.then111, label %if.end116
40 if.then111:                                       ; preds = %if.else
41   br label %if.end116
43 if.end116:                                        ; preds = %if.then111, %if.else
44   %rippleCount.2 = phi i32 [ 1, %if.then111 ], [ undef, %if.else ]
45   %rem11790 = and i32 %v.0101, 1
46   %cmp118 = icmp eq i32 %rem11790, 0
47   br i1 %cmp118, label %if.then120, label %if.else154
49 if.then120:                                       ; preds = %if.end116
50   call void @tinsert()
51   br label %if.end193
53 if.else154:                                       ; preds = %if.end116
54   call void @tinsert()
55   br label %if.end193
57 if.end193:                                        ; preds = %if.else154, %if.then120
58   %0 = load i32, i32* %vx, align 4
59   br label %for.inc216
61 for.inc216:                                       ; preds = %if.end193, %if.then93
62   %rippleCount.3 = phi i32 [ undef, %if.then93 ], [ %rippleCount.2, %if.end193 ]
63   %ux.2 = phi i32 [ undef, %if.then93 ], [ %0, %if.end193 ]
64   br i1 undef, label %for.body73, label %for.end218
66 for.end218:                                       ; preds = %for.inc216
67   unreachable
70 declare void @tinsert()