diff --git a/llvm/lib/Target/VE/VECallingConv.td b/llvm/lib/Target/VE/VECallingConv.td --- a/llvm/lib/Target/VE/VECallingConv.td +++ b/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 @@ -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 diff --git a/llvm/test/CodeGen/VE/Vector/fastcc_callee.ll b/llvm/test/CodeGen/VE/Vector/fastcc_callee.ll --- a/llvm/test/CodeGen/VE/Vector/fastcc_callee.ll +++ b/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 +}