Page MenuHomePhabricator

[WIP][RISCV][GlobalISel] Select register banks for GPR ALU instructions
Needs ReviewPublic

Authored by lewis-revill on Mar 12 2020, 2:23 AM.



This patch implements the getInstrMapping hook for RISCVRegisterBankInfo and others in order to correctly select the GPR register bank for operands of ALU instructions, and the associated operations introduced by the legalizer.

Diff Detail

Event Timeline

lewis-revill created this revision.Mar 12 2020, 2:23 AM
simoncook added inline comments.Mar 13 2020, 4:02 PM

This looks strange this way round, does this still build if you swap lines 14 and 15?


reigsters -> registers, nitpick: RV32

lewis-revill retitled this revision from [RISCV][GlobalISel] Select register banks for GPR ALU instructions to [WIP][RISCV][GlobalISel] Select register banks for GPR ALU instructions.
lewis-revill added a reviewer: Joe.

Address comments

Support AND/OR/XOR.

Use utils/

lewis-revill edited the summary of this revision. (Show Details)

Expand patch to include operations for other types as introduced by the legalizer.

Add more operand mappings and expand tests over more types.

Bug fix - don't try to access the size of a $noreg register.

lenary resigned from this revision.Jan 14 2021, 10:10 AM
rkruppe removed a subscriber: rkruppe.Jan 14 2021, 10:20 AM