LLVM Bug Fix 13709: Remove needless lsr(Rp, #32) instruction access the
authorPranav Bhandarkar <pranavb@codeaurora.org>
Wed, 5 Sep 2012 16:01:40 +0000 (16:01 +0000)
committerPranav Bhandarkar <pranavb@codeaurora.org>
Wed, 5 Sep 2012 16:01:40 +0000 (16:01 +0000)
commit4c3d3ecdf83cc85e81f2146f2942cf6931e9ce18
treee533c68e365d36515818601d41b0471a0169a8b6
parent7dadac65d375ff21b7a36bfb7642578d2f467525
LLVM Bug Fix 13709: Remove needless lsr(Rp, #32) instruction access the
subreg_hireg of register pair Rp.

* lib/Target/Hexagon/HexagonPeephole.cpp(PeepholeDoubleRegsMap): New
 DenseMap similar to PeepholeMap that additionally records subreg info
 too.
        (runOnMachineFunction): Record information in PeepholeDoubleRegsMap
        and copy propagate the high sub-reg of Rp0 in Rp1 = lsr(Rp0, #32) to
the instruction Rx = COPY Rp1:logreg_subreg.
* test/CodeGen/Hexagon/remove_lsr.ll: New test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163214 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Hexagon/HexagonPeephole.cpp
test/CodeGen/Hexagon/remove_lsr.ll [new file with mode: 0644]