llvm-6502/lib
Ulrich Weigand 86aef0a4f0 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
2012-11-05 19:39:45 +00:00
..
Analysis Don't infer whether a value is captured in the current function from the 2012-11-05 10:48:24 +00:00
Archive
AsmParser Change ForceSizeOpt attribute into MinSize attribute 2012-10-30 16:32:52 +00:00
Bitcode Move the Attributes::Builder outside of the Attributes class and into its own class named AttrBuilder. No functionality change. 2012-10-15 20:35:56 +00:00
CodeGen Be careful not to optimize a SELECT_CC into a SETCC post-legalization if the SETCC node would be illegal. 2012-11-03 00:17:26 +00:00
DebugInfo Reformat and 80-column this. It's not strictly conforming 2012-10-30 21:36:43 +00:00
ExecutionEngine Change resolveRelocation parameters so the relocations can find placeholder values in the original object buffer. 2012-11-02 19:45:23 +00:00
Linker
MC Add support for generating dwarf debugging info with assembly files 2012-11-01 17:31:35 +00:00
Object Add interface for querying object files for symbol values. 2012-10-29 10:47:00 +00:00
Support XLC supports the same atomic functions as GCC, use them. 2012-11-02 20:54:45 +00:00
TableGen Remove exception handling usage from tblgen. 2012-10-25 20:33:17 +00:00
Target On PowerPC64, integer return values (as well as arguments) are supposed 2012-11-05 19:39:45 +00:00
Transforms Generalize the transform that boosts GEP indices to the size of a pointer to 2012-11-03 11:44:17 +00:00
VMCore Include all the fields so we can correctly emit DW_TAG_structure_type for C++ structs. 2012-11-02 23:33:23 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile