1 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
3 ; Test that a replicate of a load gets folded to vlrep also in cases where
4 ; the load has multiple users.
9 define double @fun(double* %Vsrc, <2 x double> %T) {
11 %Vgep1 = getelementptr double, double* %Vsrc, i64 0
12 %Vld1 = load double, double* %Vgep1
13 %Vgep2 = getelementptr double, double* %Vsrc, i64 1
14 %Vld2 = load double, double* %Vgep2
15 %Vgep3 = getelementptr double, double* %Vsrc, i64 2
16 %Vld3 = load double, double* %Vgep3
17 %Vgep4 = getelementptr double, double* %Vsrc, i64 3
18 %Vld4 = load double, double* %Vgep4
19 %Vgep5 = getelementptr double, double* %Vsrc, i64 4
20 %Vld5 = load double, double* %Vgep5
21 %Vgep6 = getelementptr double, double* %Vsrc, i64 5
22 %Vld6 = load double, double* %Vgep6
24 %V19 = insertelement <2 x double> undef, double %Vld1, i32 0
25 %V20 = shufflevector <2 x double> %V19, <2 x double> undef, <2 x i32> zeroinitializer
26 %V21 = insertelement <2 x double> undef, double %Vld4, i32 0
27 %V22 = insertelement <2 x double> %V21, double %Vld5, i32 1
28 %V23 = fmul <2 x double> %V20, %V22
29 %V24 = fadd <2 x double> %T, %V23
30 %V25 = insertelement <2 x double> %V19, double %Vld2, i32 1
31 %V26 = insertelement <2 x double> undef, double %Vld6, i32 0
32 %V27 = insertelement <2 x double> %V26, double %Vld6, i32 1
33 %V28 = fmul <2 x double> %V25, %V27
34 %V29 = fadd <2 x double> %T, %V28
35 %V30 = insertelement <2 x double> undef, double %Vld2, i32 0
36 %V31 = shufflevector <2 x double> %V30, <2 x double> undef, <2 x i32> zeroinitializer
37 %V32 = insertelement <2 x double> undef, double %Vld5, i32 0
38 %V33 = insertelement <2 x double> %V32, double %Vld6, i32 1
39 %V34 = fmul <2 x double> %V31, %V33
40 %V35 = fadd <2 x double> %T, %V34
41 %V36 = insertelement <2 x double> undef, double %Vld3, i32 0
42 %V37 = shufflevector <2 x double> %V36, <2 x double> undef, <2 x i32> zeroinitializer
43 %V38 = fmul <2 x double> %V37, %V22
44 %V39 = fadd <2 x double> %T, %V38
45 %Vmul37 = fmul double %Vld3, %Vld6
46 %Vadd38 = fadd double %Vmul37, %Vmul37
48 %VA0 = fadd <2 x double> %V24, %V29
49 %VA1 = fadd <2 x double> %VA0, %V35
50 %VA2 = fadd <2 x double> %VA1, %V39
52 %VE0 = extractelement <2 x double> %VA2, i32 0
53 %VS1 = fadd double %VE0, %Vadd38