Fix incorrect kill flags in fastisel.
authorPete Cooper <peter_cooper@apple.com>
Wed, 6 May 2015 22:09:29 +0000 (22:09 +0000)
committerPete Cooper <peter_cooper@apple.com>
Wed, 6 May 2015 22:09:29 +0000 (22:09 +0000)
commit537ff782aa50364f0c21712b6b4409fd269e5d38
tree1a33357455bdc8d30c93f4482a97a4395ddd9848
parent0040d179d275b304591817b6d2058d96460d7ed9
Fix incorrect kill flags in fastisel.

If called twice in the same BB on the same constant, FastISel::fastEmit_ri_ was marking the materialized vreg as killed on each use, instead of only the last use.

Change this to only mark the last use as killed by making earlier uses check if the vreg is already used elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236650 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/FastISel.cpp
test/CodeGen/ARM/fast-isel-shift-materialize.ll [new file with mode: 0644]