This is an archive of the discontinued LLVM Phabricator instance.

[MIPS GlobalISel] RegBankSelect G_MERGE_VALUES and G_UNMERGE_VALUES
ClosedPublic

Authored by Petar.Avramovic on Feb 14 2020, 8:41 AM.

Details

Summary

Consider large operands in G_MERGE_VALUES and G_UNMERGE_VALUES as
Ambiguous during regbank selection.
Introducing new InstType AmbiguousWithMergeOrUnmerge which will
allow us to recognize whether to narrow scalar or use s64:fprb.

This change exposed a bug when reusing data from TypeInfoForMF. Thus
when Instr is about to get destroyed (using narrow scalar) clear its
data in TypeInfoForMF. Internal data is saved based on Instr's
address, and it will no longer be valid.
Add detailed asserts for InstType and operand size.

Generate generic instructions instead of MIPS target instructions
during argument lowering and custom legalizer.
Select G_UNMERGE_VALUES and G_MERGE_VALUES when proper banks are selected:
{s32:gprb, s32:gprb, s64:fprb} for G_UNMERGE_VALUES and
{s64:fprb, s32:gprb, s32:gprb} for G_MERGE_VALUES.
Update tests. One improvement is when floating point argument in
gpr(or two gpr) gets passed to another function through gpr unnecessary
fpr-to-gpr moves are no longer used generated.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2020, 8:41 AM
This revision is now accepted and ready to land.Feb 16 2020, 10:12 PM
This revision was automatically updated to reflect the committed changes.