OSDN Git Service

[SelectionDAGBuilder] Make sure DemoteReg ends up in right reg-class.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Wed, 18 Nov 2015 14:59:00 +0000 (14:59 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Wed, 18 Nov 2015 14:59:00 +0000 (14:59 +0000)
commit0e8fc1e8d290452a404f9ad31b2a159fa7a363af
treeaf67904b70fbbfe5c65ff41f1b6f1af474bf673c
parenta90859a6e3751e2289c44b57723658bf8962dcc5
[SelectionDAGBuilder] Make sure DemoteReg ends up in right reg-class.

The virtual register containing the address for returned value on
stack should in the DAG be represented with a CopyFromReg node and not
a Register node. Otherwise, InstrEmitter will not make sure that it
ends up in the right register class for the target instruction.

SystemZ needs this, becuause the reg class for address registers is a
subset of the general 64 bit register class.

test/SystemZ/CodeGen/args-07.ll and args-04.ll updated to run with
-verify-machineinstrs.

Reviewed by Hal Finkel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253461 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/SystemZ/args-04.ll
test/CodeGen/SystemZ/args-07.ll