Skip to content

Commit d46e498

Browse files
author
Simon Moll
committed
[VE] Fix vmp0 subregister mapping
vmp0 is the all-ones v512i1 register and does not break down into subregisters. Reviewed By: kaz7 Differential Revision: https://reviews.llvm.org/D120054
1 parent d558540 commit d46e498

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

llvm/lib/Target/VE/VERegisterInfo.td

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,10 @@ foreach I = 0-15 in
152152
def VM#I : VEMaskReg<I, "vm"#I, [], ["vm"#I]>, DwarfRegNum<[!add(128,I)]>;
153153

154154
// Aliases of VMs to use as a pair of two VM for packed instructions
155+
def VMP0 : VEMaskReg<0, "vm0", [], ["vm0"]>;
156+
155157
let SubRegIndices = [sub_vm_even, sub_vm_odd], CoveredBySubRegs = 1 in
156-
foreach I = 0-7 in
158+
foreach I = 1-7 in
157159
def VMP#I : VEMaskReg<!shl(I,1), "vmp"#I,
158160
[!cast<VEMaskReg>("VM"#!shl(I,1)),
159161
!cast<VEMaskReg>("VM"#!add(!shl(I,1),1))],

llvm/test/CodeGen/VE/VELIntrinsics/extract.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
12
; RUN: llc < %s -mtriple=ve -mattr=+vpu | FileCheck %s
23

34
;;; Test extract intrinsic instructions
@@ -22,7 +23,6 @@ declare <256 x i1> @llvm.ve.vl.extract.vm512u(<512 x i1>)
2223
define fastcc <256 x i1> @extract_vm512l(<512 x i1> %0) {
2324
; CHECK-LABEL: extract_vm512l:
2425
; CHECK: # %bb.0:
25-
; CHECK-NEXT: andm %vm0, %vm0, %vm2
2626
; CHECK-NEXT: andm %vm1, %vm0, %vm3
2727
; CHECK-NEXT: b.l.t (, %s10)
2828
%2 = tail call <256 x i1> @llvm.ve.vl.extract.vm512l(<512 x i1> %0)

0 commit comments

Comments
 (0)