1 ; RUN: opt %loadPolly %defaultOpts -polly-codegen -enable-polly-vector -dce -S %s | FileCheck %s
2 ; ModuleID = 'pr33834_2.s'
3 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
4 target triple = "x86_64-unknown-linux-gnu"
6 %struct.site = type { [361 x [1001 x float]] }
8 @got_elevation_pattern = global i8 0, align 1
9 @LR = global %struct.site zeroinitializer, align 4
10 @.str = private unnamed_addr constant [6 x i8] c"%f %f\00", align 1
12 define void @_Z7LoadPATPc(i8* %filename) uwtable {
14 %string = alloca [255 x i8], align 16
15 %elevation = alloca float, align 4
16 %amplitude = alloca float, align 4
17 %elevation_pattern = alloca [361 x [1001 x float]], align 16
20 for.cond: ; preds = %for.inc, %entry
21 %tmp = phi i64 [ %indvar.next2, %for.inc ], [ 0, %entry ]
22 %arrayidx = getelementptr i8* %filename, i64 %tmp
23 %tmp2 = load i8* %arrayidx, align 1
24 %cmp = icmp eq i8 %tmp2, 46
25 br i1 %cmp, label %for.end, label %for.body
27 for.body: ; preds = %for.cond
28 %arraydecay = getelementptr inbounds [255 x i8]* %string, i64 0, i64 0
29 %call = call i32 (i8*, i8*, ...)* @_Z6sscanfPKcS0_z(i8* %arraydecay, i8* getelementptr inbounds ([6 x i8]* @.str, i64 0, i64 0), float* %elevation, float* %amplitude)
32 for.inc: ; preds = %for.body
33 %indvar.next2 = add i64 %tmp, 1
36 for.end: ; preds = %for.cond
37 %indvar1.lcssa = phi i64 [ %tmp, %for.cond ]
40 for.cond4: ; preds = %for.inc23, %for.end
41 %indvar = phi i64 [ %indvar.next, %for.inc23 ], [ 0, %for.end ]
42 %arrayidx22 = getelementptr %struct.site* @LR, i64 0, i32 0, i64 %indvar1.lcssa, i64 %indvar
43 %arrayidx14 = getelementptr [361 x [1001 x float]]* %elevation_pattern, i64 0, i64 %indvar1.lcssa, i64 %indvar
44 %exitcond = icmp ne i64 %indvar, 1001
45 br i1 %exitcond, label %for.body7, label %for.end26
47 for.body7: ; preds = %for.cond4
48 %tmp8 = load i8* @got_elevation_pattern, align 1
49 %tobool = icmp eq i8 %tmp8, 0
50 br i1 %tobool, label %if.else, label %if.then
52 if.then: ; preds = %for.body7
53 %tmp15 = load float* %arrayidx14, align 4
56 if.else: ; preds = %for.body7
59 if.end: ; preds = %if.else, %if.then
60 %storemerge = phi float [ 1.000000e+00, %if.else ], [ %tmp15, %if.then ]
61 store float %storemerge, float* %elevation, align 4
62 store float %storemerge, float* %arrayidx22, align 4
65 for.inc23: ; preds = %if.end
66 %indvar.next = add i64 %indvar, 1
69 for.end26: ; preds = %for.cond4
73 declare i32 @_Z6sscanfPKcS0_z(i8*, i8*, ...)