ARM: update peephole optimization.
authorManman Ren <mren@apple.com>
Mon, 25 Jun 2012 21:49:38 +0000 (21:49 +0000)
committerManman Ren <mren@apple.com>
Mon, 25 Jun 2012 21:49:38 +0000 (21:49 +0000)
commit540cda34b03388b510ded4546acfc7e276700daa
tree221405a8540bdab11f48fb7e10c50a7ecfa46dc5
parent2c5fbb9bcb5c1355e723be8c588ea0998d3d3720
ARM: update peephole optimization.

More condition codes are included when deciding whether to remove cmp after
a sub instruction. Specifically, we extend from GE|LT|GT|LE to
GE|LT|GT|LE|HS|LS|HI|LO|EQ|NE. If we have "sub a, b; cmp b, a; movhs", we
should be able to replace with "sub a, b; movls".

rdar: 11725965

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159166 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseInstrInfo.cpp
test/CodeGen/ARM/sub-cmp-peephole.ll