ARM: fix peephole optimisation of TST
authorTim Northover <tnorthover@apple.com>
Tue, 28 Apr 2015 22:03:55 +0000 (22:03 +0000)
committerTim Northover <tnorthover@apple.com>
Tue, 28 Apr 2015 22:03:55 +0000 (22:03 +0000)
commite18d662201cd8d849cb45ee89cfa048d5c7a35cf
tree52f06e09de7fe6ab1e50bd747721a86b3be93347
parent41920d0382806957a433e23a86de26721abe5005
ARM: fix peephole optimisation of TST

We were trying to look through COPY instructions, but only to the next
instruction in a BB and incorrectly anyway. The cases where that would actually
be a good idea are rare enough (and not even tested!) that it's not worth
trying to get right.

rdar://20721342

llvm-svn: 236050
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/test/CodeGen/ARM/arm-and-tst-peephole.ll