[llvm] r175517 - R600: Fix scheduler crash caused by invalid MachinePointerInfo
Tom Stellard
thomas.stellard at amd.com
Tue Feb 19 07:22:44 PST 2013
Author: tstellar
Date: Tue Feb 19 09:22:44 2013
New Revision: 175517
URL: http://llvm.org/viewvc/llvm-project?rev=175517&view=rev
Log:
R600: Fix scheduler crash caused by invalid MachinePointerInfo
Kernel function arguments are lowered to loads from the PARAM_I address
space. When creating these load instructions, we were initializing
their MachinePointerInfo with an Arguement object that was not attached
to any function. This was causing the MachineScheduler to crash when
it tried to access the parent of the Arguement.
This has been fixed by initializing the MachinePointerInfo with a
UndefValue instead.
NOTE: This is a candidate for the Mesa stable branch.
Modified:
llvm/trunk/lib/Target/R600/R600ISelLowering.cpp
Modified: llvm/trunk/lib/Target/R600/R600ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/R600ISelLowering.cpp?rev=175517&r1=175516&r2=175517&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/R600ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/R600/R600ISelLowering.cpp Tue Feb 19 09:22:44 2013
@@ -1039,7 +1039,7 @@ SDValue R600TargetLowering::LowerFormalA
AMDGPUAS::PARAM_I_ADDRESS);
SDValue Arg = DAG.getExtLoad(ISD::ZEXTLOAD, DL, VT, DAG.getRoot(),
DAG.getConstant(ParamOffsetBytes, MVT::i32),
- MachinePointerInfo(new Argument(PtrTy)),
+ MachinePointerInfo(UndefValue::get(PtrTy)),
ArgVT, false, false, ArgBytes);
InVals.push_back(Arg);
ParamOffsetBytes += ArgBytes;
More information about the llvm-commits
mailing list