1 ; RUN: opt %loadPolly %defaultOpts -polly-codegen -enable-polly-vector -dce -S %s | FileCheck %s
2 ; ModuleID = 'pr21218.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.B = type { %struct.A }
7 %struct.A = type { [2 x double] }
9 define void @_Z3barR1B(%struct.B* %b) uwtable {
13 for.cond: ; preds = %for.inc, %entry
14 %indvar = phi i64 [ %indvar.next, %for.inc ], [ 0, %entry ]
15 %arrayidx = getelementptr %struct.B* %b, i64 0, i32 0, i32 0, i64 %indvar
16 %i.0 = trunc i64 %indvar to i32
17 %exitcond = icmp ne i64 %indvar, 2
18 br i1 %exitcond, label %for.body, label %for.end
20 for.body: ; preds = %for.cond
21 %tmp = getelementptr inbounds %struct.B* %b, i64 0, i32 0
22 %call = call double @_ZN1A3fooEi(%struct.A* %tmp, i32 %i.0)
23 store double %call, double* %arrayidx, align 8
26 for.inc: ; preds = %for.body
27 %indvar.next = add i64 %indvar, 1
30 for.end: ; preds = %for.cond
34 define linkonce_odr double @_ZN1A3fooEi(%struct.A* %this, i32 %i) nounwind uwtable align 2 {
36 %idxprom = sext i32 %i to i64
37 %arrayidx = getelementptr inbounds %struct.A* %this, i64 0, i32 0, i64 %idxprom
38 %tmp2 = load double* %arrayidx, align 8