[PATCH] D93570: [VE] Correct VMP allocation in calling conv
Kazushi Marukawa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 18 16:17:46 PST 2020
kaz7 created this revision.
Herald added a subscriber: hiraditya.
kaz7 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D93570
Files:
llvm/lib/Target/VE/VECallingConv.td
llvm/test/CodeGen/VE/Vector/fastcc_callee.ll
Index: llvm/test/CodeGen/VE/Vector/fastcc_callee.ll
===================================================================
--- llvm/test/CodeGen/VE/Vector/fastcc_callee.ll
+++ llvm/test/CodeGen/VE/Vector/fastcc_callee.ll
@@ -137,3 +137,11 @@
; 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
+}
Index: llvm/lib/Target/VE/VECallingConv.td
===================================================================
--- llvm/lib/Target/VE/VECallingConv.td
+++ llvm/lib/Target/VE/VECallingConv.td
@@ -116,7 +116,7 @@
// 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 @@
// 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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93570.312900.patch
Type: text/x-patch
Size: 1434 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201219/8b9129bb/attachment.bin>
More information about the llvm-commits
mailing list