Skip to content

Commit

Permalink
[AIE2P] Support exponent register classes in RegisterBankSelect
Browse files Browse the repository at this point in the history
  • Loading branch information
khallouh committed Jan 17, 2025
1 parent 90b6e4b commit 9993d7e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
1 change: 1 addition & 0 deletions llvm/lib/Target/AIE/AIE2RegisterBanks.td
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
//===----------------------------------------------------------------------===//

include "AIEBaseRegisterBanks.td"
def GPRRegBank : RegisterBank<"GPRRegBank", [eR, eL]>;
def AccRegBank : RegisterBank<"AccRegBank", [ACC256, ACC512, ACC1024]>;
1 change: 0 additions & 1 deletion llvm/lib/Target/AIE/AIEBaseRegisterBanks.td
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
//
//===----------------------------------------------------------------------===//

def GPRRegBank : RegisterBank<"GPRRegBank", [eR, eL]>;
def PTRRegBank : RegisterBank<"PTRRegBank", [eP]>;
def MODRegBank : RegisterBank<"MODRegBank", [mDm]>;
def VRegBank : RegisterBank<"VRegBank", [VEC128, VEC256, VEC512, VEC1024]>;
1 change: 1 addition & 0 deletions llvm/lib/Target/AIE/aie2p/AIE2PRegisterBanks.td
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
//===----------------------------------------------------------------------===//

include "AIEBaseRegisterBanks.td"
def GPRRegBank : RegisterBank<"GPRRegBank", [eR, eL, eE, EXPVEC64]>;
def AccRegBank : RegisterBank<"AccRegBank", [ACC512, ACC1024, ACC2048]>;
28 changes: 28 additions & 0 deletions llvm/test/CodeGen/AIE/aie2p/GlobalIsel/regbankselect-copy.mir
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,31 @@ body: |
%0:_(<64 x s32>) = COPY $dm0
PseudoRET implicit $lr, implicit %0
...

---
name: copy_exp32
legalized: true

body: |
bb.0:
liveins: $el0
; CHECK-LABEL: name: copy_exp32
; CHECK: liveins: $el0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:gprregbank(s32) = COPY $el0
%0:_(s32) = COPY $el0
...

---
name: copy_exp64
legalized: true

body: |
bb.0:
liveins: $el0
; CHECK-LABEL: name: copy_exp64
; CHECK: liveins: $el0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:gprregbank(s64) = COPY $e0
%0:_(s64) = COPY $e0
...

0 comments on commit 9993d7e

Please sign in to comment.