]> granicus.if.org Git - llvm/commit
[ARM GlobalISel] Import MOVi32imm into GlobalISel
authorDiana Picus <diana.picus@linaro.org>
Mon, 14 Jan 2019 12:04:08 +0000 (12:04 +0000)
committerDiana Picus <diana.picus@linaro.org>
Mon, 14 Jan 2019 12:04:08 +0000 (12:04 +0000)
commit40b75b2f1297cc25dc6ef36b47f5e8a68d8a744c
tree35b45557cafb99dc57a6a4ce1a9af6cc23c111c5
parent09be36deab8b4d793759acf517191f327b08489c
[ARM GlobalISel] Import MOVi32imm into GlobalISel

Make it possible for TableGen to produce code for selecting MOVi32imm.
This allows reasonably recent ARM targets to select a lot more constants
than before.

We achieve this by adding GISelPredicateCode to arm_i32imm. It's
impossible to use the exact same code for both DAGISel and GlobalISel,
since one uses "Subtarget->" and the other "STI." to refer to the
subtarget. Moreover, in GlobalISel we don't have ready access to the
MachineFunction, so we need to add a bit of code for obtaining it from
the instruction that we're selecting. This is also the reason why it
needs to remain a PatLeaf instead of the more specific IntImmLeaf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351056 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMInstrInfo.td
test/CodeGen/ARM/GlobalISel/arm-instruction-select.mir