OSDN Git Service

[ARM GlobalISel] Support exts and truncs for Thumb2
authorDiana Picus <diana.picus@linaro.org>
Thu, 13 Dec 2018 12:06:54 +0000 (12:06 +0000)
committerDiana Picus <diana.picus@linaro.org>
Thu, 13 Dec 2018 12:06:54 +0000 (12:06 +0000)
commit69dfdcbfa702b5e7c6deaf58e1089be7e398157e
tree56fe527bb29ae44cfd851da713c0cd9b90bb7c9b
parent8ab90583eeb0b6113c11866d898dd92c846d3105
[ARM GlobalISel] Support exts and truncs for Thumb2

Mark G_SEXT, G_ZEXT and G_ANYEXT to 32 bits as legal and add support for
them in the instruction selector. This uses handwritten code again
because the patterns that are generated with TableGen are tuned for what
the DAG combiner would produce and not for simple sext/zext nodes.
Luckily, we only need to update the opcodes to use the Thumb2 variants,
everything else can be reused from ARM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349026 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMInstructionSelector.cpp
lib/Target/ARM/ARMLegalizerInfo.cpp
test/CodeGen/ARM/GlobalISel/arm-legalize-exts.mir [new file with mode: 0644]
test/CodeGen/ARM/GlobalISel/thumb-select-exts.mir [new file with mode: 0644]