OSDN Git Service

[Thumb-1] Fix corner cases for compressed jump tables
authorWeiming Zhao <weimingz@codeaurora.org>
Thu, 20 Apr 2017 18:37:14 +0000 (18:37 +0000)
committerWeiming Zhao <weimingz@codeaurora.org>
Thu, 20 Apr 2017 18:37:14 +0000 (18:37 +0000)
commita90b36e98b15ddba4821e04d035953c9da9b428e
treea8a6027f3ac0596f16edc6ae8d0db1040af3bdd4
parentb2a1e2499a08e95001b2c47f59085cf755ce12cc
[Thumb-1] Fix corner cases for compressed jump tables

Summary:
When synthesized TBB/TBH is expanded, we need to avoid the case of:
   BaseReg is redefined after the load of branching target. E.g.:

    %R2 = tLEApcrelJT <jt#1>
    %R1 =  tLDRr %R1, %R2    ==> %R2 = tLEApcrelJT <jt#1>
    %R2 = tLDRspi %SP, 12        %R2 = tLDRspi %SP, 12
    tBR_JTr %R1                  tTBB_JT %R2, %R1
`
Reviewers: jmolloy

Reviewed By: jmolloy

Subscribers: llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300870 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMConstantIslandPass.cpp