R600/SI: return undef instead of null for skipped arguments

This is a candidate for the stable branch.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=64694

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 182084
This commit is contained in:
Christian Konig 2013-05-17 09:46:48 +00:00
parent 35de14540f
commit b7be72df5b
1 changed files with 2 additions and 2 deletions

View File

@ -156,8 +156,9 @@ SDValue SITargetLowering::LowerFormalArguments(
for (unsigned i = 0, e = Ins.size(), ArgIdx = 0; i != e; ++i) {
const ISD::InputArg &Arg = Ins[i];
if (Skipped & (1 << i)) {
InVals.push_back(SDValue());
InVals.push_back(DAG.getUNDEF(Arg.VT));
continue;
}
@ -181,7 +182,6 @@ SDValue SITargetLowering::LowerFormalArguments(
Reg = MF.addLiveIn(Reg, RC);
SDValue Val = DAG.getCopyFromReg(Chain, DL, Reg, VT);
const ISD::InputArg &Arg = Ins[i];
if (Arg.VT.isVector()) {
// Build a vector from the registers