1 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" 2 ; RUN: opt < %s -bb-vectorize -bb-vectorize-req-chain-depth=3 -bb-vectorize-vector-bits=192 -bb-vectorize-ignore-target-info -instcombine -gvn -S | FileCheck %s 3 4 ; Basic depth-3 chain 5 define double @test1(double %A1, double %A2, double %A3, double %B1, double %B2, double %B3) { 6 ; CHECK: @test1 7 ; CHECK: %X1.v.i1.11 = insertelement <3 x double> undef, double %B1, i32 0 8 ; CHECK: %X1.v.i1.22 = insertelement <3 x double> %X1.v.i1.11, double %B2, i32 1 9 ; CHECK: %X1.v.i1 = insertelement <3 x double> %X1.v.i1.22, double %B3, i32 2 10 ; CHECK: %X1.v.i0.13 = insertelement <3 x double> undef, double %A1, i32 0 11 ; CHECK: %X1.v.i0.24 = insertelement <3 x double> %X1.v.i0.13, double %A2, i32 1 12 ; CHECK: %X1.v.i0 = insertelement <3 x double> %X1.v.i0.24, double %A3, i32 2 13 %X1 = fsub double %A1, %B1 14 %X2 = fsub double %A2, %B2 15 %X3 = fsub double %A3, %B3 16 ; CHECK: %X1 = fsub <3 x double> %X1.v.i0, %X1.v.i1 17 %Y1 = fmul double %X1, %A1 18 %Y2 = fmul double %X2, %A2 19 %Y3 = fmul double %X3, %A3 20 ; CHECK: %Y1 = fmul <3 x double> %X1, %X1.v.i0 21 %Z1 = fadd double %Y1, %B1 22 %Z2 = fadd double %Y2, %B2 23 %Z3 = fadd double %Y3, %B3 24 ; CHECK: %Z1 = fadd <3 x double> %Y1, %X1.v.i1 25 %R1 = fmul double %Z1, %Z2 26 %R = fmul double %R1, %Z3 27 ; CHECK: %Z1.v.r210 = extractelement <3 x double> %Z1, i32 2 28 ; CHECK: %Z1.v.r1 = extractelement <3 x double> %Z1, i32 0 29 ; CHECK: %Z1.v.r2 = extractelement <3 x double> %Z1, i32 1 30 ; CHECK: %R1 = fmul double %Z1.v.r1, %Z1.v.r2 31 ; CHECK: %R = fmul double %R1, %Z1.v.r210 32 ret double %R 33 ; CHECK: ret double %R 34 } 35 36