summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2012-11-05 19:39:45 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2012-11-05 19:39:45 +0000
commit86aef0a4f093700420c76f313e5668c39db110aa (patch)
tree8a242bf9b03cac7d41ffe6a208f70dc6f7815905 /lib/ExecutionEngine
parente623702c22e7cee4e02332b245a417a88ae6ffff (diff)
downloadllvm-86aef0a4f093700420c76f313e5668c39db110aa.tar.gz
llvm-86aef0a4f093700420c76f313e5668c39db110aa.tar.bz2
llvm-86aef0a4f093700420c76f313e5668c39db110aa.tar.xz
On PowerPC64, integer return values (as well as arguments) are supposed
to be extended to a full register. This is modeled in the IR by marking the return value (or argument) with a signext or zeroext attribute. However, while these attributes are respected for function arguments, they are currently ignored for function return values by the PowerPC back-end. This patch updates PPCCallingConv.td to ask for the promotion to i64, and fixes LowerReturn and LowerCallResult to implement it. The new test case verifies that both arguments and return values are properly extended when passing them; and also that the optimizers understand incoming argument and return values are in fact guaranteed by the ABI to be extended. The patch caused a spurious breakage in CodeGen/PowerPC/coalesce-ext.ll, since the test case used a "ret" instruction to create a use of an i32 value at the end of the function (to set up data flow as required for what the test is intended to test). Since there's now an implicit promotion to i64, that data flow no longer works as expected. To fix this, this patch now adds an extra "add" to ensure we have an appropriate use of the i32 value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167396 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
0 files changed, 0 insertions, 0 deletions