1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[VE] Correct VMP allocation in calling conv

VE used to allocate VM1, VM2, VMP2 (VM4+VM5), and VM3.  This patch
corrects to allocate VM1, VM2, VMP2 (VM4+VM5), and VM6.  Also add
a regression test.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D93570
This commit is contained in:
Kazushi (Jam) Marukawa 2020-12-19 01:12:25 +09:00
parent 2c9bb42ba6
commit 920c28fbd1
2 changed files with 10 additions and 2 deletions

View File

@ -116,7 +116,7 @@ def CC_VE_Fast : CallingConv<[
// pair of vector mask --> generic vector mask registers
CCIfType<[v512i1],
CCAssignToRegWithShadow<[VMP1, VMP2, VMP3],
[VM1, VM1, VM3]>>,
[VM1, VM3, VM5]>>,
// Follow the standard C CC for scalars.
CCDelegateTo<CC_VE_C>
@ -137,7 +137,7 @@ def RetCC_VE_Fast : CallingConv<[
// pair of vector mask --> generic vector mask registers
CCIfType<[v512i1],
CCAssignToRegWithShadow<[VMP1, VMP2, VMP3],
[VM1, VM1, VM3]>>,
[VM1, VM3, VM5]>>,
// Follow the standard C CC for scalars.
CCDelegateTo<RetCC_VE_C>

View File

@ -137,3 +137,11 @@ define fastcc <512 x i1> @vreg_arg_v512i1_vmp3(<512 x i1> %vmp1, <512 x i1> %vmp
; CHECK-NEXT: b.l.t (, %s10)
ret <512 x i1> %vmp3
}
define fastcc <256 x i1> @vmp_cc_bug(<256 x i1> %vm1, <256 x i1> %vm2, <512 x i1> %vmp2, <256 x i1> %vm6) {
; CHECK-LABEL: vmp_cc_bug:
; CHECK: # %bb.0:
; CHECK-NEXT: andm %vm1, %vm0, %vm6
; CHECK-NEXT: b.l.t (, %s10)
ret <256 x i1> %vm6
}