Debian Codegraph @

llvm/test/CodeGen/PowerPC/dmr-spill.ll

raw
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
3 ; RUN: -ppc-asm-full-reg-names \
4 ; RUN: -ppc-vsr-nums-as-vr -mcpu=future < %s | FileCheck %s
5 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-aix \
6 ; RUN: -ppc-asm-full-reg-names \
7 ; RUN: -ppc-vsr-nums-as-vr -mcpu=future < %s | FileCheck %s --check-prefix=AIX
8 ; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-aix \
9 ; RUN: -ppc-asm-full-reg-names \
10 ; RUN: -ppc-vsr-nums-as-vr -mcpu=future < %s | FileCheck %s --check-prefix=AIX32
11
12 declare <1024 x i1> @llvm.ppc.mma.dmxvbf16gerx2pp(<1024 x i1>, <256 x i1>, <16 x i8>)
13 declare void @dummy_func()
14
15 define void @spillDMRreg(ptr %vop, ptr %vpp, ptr %vcp, ptr %resp) nounwind {
16 ; CHECK-LABEL: spillDMRreg:
17 ; CHECK: # %bb.0:
18 ; CHECK-NEXT: mflr r0
19 ; CHECK-NEXT: std r30, -16(r1) # 8-byte Folded Spill
20 ; CHECK-NEXT: std r0, 16(r1)
21 ; CHECK-NEXT: stdu r1, -176(r1)
22 ; CHECK-NEXT: lxvp vsp34, 0(r3)
23 ; CHECK-NEXT: lxvp vsp36, 32(r3)
24 ; CHECK-NEXT: lxvp vsp32, 64(r3)
25 ; CHECK-NEXT: lxvp vsp38, 96(r3)
26 ; CHECK-NEXT: lxv v8, 16(r4)
27 ; CHECK-NEXT: lxv v9, 0(r4)
28 ; CHECK-NEXT: lxv vs0, 0(r5)
29 ; CHECK-NEXT: dmxxinstdmr512 wacc_hi0, vsp36, vsp34, 1
30 ; CHECK-NEXT: dmxxinstdmr512 wacc0, vsp38, vsp32, 0
31 ; CHECK-NEXT: mr r30, r6
32 ; CHECK-NEXT: dmxvbf16gerx2pp dmr0, vsp40, vs0
33 ; CHECK-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc0, 0
34 ; CHECK-NEXT: stxvp vsp36, 128(r1)
35 ; CHECK-NEXT: stxvp vsp34, 96(r1)
36 ; CHECK-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc_hi0, 1
37 ; CHECK-NEXT: stxvp vsp36, 64(r1)
38 ; CHECK-NEXT: stxvp vsp34, 32(r1)
39 ; CHECK-NEXT: bl dummy_func@notoc
40 ; CHECK-NEXT: lxvp vsp34, 128(r1)
41 ; CHECK-NEXT: lxvp vsp36, 96(r1)
42 ; CHECK-NEXT: dmxxinstdmr512 wacc0, vsp34, vsp36, 0
43 ; CHECK-NEXT: lxvp vsp34, 64(r1)
44 ; CHECK-NEXT: lxvp vsp36, 32(r1)
45 ; CHECK-NEXT: dmxxinstdmr512 wacc_hi0, vsp34, vsp36, 1
46 ; CHECK-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc0, 0
47 ; CHECK-NEXT: stxvp vsp34, 96(r30)
48 ; CHECK-NEXT: stxvp vsp36, 64(r30)
49 ; CHECK-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc_hi0, 1
50 ; CHECK-NEXT: stxvp vsp34, 32(r30)
51 ; CHECK-NEXT: stxvp vsp36, 0(r30)
52 ; CHECK-NEXT: addi r1, r1, 176
53 ; CHECK-NEXT: ld r0, 16(r1)
54 ; CHECK-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
55 ; CHECK-NEXT: mtlr r0
56 ; CHECK-NEXT: blr
57 ;
58 ; AIX-LABEL: spillDMRreg:
59 ; AIX: # %bb.0:
60 ; AIX-NEXT: mflr r0
61 ; AIX-NEXT: std r0, 16(r1)
62 ; AIX-NEXT: stdu r1, -256(r1)
63 ; AIX-NEXT: std r31, 248(r1) # 8-byte Folded Spill
64 ; AIX-NEXT: lxvp vsp34, 96(r3)
65 ; AIX-NEXT: lxvp vsp36, 64(r3)
66 ; AIX-NEXT: lxvp vsp32, 32(r3)
67 ; AIX-NEXT: lxvp vsp38, 0(r3)
68 ; AIX-NEXT: lxv v8, 0(r4)
69 ; AIX-NEXT: lxv v9, 16(r4)
70 ; AIX-NEXT: lxv vs0, 0(r5)
71 ; AIX-NEXT: dmxxinstdmr512 wacc_hi0, vsp36, vsp34, 1
72 ; AIX-NEXT: dmxxinstdmr512 wacc0, vsp38, vsp32, 0
73 ; AIX-NEXT: mr r31, r6
74 ; AIX-NEXT: dmxvbf16gerx2pp dmr0, vsp40, vs0
75 ; AIX-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc0, 0
76 ; AIX-NEXT: stxvp vsp36, 112(r1)
77 ; AIX-NEXT: stxvp vsp34, 144(r1)
78 ; AIX-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc_hi0, 1
79 ; AIX-NEXT: stxvp vsp36, 176(r1)
80 ; AIX-NEXT: stxvp vsp34, 208(r1)
81 ; AIX-NEXT: bl .dummy_func[PR]
82 ; AIX-NEXT: nop
83 ; AIX-NEXT: lxvp vsp34, 112(r1)
84 ; AIX-NEXT: lxvp vsp36, 144(r1)
85 ; AIX-NEXT: dmxxinstdmr512 wacc0, vsp34, vsp36, 0
86 ; AIX-NEXT: lxvp vsp34, 176(r1)
87 ; AIX-NEXT: lxvp vsp36, 208(r1)
88 ; AIX-NEXT: dmxxinstdmr512 wacc_hi0, vsp34, vsp36, 1
89 ; AIX-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc_hi0, 1
90 ; AIX-NEXT: stxvp vsp36, 96(r31)
91 ; AIX-NEXT: stxvp vsp34, 64(r31)
92 ; AIX-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc0, 0
93 ; AIX-NEXT: stxvp vsp36, 32(r31)
94 ; AIX-NEXT: stxvp vsp34, 0(r31)
95 ; AIX-NEXT: ld r31, 248(r1) # 8-byte Folded Reload
96 ; AIX-NEXT: addi r1, r1, 256
97 ; AIX-NEXT: ld r0, 16(r1)
98 ; AIX-NEXT: mtlr r0
99 ; AIX-NEXT: blr
100 ;
101 ; AIX32-LABEL: spillDMRreg:
102 ; AIX32: # %bb.0:
103 ; AIX32-NEXT: mflr r0
104 ; AIX32-NEXT: stw r0, 8(r1)
105 ; AIX32-NEXT: stwu r1, -208(r1)
106 ; AIX32-NEXT: stw r31, 204(r1) # 4-byte Folded Spill
107 ; AIX32-NEXT: lxvp vsp34, 96(r3)
108 ; AIX32-NEXT: lxvp vsp36, 64(r3)
109 ; AIX32-NEXT: lxvp vsp32, 32(r3)
110 ; AIX32-NEXT: lxvp vsp38, 0(r3)
111 ; AIX32-NEXT: lxv v8, 0(r4)
112 ; AIX32-NEXT: lxv v9, 16(r4)
113 ; AIX32-NEXT: lxv vs0, 0(r5)
114 ; AIX32-NEXT: dmxxinstdmr512 wacc_hi0, vsp36, vsp34, 1
115 ; AIX32-NEXT: dmxxinstdmr512 wacc0, vsp38, vsp32, 0
116 ; AIX32-NEXT: mr r31, r6
117 ; AIX32-NEXT: dmxvbf16gerx2pp dmr0, vsp40, vs0
118 ; AIX32-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc0, 0
119 ; AIX32-NEXT: stxvp vsp36, 64(r1)
120 ; AIX32-NEXT: stxvp vsp34, 96(r1)
121 ; AIX32-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc_hi0, 1
122 ; AIX32-NEXT: stxvp vsp36, 128(r1)
123 ; AIX32-NEXT: stxvp vsp34, 160(r1)
124 ; AIX32-NEXT: bl .dummy_func[PR]
125 ; AIX32-NEXT: nop
126 ; AIX32-NEXT: lxvp vsp34, 64(r1)
127 ; AIX32-NEXT: lxvp vsp36, 96(r1)
128 ; AIX32-NEXT: dmxxinstdmr512 wacc0, vsp34, vsp36, 0
129 ; AIX32-NEXT: lxvp vsp34, 128(r1)
130 ; AIX32-NEXT: lxvp vsp36, 160(r1)
131 ; AIX32-NEXT: dmxxinstdmr512 wacc_hi0, vsp34, vsp36, 1
132 ; AIX32-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc_hi0, 1
133 ; AIX32-NEXT: stxvp vsp36, 96(r31)
134 ; AIX32-NEXT: stxvp vsp34, 64(r31)
135 ; AIX32-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc0, 0
136 ; AIX32-NEXT: stxvp vsp36, 32(r31)
137 ; AIX32-NEXT: stxvp vsp34, 0(r31)
138 ; AIX32-NEXT: lwz r31, 204(r1) # 4-byte Folded Reload
139 ; AIX32-NEXT: addi r1, r1, 208
140 ; AIX32-NEXT: lwz r0, 8(r1)
141 ; AIX32-NEXT: mtlr r0
142 ; AIX32-NEXT: blr
143 %v.dmr = load <1024 x i1>, ptr %vop, align 64
144 %v1 = load <256 x i1>, ptr %vpp, align 32
145 %v2 = load <16 x i8>, ptr %vcp, align 32
146 %call = tail call <1024 x i1> @llvm.ppc.mma.dmxvbf16gerx2pp(<1024 x i1> %v.dmr, <256 x i1> %v1, <16 x i8> %v2)
147 tail call void @dummy_func()
148 %call2 = tail call <1024 x i1> @llvm.ppc.mma.dmxvbf16gerx2pp(<1024 x i1> %v.dmr, <256 x i1> %v1, <16 x i8> %v2)
149 store <1024 x i1> %call, ptr %resp, align 64
150 ret void
151 }