[FastISel][AArch64] Fix the immediate versions of the {s|u}{add|sub}.with.overflow...
authorJuergen Ributzka <juergen@apple.com>
Fri, 1 Aug 2014 01:25:55 +0000 (01:25 +0000)
committerJuergen Ributzka <juergen@apple.com>
Fri, 1 Aug 2014 01:25:55 +0000 (01:25 +0000)
commit74ac16386b945dd7ef0faee7a2fc5a08e4f7e6f1
treeba585d510473f0e1bf676c9c3944b68a4b2412c6
parentbcaf5e176a847092f1e56408d402a81584b43f9b
[FastISel][AArch64] Fix the immediate versions of the {s|u}{add|sub}.with.overflow intrinsics.

ADDS and SUBS cannot encode negative immediates or immediates larger than 12bit.
This fix checks if the immediate version can be used under this constraints and
if we can convert ADDS to SUBS or vice versa to support negative immediates.

Also update the test cases to test the immediate versions.

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