[ARM][GlobalISel] Support for G_ANYEXT
authorDiana Picus <diana.picus@linaro.org>
Thu, 11 May 2017 08:28:31 +0000 (08:28 +0000)
committerDiana Picus <diana.picus@linaro.org>
Thu, 11 May 2017 08:28:31 +0000 (08:28 +0000)
commit657bfd330204a748d5b5f9bca4fd50199f913240
tree4a3c7636b33a6e36ebd00da9dd0f12a5a28724a7
parent738d3b97af3aa7fd8878879a639ba48a6254dbe8
[ARM][GlobalISel] Support for G_ANYEXT

G_ANYEXT can be introduced by the legalizer when widening scalars. Add
support for it in the register bank info (same mapping as everything
else) and in the instruction selector.

When selecting it, we treat it as a COPY, just like G_TRUNC. On this
occasion we get rid of some assertions in selectCopy so we can reuse it.
This shouldn't be a problem at the moment since we're not supporting any
complicated cases (e.g. FPR, different register banks). We might want to
separate the paths when we do.

llvm-svn: 302778
llvm/lib/Target/ARM/ARMInstructionSelector.cpp
llvm/lib/Target/ARM/ARMRegisterBankInfo.cpp
llvm/test/CodeGen/ARM/GlobalISel/arm-instruction-select.mir
llvm/test/CodeGen/ARM/GlobalISel/arm-regbankselect.mir