[ARM][FastISel] Use TST #1 instead of CMP #0 for select.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Wed, 6 May 2015 04:14:02 +0000 (04:14 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Wed, 6 May 2015 04:14:02 +0000 (04:14 +0000)
commitcaa560cfb9178526bcc13a9b51f5fefa23a0e84a
treeb0f8eff1fa6d36ccf55e4281556497667e40770c
parent5a8a366ddfc809a27e80a142aeb890ae0c835217
[ARM][FastISel] Use TST #1 instead of CMP #0 for select.

Since r234249, i1 are sext instead of zext; because of that, doing
"CMP rN, #0; IT EQ/NE" isn't correct anymore.

"TST #1" is the conservatively correct alternative - the tradeoff being
that it doesn't have a 16-bit encoding -, so use that instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236569 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMFastISel.cpp
test/CodeGen/ARM/fast-isel-select.ll