[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)
commit82ecc7ff2a206068be74559134755e036ca9481e
tree33506c910194f476602057019aa2c6ac55278d83
parent3604bf7fe7a263b9a4f1fbfc284fb205f2a5de33
[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.

llvm-svn: 214470
llvm/lib/Target/AArch64/AArch64FastISel.cpp
llvm/test/CodeGen/AArch64/arm64-xaluo.ll