[CodeGen] Fix forward scan in MachineBasicBlock::computeRegisterLiveness.
authorEli Friedman <efriedma@codeaurora.org>
Wed, 14 Nov 2018 00:39:29 +0000 (00:39 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Wed, 14 Nov 2018 00:39:29 +0000 (00:39 +0000)
commit6bdabcf368f4c6526cfb3af49c03a98d680b8e8f
treef2d25949e1b94426e9caa7bc7672fad0eeb5267e
parent2d2e23e89b83ce9c7c2fec011abe16da74711b54
[CodeGen] Fix forward scan in MachineBasicBlock::computeRegisterLiveness.

The scan was incorrectly skipping the first instruction, so a register
could appear to be dead when it was actually live. This eventually leads
to a machine verifier failure and miscompile in arm-ldst-opt.

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

llvm-svn: 346821
llvm/lib/CodeGen/MachineBasicBlock.cpp
llvm/test/CodeGen/ARM/load_store_opt_clobber_cpsr.mir [new file with mode: 0644]