ARM: optimization for sub+abs.
authorManman Ren <mren@apple.com>
Fri, 15 Jun 2012 21:32:12 +0000 (21:32 +0000)
committerManman Ren <mren@apple.com>
Fri, 15 Jun 2012 21:32:12 +0000 (21:32 +0000)
commit307473dec0e2fa966037d04725a40b33669dddc8
treebf59f915327ca87811406874fc88a9a46b692f9e
parent695fd1a4555aae6cef9292d0d39967a949ea8782
ARM: optimization for sub+abs.

This patch will optimize abs(x-y)
FROM
sub, movs, rsbmi
TO
subs, rsbmi

For abs, we will use cmp instead of movs. This is necessary because we already
have an existing peephole pass which optimizes away cmp following sub.

rdar: 11633193

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158551 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/iabs.ll
test/CodeGen/ARM/thumb2-it-block.ll