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(ptr %Vsrc, <2 x double> %T) {
11 %Vld1 = load double, ptr %Vsrc
12 %Vgep2 = getelementptr double, ptr %Vsrc, i64 1
13 %Vld2 = load double, ptr %Vgep2
14 %Vgep3 = getelementptr double, ptr %Vsrc, i64 2
15 %Vld3 = load double, ptr %Vgep3
16 %Vgep4 = getelementptr double, ptr %Vsrc, i64 3
17 %Vld4 = load double, ptr %Vgep4
18 %Vgep5 = getelementptr double, ptr %Vsrc, i64 4
19 %Vld5 = load double, ptr %Vgep5
20 %Vgep6 = getelementptr double, ptr %Vsrc, i64 5
21 %Vld6 = load double, ptr %Vgep6
23 %V19 = insertelement <2 x double> undef, double %Vld1, i32 0
24 %V20 = shufflevector <2 x double> %V19, <2 x double> undef, <2 x i32> zeroinitializer
25 %V21 = insertelement <2 x double> undef, double %Vld4, i32 0
26 %V22 = insertelement <2 x double> %V21, double %Vld5, i32 1
27 %V23 = fmul <2 x double> %V20, %V22
28 %V24 = fadd <2 x double> %T, %V23
29 %V25 = insertelement <2 x double> %V19, double %Vld2, i32 1
30 %V26 = insertelement <2 x double> undef, double %Vld6, i32 0
31 %V27 = insertelement <2 x double> %V26, double %Vld6, i32 1
32 %V28 = fmul <2 x double> %V25, %V27
33 %V29 = fadd <2 x double> %T, %V28
34 %V30 = insertelement <2 x double> undef, double %Vld2, i32 0
35 %V31 = shufflevector <2 x double> %V30, <2 x double> undef, <2 x i32> zeroinitializer
36 %V32 = insertelement <2 x double> undef, double %Vld5, i32 0
37 %V33 = insertelement <2 x double> %V32, double %Vld6, i32 1
38 %V34 = fmul <2 x double> %V31, %V33
39 %V35 = fadd <2 x double> %T, %V34
40 %V36 = insertelement <2 x double> undef, double %Vld3, i32 0
41 %V37 = shufflevector <2 x double> %V36, <2 x double> undef, <2 x i32> zeroinitializer
42 %V38 = fmul <2 x double> %V37, %V22
43 %V39 = fadd <2 x double> %T, %V38
44 %Vmul37 = fmul double %Vld3, %Vld6
45 %Vadd38 = fadd double %Vmul37, %Vmul37
47 %VA0 = fadd <2 x double> %V24, %V29
48 %VA1 = fadd <2 x double> %VA0, %V35
49 %VA2 = fadd <2 x double> %VA1, %V39
51 %VE0 = extractelement <2 x double> %VA2, i32 0
52 %VS1 = fadd double %VE0, %Vadd38