xref: /llvm-project/llvm/test/CodeGen/PowerPC/pr28130.ll (revision 5403c59c608c08c8ecd4303763f08eb046eb5e4d)
1; RUN: llc -verify-machineinstrs -O0 < %s | FileCheck %s
2target triple = "powerpc64le-unknown-linux-gnu"
3
4%StructA = type { double, double, double, double, double, double, double, double }
5
6define void @Test(ptr %tmp) unnamed_addr #0 align 2 {
7; CHECK-LABEL: Test:
8; CHECK: lxvd2x
9; CHECK-NEXT: xxswapd
10; CHECK: lxvd2x
11; CHECK-NEXT: xxswapd
12; CHECK: lxvd2x
13; CHECK-NEXT: xxswapd
14; CHECK: lxvd2x
15; CHECK-NEXT: xxswapd
16; CHECK: xxswapd [[OUTPUT:[0-9]+]]
17; CHECK-NEXT: stxvd2x [[OUTPUT]]
18bb:
19  %tmp5 = getelementptr inbounds %StructA, ptr %tmp, i64 0, i32 2
20  %tmp9 = getelementptr inbounds %StructA, ptr %tmp, i64 0, i32 4
21  %tmp11 = getelementptr inbounds %StructA, ptr %tmp, i64 0, i32 5
22  %tmp13 = getelementptr inbounds %StructA, ptr %tmp, i64 0, i32 6
23  %tmp15 = getelementptr inbounds %StructA, ptr %tmp, i64 0, i32 7
24  %tmp18 = load double, ptr %tmp, align 16
25  %tmp19 = load double, ptr %tmp11, align 8
26  %tmp20 = load double, ptr %tmp9, align 16
27  %tmp21 = fsub double 1.210000e+04, %tmp20
28  %tmp22 = fmul double %tmp18, %tmp21
29  %tmp23 = fadd double %tmp20, %tmp22
30  %tmp24 = load double, ptr %tmp13, align 16
31  %tmp25 = fsub double 1.000000e+02, %tmp24
32  %tmp26 = fmul double %tmp18, %tmp25
33  %tmp27 = fadd double %tmp24, %tmp26
34  %tmp28 = load double, ptr %tmp15, align 8
35  %tmp29 = insertelement <2 x double> undef, double %tmp19, i32 0
36  %tmp30 = insertelement <2 x double> %tmp29, double %tmp28, i32 1
37  %tmp31 = fsub <2 x double> <double 1.100000e+04, double 1.100000e+02>, %tmp30
38  %tmp32 = insertelement <2 x double> undef, double %tmp18, i32 0
39  %tmp33 = insertelement <2 x double> %tmp32, double %tmp18, i32 1
40  %tmp34 = fmul <2 x double> %tmp33, %tmp31
41  %tmp35 = fadd <2 x double> %tmp30, %tmp34
42  %tmp37 = load <2 x double>, ptr %tmp5, align 16
43  %tmp38 = fsub <2 x double> <double 1.000000e+00, double 1.000000e+04>, %tmp37
44  %tmp39 = fmul <2 x double> %tmp33, %tmp38
45  %tmp40 = fadd <2 x double> %tmp37, %tmp39
46  %tmp41 = fsub <2 x double> <double 1.000000e+00, double 1.000000e+04>, %tmp40
47  %tmp42 = fmul <2 x double> %tmp33, %tmp41
48  %tmp43 = fadd <2 x double> %tmp40, %tmp42
49  %tmp44 = fsub <2 x double> <double 1.200000e+04, double 1.200000e+02>, %tmp35
50  %tmp45 = fmul <2 x double> %tmp33, %tmp44
51  %tmp46 = fadd <2 x double> %tmp35, %tmp45
52  %tmp48 = fsub double 1.440000e+04, %tmp23
53  %tmp49 = fmul double %tmp18, %tmp48
54  %tmp50 = fadd double %tmp23, %tmp49
55  store double %tmp50, ptr %tmp9, align 16
56  %tmp51 = fsub double 1.000000e+02, %tmp27
57  %tmp52 = fmul double %tmp18, %tmp51
58  %tmp53 = fadd double %tmp27, %tmp52
59  store double %tmp53, ptr %tmp13, align 16
60  %tmp54 = extractelement <2 x double> %tmp46, i32 1
61  store double %tmp54, ptr %tmp15, align 8
62  store <2 x double> %tmp43, ptr %tmp5, align 16
63  ret void
64}
65
66attributes #0 = { nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="pwr8" "target-features"="+altivec,+bpermd,+crypto,+direct-move,+extdiv,+power8-vector,+vsx" "unsafe-fp-math"="false" "use-soft-float"="false" }
67