[PATCH] D20852: [AMDGPU] Remove exit-on-error in test (PR27761)

Diana Picus via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 23 02:26:18 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL273550: [AMDGPU] Remove exit-on-error in test (PR27761) (authored by rovka).

Changed prior to commit:
  http://reviews.llvm.org/D20852?vs=59850&id=61653#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D20852

Files:
  llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  llvm/trunk/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp
  llvm/trunk/test/CodeGen/AMDGPU/dynamic_stackalloc.ll
  llvm/trunk/test/CodeGen/AMDGPU/private-memory-broken.ll
  llvm/trunk/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll

Index: llvm/trunk/test/CodeGen/AMDGPU/dynamic_stackalloc.ll
===================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/dynamic_stackalloc.ll
+++ llvm/trunk/test/CodeGen/AMDGPU/dynamic_stackalloc.ll
@@ -1,6 +1,6 @@
-; RUN: not llc -march=amdgcn -mcpu=tahiti -mattr=+promote-alloca -verify-machineinstrs -exit-on-error < %s 2>&1 | FileCheck %s
-; RUN: not llc -march=amdgcn -mcpu=tahiti -mattr=-promote-alloca -verify-machineinstrs -exit-on-error < %s 2>&1 | FileCheck %s
-; RUN: not llc -march=r600 -mcpu=cypress -exit-on-error < %s 2>&1 | FileCheck %s
+; RUN: not llc -march=amdgcn -mcpu=tahiti -mattr=+promote-alloca -verify-machineinstrs < %s 2>&1 | FileCheck %s
+; RUN: not llc -march=amdgcn -mcpu=tahiti -mattr=-promote-alloca -verify-machineinstrs < %s 2>&1 | FileCheck %s
+; RUN: not llc -march=r600 -mcpu=cypress < %s 2>&1 | FileCheck %s
 
 ; CHECK: in function test_dynamic_stackalloc{{.*}}: unsupported dynamic alloca
 
Index: llvm/trunk/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll
===================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll
+++ llvm/trunk/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll
@@ -1,4 +1,4 @@
-; RUN: not llc -march=amdgcn -exit-on-error < %s 2>&1 | FileCheck %s
+; RUN: not llc -march=amdgcn < %s 2>&1 | FileCheck %s
 
 ; Make sure that AMDGPUPromoteAlloca doesn't crash if the called
 ; function is a constantexpr cast of a function.
@@ -13,6 +13,7 @@
   ret void
 }
 
+; CHECK: in function crash_call_constexpr_cast{{.*}}: unsupported call to function foo.varargs
 define void @crash_call_constexpr_cast_varargs() #0 {
   %alloca = alloca i32
   call void bitcast (void (...)* @foo.varargs to void (i32*)*)(i32* %alloca) #0
Index: llvm/trunk/test/CodeGen/AMDGPU/private-memory-broken.ll
===================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/private-memory-broken.ll
+++ llvm/trunk/test/CodeGen/AMDGPU/private-memory-broken.ll
@@ -1,5 +1,5 @@
-; RUN: not llc -verify-machineinstrs -march=amdgcn -mcpu=SI -exit-on-error %s -o /dev/null 2>&1 | FileCheck %s
-; RUN: not llc -verify-machineinstrs -march=amdgcn -mcpu=tonga -exit-on-error %s -o /dev/null 2>&1 | FileCheck %s
+; RUN: not llc -verify-machineinstrs -march=amdgcn %s -o /dev/null 2>&1 | FileCheck %s
+; RUN: not llc -verify-machineinstrs -march=amdgcn -mcpu=tonga %s -o /dev/null 2>&1 | FileCheck %s
 
 ; Make sure promote alloca pass doesn't crash
 
Index: llvm/trunk/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp
@@ -103,7 +103,9 @@
   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;
Index: llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
@@ -690,7 +690,8 @@
   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,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20852.61653.patch
Type: text/x-patch
Size: 3705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160623/61cbce96/attachment.bin>


More information about the llvm-commits mailing list