Add compile command to each testcase
[gcc-vect-testsuite.git] / fast-math-ifcvt-1.ll
blob4c4ad6dad6664dae05a50510c40e10a82819d6a1
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 fast-math-ifcvt-1.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer fast-math-ifcvt-1.s > fast-math-ifcvt-1.ll
6 ; ModuleID = 'fast-math-ifcvt-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 define void @bestseries9(float* noalias %arr, i32 %len) nounwind uwtable {
11 entry:
12   %tmp = icmp sgt i32 %len, 0
13   %smax = select i1 %tmp, i32 %len, i32 0
14   %tmp1 = zext i32 %smax to i64
15   br label %for.cond
17 for.cond:                                         ; preds = %for.inc, %entry
18   %indvar = phi i64 [ %indvar.next, %for.inc ], [ 0, %entry ]
19   %arrayidx = getelementptr float* %arr, i64 %indvar
20   %exitcond = icmp ne i64 %indvar, %tmp1
21   br i1 %exitcond, label %for.body, label %for.end
23 for.body:                                         ; preds = %for.cond
24   %tmp5 = load float* %arrayidx, align 4
25   %cmp7 = fcmp ogt float %tmp5, 0.000000e+00
26   %conv = zext i1 %cmp7 to i32
27   %conv8 = sitofp i32 %conv to float
28   %mul = fmul float %tmp5, %tmp5
29   %sub = fsub float 2.000000e+00, %mul
30   %mul11 = fmul float %conv8, %sub
31   store float %mul11, float* %arrayidx, align 4
32   br label %for.inc
34 for.inc:                                          ; preds = %for.body
35   %indvar.next = add i64 %indvar, 1
36   br label %for.cond
38 for.end:                                          ; preds = %for.cond
39   ret void
41 ; CHECK: define