Home | History | Annotate | Download | only in X86
      1 ; RUN: opt < %s -basicaa -slp-vectorizer -dce -S -mtriple=i386-apple-macosx10.8.0 -mcpu=corei7-avx | FileCheck %s
      2 
      3 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128"
      4 target triple = "i386-apple-macosx10.8.0"
      5 
      6 ;CHECK-LABEL: @foo(
      7 ;CHECK: load <2 x double>
      8 ;CHECK: ret
      9 define double @foo(double* nocapture %D) {
     10   br label %1
     11 
     12 ; <label>:1                                       ; preds = %1, %0
     13   %i.02 = phi i32 [ 0, %0 ], [ %10, %1 ]
     14   %sum.01 = phi double [ 0.000000e+00, %0 ], [ %9, %1 ]
     15   %2 = shl nsw i32 %i.02, 1
     16   %3 = getelementptr inbounds double, double* %D, i32 %2
     17   %4 = load double, double* %3, align 4
     18   %A4 = fmul double %4, %4
     19   %A42 = fmul double %A4, %A4
     20   %5 = or i32 %2, 1
     21   %6 = getelementptr inbounds double, double* %D, i32 %5
     22   %7 = load double, double* %6, align 4
     23   %A7 = fmul double %7, %7
     24   %A72 = fmul double %A7, %A7
     25   %8 = fadd double %A42, %A72
     26   %9 = fadd double %sum.01, %8
     27   %10 = add nsw i32 %i.02, 1
     28   %exitcond = icmp eq i32 %10, 100
     29   br i1 %exitcond, label %11, label %1
     30 
     31 ; <label>:11                                      ; preds = %1
     32   ret double %9
     33 }
     34 
     35