[llvm] r271200 - [BPF] Remove exit-on-error from tests (PR27768, PR27769)
Diana Picus via llvm-commits
llvm-commits at lists.llvm.org
Mon May 30 01:28:36 PDT 2016
Author: rovka
Date: Mon May 30 03:28:34 2016
New Revision: 271200
URL: http://llvm.org/viewvc/llvm-project?rev=271200&view=rev
Log:
[BPF] Remove exit-on-error from tests (PR27768, PR27769)
The exit-on-error flag is necessary to avoid some assertions/unreachables. We
can get past them by creating a few dummy nodes.
Fixes PR27768, PR27769.
Differential Revision: http://reviews.llvm.org/D20726
Modified:
llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp
llvm/trunk/test/CodeGen/BPF/struct_ret1.ll
llvm/trunk/test/CodeGen/BPF/struct_ret2.ll
Modified: llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp?rev=271200&r1=271199&r2=271200&view=diff
==============================================================================
--- llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp Mon May 30 03:28:34 2016
@@ -346,6 +346,7 @@ BPFTargetLowering::LowerReturn(SDValue C
const SmallVectorImpl<ISD::OutputArg> &Outs,
const SmallVectorImpl<SDValue> &OutVals,
SDLoc DL, SelectionDAG &DAG) const {
+ unsigned Opc = BPFISD::RET_FLAG;
// CCValAssign - represent the assignment of the return value to a location
SmallVector<CCValAssign, 16> RVLocs;
@@ -356,6 +357,7 @@ BPFTargetLowering::LowerReturn(SDValue C
if (MF.getFunction()->getReturnType()->isAggregateType()) {
fail(DL, DAG, "only integer returns supported");
+ return DAG.getNode(Opc, DL, MVT::Other, Chain);
}
// Analize return values.
@@ -377,7 +379,6 @@ BPFTargetLowering::LowerReturn(SDValue C
RetOps.push_back(DAG.getRegister(VA.getLocReg(), VA.getLocVT()));
}
- unsigned Opc = BPFISD::RET_FLAG;
RetOps[0] = Chain; // Update chain.
// Add the flag if we have it.
@@ -399,6 +400,9 @@ SDValue BPFTargetLowering::LowerCallResu
if (Ins.size() >= 2) {
fail(DL, DAG, "only small returns supported");
+ for (unsigned i = 0, e = Ins.size(); i != e; ++i)
+ InVals.push_back(DAG.getConstant(0, DL, Ins[i].VT));
+ return DAG.getCopyFromReg(Chain, DL, 1, Ins[0].VT, InFlag).getValue(1);
}
CCInfo.AnalyzeCallResult(Ins, RetCC_BPF64);
Modified: llvm/trunk/test/CodeGen/BPF/struct_ret1.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/BPF/struct_ret1.ll?rev=271200&r1=271199&r2=271200&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/BPF/struct_ret1.ll (original)
+++ llvm/trunk/test/CodeGen/BPF/struct_ret1.ll Mon May 30 03:28:34 2016
@@ -1,4 +1,4 @@
-; RUN: not llc -march=bpf -exit-on-error < %s 2> %t1
+; RUN: not llc -march=bpf < %s 2> %t1
; RUN: FileCheck %s < %t1
; CHECK: only integer returns
Modified: llvm/trunk/test/CodeGen/BPF/struct_ret2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/BPF/struct_ret2.ll?rev=271200&r1=271199&r2=271200&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/BPF/struct_ret2.ll (original)
+++ llvm/trunk/test/CodeGen/BPF/struct_ret2.ll Mon May 30 03:28:34 2016
@@ -1,4 +1,4 @@
-; RUN: not llc -march=bpf -exit-on-error < %s 2> %t1
+; RUN: not llc -march=bpf < %s 2> %t1
; RUN: FileCheck %s < %t1
; CHECK: only small returns
More information about the llvm-commits
mailing list