Fix FastISel bug in boolean returns for PowerPC.
authorSamuel Antao <sfantao@us.ibm.com>
Wed, 17 Sep 2014 23:25:06 +0000 (23:25 +0000)
committerSamuel Antao <sfantao@us.ibm.com>
Wed, 17 Sep 2014 23:25:06 +0000 (23:25 +0000)
commit6693d0de3eddc1610a1077e9ce53fe2691dd9153
tree1b86fa088e246dbb31cab7baa8d9ebe2d1a9ea48
parent0c3b56bdab5730d003ef68ee53c89cd8a0ee6f3d
Fix FastISel bug in boolean returns for PowerPC.

For PPC targets, FastISel does not take the sign extension information into account when selecting return instructions whose operands are constants. A consequence of this is that the return of boolean values is not correct. This patch fixes the problem by evaluating the sign extension information also for constants, forwarding this information to PPCMaterializeInt which takes this information to drive the sign extension during the materialization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217993 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCFastISel.cpp
test/CodeGen/PowerPC/fast-isel-ret.ll