1 ; RUN: opt %loadPolly %defaultOpts -polly-codegen -enable-polly-vector -dce -S %s | FileCheck %s
2 ; ModuleID = 'pr33834_1.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 %class.internals = type { %class.bend_set }
7 %class.bend_set = type { %class.bend_class* }
8 %class.bend_class = type { double* }
10 define void @_ZN9internals9compute_sEv(%class.internals* %this) uwtable align 2 {
12 %bend = getelementptr inbounds %class.internals* %this, i64 0, i32 0
13 call void @_ZN8bend_set9compute_sEv(%class.bend_set* %bend)
17 define linkonce_odr void @_ZN8bend_set9compute_sEv(%class.bend_set* %this) uwtable align 2 {
19 %tmp = alloca [3 x double], align 16
22 for.cond: ; preds = %for.inc21, %entry
23 %tmp3 = phi i32 [ 0, %entry ], [ %inc23, %for.inc21 ]
24 %exitcond2 = icmp ne i32 %tmp3, 5
25 br i1 %exitcond2, label %for.body, label %for.end24
27 for.body: ; preds = %for.cond
28 %conv = sitofp i32 %tmp3 to double
31 for.cond4: ; preds = %for.inc, %for.body
32 %indvar = phi i64 [ %indvar.next, %for.inc ], [ 0, %for.body ]
33 %arrayidx = getelementptr [3 x double]* %tmp, i64 0, i64 %indvar
34 %exitcond = icmp ne i64 %indvar, 2
35 br i1 %exitcond, label %for.body7, label %for.end
37 for.body7: ; preds = %for.cond4
38 %call = call double @_Z3cosd(double %conv)
39 store double %call, double* %arrayidx, align 8
42 for.inc: ; preds = %for.body7
43 %indvar.next = add i64 %indvar, 1
46 for.end: ; preds = %for.cond4
47 %arrayidx12 = getelementptr inbounds [3 x double]* %tmp, i64 0, i64 0
48 %tmp13 = load double* %arrayidx12, align 16
49 call void @_ZN8bend_set7set_s_AEid(%class.bend_set* %this, i32 %tmp3, double %tmp13)
50 %call15 = call double @_Z3cosd(double %conv)
51 %call17 = call double @_Z3sind(double %conv)
52 %div = fdiv double %call15, %call17
53 %idxprom19 = sext i32 2 to i64
54 %arrayidx20 = getelementptr inbounds [3 x double]* %tmp, i64 0, i64 %idxprom19
55 store double %div, double* %arrayidx20, align 8
58 for.inc21: ; preds = %for.end
59 %inc23 = add nsw i32 %tmp3, 1
62 for.end24: ; preds = %for.cond
66 declare double @_Z3cosd(double)
68 define linkonce_odr void @_ZN8bend_set7set_s_AEid(%class.bend_set* %this, i32 %index, double %s_A0) uwtable align 2 {
70 %idxprom = sext i32 %index to i64
71 %bend_array = getelementptr inbounds %class.bend_set* %this, i64 0, i32 0
72 %tmp2 = load %class.bend_class** %bend_array, align 8
73 %arrayidx = getelementptr inbounds %class.bend_class* %tmp2, i64 %idxprom
74 call void @_ZN10bend_class7set_s_AEd(%class.bend_class* %arrayidx, double %s_A0)
78 declare double @_Z3sind(double)
80 define linkonce_odr void @_ZN10bend_class7set_s_AEd(%class.bend_class* %this, double %s_A0) nounwind uwtable align 2 {
82 %s_A = getelementptr inbounds %class.bend_class* %this, i64 0, i32 0
83 %tmp2 = load double** %s_A, align 8
84 store double %s_A0, double* %tmp2, align 8