OSDN Git Service

[ARM] GlobalISel: Support G_BRCOND
authorDiana Picus <diana.picus@linaro.org>
Fri, 14 Jul 2017 09:46:06 +0000 (09:46 +0000)
committerDiana Picus <diana.picus@linaro.org>
Fri, 14 Jul 2017 09:46:06 +0000 (09:46 +0000)
commita6ef55bfe256fa5686d17a051ca95b2d453eca55
tree48af29c15cbcb971ece0b0226c2abd630a944d07
parent95753226fff563165067c573de1069439ea7eae5
[ARM] GlobalISel: Support G_BRCOND

Insert a TSTri to set the flags and a Bcc to branch based on their
values. This is a bit inefficient in the (common) cases where the
condition for the branch comes from a compare right before the branch,
since we set the flags both as part of the compare lowering and as part
of the branch lowering. We're going to live with that until we settle on
a principled way to handle this kind of situation, which occurs with
other patterns as well (combines might be the way forward here).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308009 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMInstructionSelector.cpp
lib/Target/ARM/ARMLegalizerInfo.cpp
lib/Target/ARM/ARMRegisterBankInfo.cpp
test/CodeGen/ARM/GlobalISel/arm-instruction-select.mir
test/CodeGen/ARM/GlobalISel/arm-isel.ll
test/CodeGen/ARM/GlobalISel/arm-legalizer.mir
test/CodeGen/ARM/GlobalISel/arm-regbankselect.mir