1; RUN: opt < %s -basicaa -slp-vectorizer -S -mcpu=corei7-avx | FileCheck %s 2; RUN: opt < %s -basicaa -slp-vectorizer -slp-max-reg-size=128 -S -mcpu=corei7-avx | FileCheck %s --check-prefix=V128 3 4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 5target triple = "x86_64-unknown-linux-gnu" 6 7; CHECK-LABEL: @foo( 8; CHECK: load <4 x double> 9; CHECK: fadd <4 x double> 10; CHECK: fadd <4 x double> 11; CHECK: store <4 x double> 12 13; V128-LABEL: @foo( 14; V128: load <2 x double> 15; V128: fadd <2 x double> 16; V128: fadd <2 x double> 17; V128: store <2 x double> 18; V128: load <2 x double> 19; V128: fadd <2 x double> 20; V128: fadd <2 x double> 21; V128: store <2 x double> 22 23define void @foo(double* %x) { 24 %1 = load double, double* %x, align 8 25 %2 = fadd double %1, %1 26 %3 = fadd double %2, %1 27 store double %3, double* %x, align 8 28 %4 = getelementptr inbounds double, double* %x, i64 1 29 %5 = load double, double* %4, align 8 30 %6 = fadd double %5, %5 31 %7 = fadd double %6, %5 32 store double %7, double* %4, align 8 33 %8 = getelementptr inbounds double, double* %x, i64 2 34 %9 = load double, double* %8, align 8 35 %10 = fadd double %9, %9 36 %11 = fadd double %10, %9 37 store double %11, double* %8, align 8 38 %12 = getelementptr inbounds double, double* %x, i64 3 39 %13 = load double, double* %12, align 8 40 %14 = fadd double %13, %13 41 %15 = fadd double %14, %13 42 store double %15, double* %12, align 8 43 ret void 44} 45 46