Author: Kazushi (Jam) Marukawa Date: 2020-12-21T22:42:24+09:00 New Revision: 8c2ad9e85f677546021880dc88e24f633ccacd93
URL: https://github.com/llvm/llvm-project/commit/8c2ad9e85f677546021880dc88e24f633ccacd93 DIFF: https://github.com/llvm/llvm-project/commit/8c2ad9e85f677546021880dc88e24f633ccacd93.diff LOG: [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 Added: Modified: llvm/lib/Target/VE/VECallingConv.td llvm/test/CodeGen/VE/Vector/fastcc_callee.ll Removed: ################################################################################ diff --git a/llvm/lib/Target/VE/VECallingConv.td b/llvm/lib/Target/VE/VECallingConv.td index 6741d1cc8eaf..93899c2cae3d 100644 --- a/llvm/lib/Target/VE/VECallingConv.td +++ b/llvm/lib/Target/VE/VECallingConv.td @@ -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> diff --git a/llvm/test/CodeGen/VE/Vector/fastcc_callee.ll b/llvm/test/CodeGen/VE/Vector/fastcc_callee.ll index c0ad247d0e74..aa7b4944e7e4 100644 --- a/llvm/test/CodeGen/VE/Vector/fastcc_callee.ll +++ b/llvm/test/CodeGen/VE/Vector/fastcc_callee.ll @@ -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 +} _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits