[PATCH] D74623: [MIPS GlobalISel] RegBankSelect G_MERGE_VALUES and G_UNMERGE_VALUES
Petar Avramovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 14 08:41:48 PST 2020
Petar.Avramovic created this revision.
Petar.Avramovic added reviewers: atanasyan, petarj.
Herald added subscribers: llvm-commits, jrtc27, hiraditya, arichardson, rovka, sdardis.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74623
Files:
llvm/lib/Target/Mips/MipsCallLowering.cpp
llvm/lib/Target/Mips/MipsInstrFPU.td
llvm/lib/Target/Mips/MipsInstructionSelector.cpp
llvm/lib/Target/Mips/MipsLegalizerInfo.cpp
llvm/lib/Target/Mips/MipsRegisterBankInfo.cpp
llvm/lib/Target/Mips/MipsRegisterBankInfo.h
llvm/test/CodeGen/Mips/GlobalISel/instruction-select/float_args.mir
llvm/test/CodeGen/Mips/GlobalISel/instruction-select/phi.mir
llvm/test/CodeGen/Mips/GlobalISel/instruction-select/select.mir
llvm/test/CodeGen/Mips/GlobalISel/instruction-select/sitofp_and_uitofp.mir
llvm/test/CodeGen/Mips/GlobalISel/irtranslator/float_args.ll
llvm/test/CodeGen/Mips/GlobalISel/legalizer/phi.mir
llvm/test/CodeGen/Mips/GlobalISel/legalizer/select.mir
llvm/test/CodeGen/Mips/GlobalISel/legalizer/sitofp_and_uitofp.mir
llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/float_args.ll
llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/phi.ll
llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/select.ll
llvm/test/CodeGen/Mips/GlobalISel/regbankselect/float_args.mir
llvm/test/CodeGen/Mips/GlobalISel/regbankselect/phi.mir
llvm/test/CodeGen/Mips/GlobalISel/regbankselect/select.mir
llvm/test/CodeGen/Mips/GlobalISel/regbankselect/sitofp_and_uitofp.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74623.244684.patch
Type: text/x-patch
Size: 76550 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200214/aafc8834/attachment.bin>
More information about the llvm-commits
mailing list