1 ; RUN: opt %loadPolly %defaultOpts -polly-codegen -enable-polly-vector -dce -S %s | FileCheck %s
2 ; Obtained from C source as:
3 ; clang -S -emit-llvm -O0 no-math-errno-vect-pow-1.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer no-math-errno-vect-pow-1.s > no-math-errno-vect-pow-1.ll
6 ; ModuleID = 'no-math-errno-vect-pow-1.s'
7 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"
8 target triple = "x86_64-unknown-linux-gnu"
10 @x = common global [256 x double] zeroinitializer, align 16
12 define void @foo() nounwind uwtable {
16 for.cond: ; preds = %for.inc, %entry
17 %indvar = phi i64 [ %indvar.next, %for.inc ], [ 0, %entry ]
18 %arrayidx = getelementptr [256 x double]* @x, i64 0, i64 %indvar
19 %exitcond = icmp ne i64 %indvar, 256
20 br i1 %exitcond, label %for.body, label %for.end
22 for.body: ; preds = %for.cond
23 %tmp2 = load double* %arrayidx, align 8
24 %call = call double @pow(double %tmp2, double 5.000000e-01) nounwind readnone
25 store double %call, double* %arrayidx, align 8
28 for.inc: ; preds = %for.body
29 %indvar.next = add i64 %indvar, 1
32 for.end: ; preds = %for.cond
36 declare double @pow(double, double) nounwind readnone