1; RUN: opt < %s -basicaa -slp-vectorizer -dce -S -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7-avx | FileCheck %s 2 3target 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-S128" 4target triple = "x86_64-apple-macosx10.8.0" 5 6; At this point we can't vectorize only parts of the tree. 7 8; CHECK: test 9; CHECK: insertelement <2 x i8> 10; CHECK: insertelement <2 x i8> 11; CHECK: sitofp <2 x i8> 12; CHECK: fmul <2 x double> 13; CHECK: ret 14define i32 @test(double* nocapture %A, i8* nocapture %B) { 15entry: 16 %0 = load i8, i8* %B, align 1 17 %arrayidx1 = getelementptr inbounds i8, i8* %B, i64 1 18 %1 = load i8, i8* %arrayidx1, align 1 19 %add = add i8 %0, 3 20 %add4 = add i8 %1, 3 21 %conv6 = sitofp i8 %add to double 22 %conv7 = sitofp i8 %add4 to double 23 %mul = fmul double %conv6, %conv6 24 %add8 = fadd double %mul, 1.000000e+00 25 %mul9 = fmul double %conv7, %conv7 26 %add10 = fadd double %mul9, 1.000000e+00 27 %mul11 = fmul double %add8, %add8 28 %add12 = fadd double %mul11, 1.000000e+00 29 %mul13 = fmul double %add10, %add10 30 %add14 = fadd double %mul13, 1.000000e+00 31 %mul15 = fmul double %add12, %add12 32 %add16 = fadd double %mul15, 1.000000e+00 33 %mul17 = fmul double %add14, %add14 34 %add18 = fadd double %mul17, 1.000000e+00 35 %mul19 = fmul double %add16, %add16 36 %add20 = fadd double %mul19, 1.000000e+00 37 %mul21 = fmul double %add18, %add18 38 %add22 = fadd double %mul21, 1.000000e+00 39 %mul23 = fmul double %add20, %add20 40 %add24 = fadd double %mul23, 1.000000e+00 41 %mul25 = fmul double %add22, %add22 42 %add26 = fadd double %mul25, 1.000000e+00 43 store double %add24, double* %A, align 8 44 %arrayidx28 = getelementptr inbounds double, double* %A, i64 1 45 store double %add26, double* %arrayidx28, align 8 46 ret i32 undef 47} 48