OSDN Git Service

[MIPS GlobalISel] Register bank select for G_PHI. Select i64 phi
authorPetar Avramovic <Petar.Avramovic@rt-rk.com>
Tue, 9 Jul 2019 14:36:17 +0000 (14:36 +0000)
committerPetar Avramovic <Petar.Avramovic@rt-rk.com>
Tue, 9 Jul 2019 14:36:17 +0000 (14:36 +0000)
commit47da14c083285a03aed3b237a2d4c463b13940a3
tree139c147b5b13b117762c1ddc8e5280f94da3eff3
parentfcf62176f86318564a45c64b33f776deddd7bb09
[MIPS GlobalISel] Register bank select for G_PHI. Select i64 phi

Select gprb or fprb when def/use register operand of G_PHI is
used/defined by either:
 copy to/from physical register or
 instruction with only one mapping available for that use/def operand.

Integer s64 phi is handled with narrowScalar when mapping is applied,
produced artifacts are combined away. Manually set gprb to all register
operands of instructions created during narrowScalar.

Differential Revision: https://reviews.llvm.org/D64351

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365494 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/GlobalISel/LegalizerHelper.cpp
lib/Target/Mips/MipsLegalizerInfo.cpp
lib/Target/Mips/MipsRegisterBankInfo.cpp
test/CodeGen/Mips/GlobalISel/legalizer/phi.mir
test/CodeGen/Mips/GlobalISel/llvm-ir/phi.ll
test/CodeGen/Mips/GlobalISel/regbankselect/phi.mir