[llvm] r182084 - R600/SI: return undef instead of null for skipped arguments
Christian Konig
christian.koenig at amd.com
Fri May 17 02:46:48 PDT 2013
Author: ckoenig
Date: Fri May 17 04:46:48 2013
New Revision: 182084
URL: http://llvm.org/viewvc/llvm-project?rev=182084&view=rev
Log:
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 at amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
Tested-by: Michel Dänzer <michel.daenzer at amd.com>
Modified:
llvm/trunk/lib/Target/R600/SIISelLowering.cpp
Modified: llvm/trunk/lib/Target/R600/SIISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIISelLowering.cpp?rev=182084&r1=182083&r2=182084&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/R600/SIISelLowering.cpp Fri May 17 04:46:48 2013
@@ -156,8 +156,9 @@ SDValue SITargetLowering::LowerFormalArg
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::LowerFormalArg
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
More information about the llvm-commits
mailing list