Skip to content

Commit

Permalink
[VE] Fix vmp0 subregister mapping
Browse files Browse the repository at this point in the history
vmp0 is the all-ones v512i1 register and does not break down into
subregisters.

Reviewed By: kaz7

Differential Revision: https://reviews.llvm.org/D120054
  • Loading branch information
simoll committed Feb 18, 2022
1 parent d558540 commit d46e498
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion llvm/lib/Target/VE/VERegisterInfo.td
Expand Up @@ -152,8 +152,10 @@ foreach I = 0-15 in
def VM#I : VEMaskReg<I, "vm"#I, [], ["vm"#I]>, DwarfRegNum<[!add(128,I)]>;

// Aliases of VMs to use as a pair of two VM for packed instructions
def VMP0 : VEMaskReg<0, "vm0", [], ["vm0"]>;

let SubRegIndices = [sub_vm_even, sub_vm_odd], CoveredBySubRegs = 1 in
foreach I = 0-7 in
foreach I = 1-7 in
def VMP#I : VEMaskReg<!shl(I,1), "vmp"#I,
[!cast<VEMaskReg>("VM"#!shl(I,1)),
!cast<VEMaskReg>("VM"#!add(!shl(I,1),1))],
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/VE/VELIntrinsics/extract.ll
@@ -1,3 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=ve -mattr=+vpu | FileCheck %s

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

0 comments on commit d46e498

Please sign in to comment.