[FastISel][AArch64] Emit immediate version of icmp (subs) for null pointer check.
authorJuergen Ributzka <juergen@apple.com>
Mon, 27 Oct 2014 19:58:36 +0000 (19:58 +0000)
committerJuergen Ributzka <juergen@apple.com>
Mon, 27 Oct 2014 19:58:36 +0000 (19:58 +0000)
commit52a6f59d41086b05b11b2ce86946a22f1dc5c5b4
tree9a1aba6a57cd577f23be2287618e426bb137f054
parente2995ff88f922cd9004ef6cae7b444b615808c0e
[FastISel][AArch64] Emit immediate version of icmp (subs) for null pointer check.

This is a minor change to use the immediate version when the operand is a null
value. This should get rid of an unnecessary 'mov' instruction in debug
builds and align the code more with the one generated by SelectionDAG.

This fixes rdar://problem/18785125.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220713 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64FastISel.cpp
test/CodeGen/AArch64/arm64-fast-isel-icmp.ll