1cee313d2SEric Christopher; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2691c086dSArthur Eubanks; RUN: opt < %s -basic-aa -slp-vectorizer -S -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7-avx | FileCheck %s 3cee313d2SEric Christopher 4cee313d2SEric Christophertarget 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" 5cee313d2SEric Christophertarget triple = "x86_64-apple-macosx10.8.0" 6cee313d2SEric Christopher 7cee313d2SEric Christopher; We will keep trying to vectorize the basic block even we already find vectorized store. 8cee313d2SEric Christopherdefine void @test1(double* %a, double* %b, double* %c, double* %d) { 9cee313d2SEric Christopher; CHECK-LABEL: @test1( 10cee313d2SEric Christopher; CHECK-NEXT: entry: 11*7d6e8f2aSPhilip Reames; CHECK-NEXT: [[TMP0:%.*]] = bitcast double* [[A:%.*]] to <2 x double>* 12cee313d2SEric Christopher; CHECK-NEXT: [[TMP1:%.*]] = load <2 x double>, <2 x double>* [[TMP0]], align 8 13*7d6e8f2aSPhilip Reames; CHECK-NEXT: [[TMP2:%.*]] = bitcast double* [[B:%.*]] to <2 x double>* 14cee313d2SEric Christopher; CHECK-NEXT: [[TMP3:%.*]] = load <2 x double>, <2 x double>* [[TMP2]], align 8 15cee313d2SEric Christopher; CHECK-NEXT: [[TMP4:%.*]] = fmul <2 x double> [[TMP1]], [[TMP3]] 16*7d6e8f2aSPhilip Reames; CHECK-NEXT: [[TMP5:%.*]] = bitcast double* [[C:%.*]] to <2 x double>* 17cee313d2SEric Christopher; CHECK-NEXT: store <2 x double> [[TMP4]], <2 x double>* [[TMP5]], align 8 18cee313d2SEric Christopher; CHECK-NEXT: [[TMP6:%.*]] = bitcast double* [[A]] to <4 x i32>* 19cee313d2SEric Christopher; CHECK-NEXT: [[TMP7:%.*]] = load <4 x i32>, <4 x i32>* [[TMP6]], align 8 20cee313d2SEric Christopher; CHECK-NEXT: [[TMP8:%.*]] = bitcast double* [[B]] to <4 x i32>* 21cee313d2SEric Christopher; CHECK-NEXT: [[TMP9:%.*]] = load <4 x i32>, <4 x i32>* [[TMP8]], align 8 22cee313d2SEric Christopher; CHECK-NEXT: [[TMP10:%.*]] = mul <4 x i32> [[TMP7]], [[TMP9]] 23cee313d2SEric Christopher; CHECK-NEXT: [[TMP11:%.*]] = bitcast double* [[D:%.*]] to <4 x i32>* 24cee313d2SEric Christopher; CHECK-NEXT: store <4 x i32> [[TMP10]], <4 x i32>* [[TMP11]], align 8 25cee313d2SEric Christopher; CHECK-NEXT: ret void 26cee313d2SEric Christopher; 27cee313d2SEric Christopherentry: 28cee313d2SEric Christopher %i0 = load double, double* %a, align 8 29cee313d2SEric Christopher %i1 = load double, double* %b, align 8 30cee313d2SEric Christopher %mul = fmul double %i0, %i1 31cee313d2SEric Christopher %arrayidx3 = getelementptr inbounds double, double* %a, i64 1 32cee313d2SEric Christopher %i3 = load double, double* %arrayidx3, align 8 33cee313d2SEric Christopher %arrayidx4 = getelementptr inbounds double, double* %b, i64 1 34cee313d2SEric Christopher %i4 = load double, double* %arrayidx4, align 8 35cee313d2SEric Christopher %mul5 = fmul double %i3, %i4 36cee313d2SEric Christopher store double %mul, double* %c, align 8 37cee313d2SEric Christopher %arrayidx5 = getelementptr inbounds double, double* %c, i64 1 38cee313d2SEric Christopher store double %mul5, double* %arrayidx5, align 8 39cee313d2SEric Christopher %0 = bitcast double* %a to <4 x i32>* 40cee313d2SEric Christopher %1 = load <4 x i32>, <4 x i32>* %0, align 8 41cee313d2SEric Christopher %2 = bitcast double* %b to <4 x i32>* 42cee313d2SEric Christopher %3 = load <4 x i32>, <4 x i32>* %2, align 8 43cee313d2SEric Christopher %4 = mul <4 x i32> %1, %3 44cee313d2SEric Christopher %5 = bitcast double* %d to <4 x i32>* 45cee313d2SEric Christopher store <4 x i32> %4, <4 x i32>* %5, align 8 46cee313d2SEric Christopher ret void 47cee313d2SEric Christopher} 48