[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)
commite8d0c4cceaab3f002ee4996c98848e2c21938492
tree6645ac658d30a8c6b0286fed932e34e904195bb5
parent77b16b78e9c94ab47552d60f31c479ef1b212f2e
[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.

llvm-svn: 236569
llvm/lib/Target/ARM/ARMFastISel.cpp
llvm/test/CodeGen/ARM/fast-isel-select.ll