diff options
| author | Diana Picus <diana.picus@linaro.org> | 2016-06-23 09:19:16 +0000 |
|---|---|---|
| committer | Diana Picus <diana.picus@linaro.org> | 2016-06-23 09:19:16 +0000 |
| commit | e440f99913f9e3cb02331f95808cfe57f0b7836e (patch) | |
| tree | 373111f0115236b83c9faf8e7f4fcd511eb8779c /llvm/lib/Target/AMDGPU | |
| parent | 724e53029660c705441a405a254073c6d6ee9bc6 (diff) | |
| download | bcm5719-llvm-e440f99913f9e3cb02331f95808cfe57f0b7836e.tar.gz bcm5719-llvm-e440f99913f9e3cb02331f95808cfe57f0b7836e.zip | |
[AMDGPU] Remove exit-on-error in test (PR27761)
The exit-on-error flag was necessary in order to avoid an assertion when
handling DYNAMIC_STACKALLOC nodes in SelectionDAGLegalize.
We can avoid the assertion by creating some dummy nodes. This enables us to
remove the exit-on-error flag on the first 2 run lines (SI), but on the third
run line (R600) we would run into another assertion when trying to reserve
indirect registers. This patch also replaces that assertion with an early exit
from the function.
Fixes PR27761.
Differential Revision: http://reviews.llvm.org/D20852
llvm-svn: 273550
Diffstat (limited to 'llvm/lib/Target/AMDGPU')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp index 942346c6d8f..ddc86da742f 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp @@ -690,7 +690,8 @@ SDValue AMDGPUTargetLowering::LowerDYNAMIC_STACKALLOC(SDValue Op, DiagnosticInfoUnsupported NoDynamicAlloca(Fn, "unsupported dynamic alloca", SDLoc(Op).getDebugLoc()); DAG.getContext()->diagnose(NoDynamicAlloca); - return SDValue(); + auto Ops = {DAG.getConstant(0, SDLoc(), Op.getValueType()), Op.getOperand(0)}; + return DAG.getMergeValues(Ops, SDLoc()); } SDValue AMDGPUTargetLowering::LowerOperation(SDValue Op, diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp index 0fe3b6845f4..60dba1a063a 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp @@ -103,7 +103,9 @@ int AMDGPUInstrInfo::getIndirectIndexEnd(const MachineFunction &MF) const { const MachineFrameInfo *MFI = MF.getFrameInfo(); // Variable sized objects are not supported - assert(!MFI->hasVarSizedObjects()); + if (MFI->hasVarSizedObjects()) { + return -1; + } if (MFI->getNumObjects() == 0) { return -1; |

