[llvm-branch-commits] [llvm-branch] r251177 - Merging r249718:

Alexei Starovoitov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Oct 23 19:03:23 PDT 2015


Author: ast
Date: Fri Oct 23 21:02:55 2015
New Revision: 251177

URL: http://llvm.org/viewvc/llvm-project?rev=251177&view=rev
Log:
Merging r249718:
------------------------------------------------------------------------
r249718 | ast | 2015-10-08 11:52:40 -0700 (Thu, 08 Oct 2015) | 16 lines

[bpf] Do not expand UNDEF SDNode during insn selection lowering

  o Before this patch, BPF backend will expand UNDEF node
    to i64 constant 0.
  o For second pass of dag combiner, legalizer will run through
    each to-be-processed dag node.
  o If any new SDNode is generated and has an undef operand,
    dag combiner will put undef node, newly-generated constant-0 node,
    and any node which uses these nodes in the working list.
  o During this process, it is possible undef operand is
    generated again, and this will form an infinite loop
    for dag combiner pass2.
  o This patch allows UNDEF to be a legal type.

Signed-off-by: Yonghong Song <yhs at plumgrid.com>
Signed-off-by: Alexei Starovoitov <ast at plumgrid.com>
------------------------------------------------------------------------

Added:
    llvm/branches/release_37/test/CodeGen/BPF/undef.ll
      - copied unchanged from r249718, llvm/trunk/test/CodeGen/BPF/undef.ll
Modified:
    llvm/branches/release_37/   (props changed)
    llvm/branches/release_37/lib/Target/BPF/BPFISelDAGToDAG.cpp
    llvm/branches/release_37/lib/Target/BPF/BPFISelLowering.cpp
    llvm/branches/release_37/test/CodeGen/BPF/sockex2.ll

Propchange: llvm/branches/release_37/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 23 21:02:55 2015
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,242236,242239,242281,242288,242296,242331,242341,242372,242410,242412,242433-242434,242442,242543,242673,242680,242706,242721-242722,242733-242735,242742,242869,242919,242993,243001,243057,243116,243263,243294,243361,243469,243485,243500,243519,243531,243589,243609,243636,243638-243640,243745,243891,243898,243927,243932,243934,243984,243986,243999,244058,244123,244232,244332,244418,244448,244554,244644,244659,244676,244789,244889,245064,245105,245119,245256,245355,245365,245369,245394-245395,245530,245535,245902,247372,247951,249371
+/llvm/trunk:155241,242236,242239,242281,242288,242296,242331,242341,242372,242410,242412,242433-242434,242442,242543,242673,242680,242706,242721-242722,242733-242735,242742,242869,242919,242993,243001,243057,243116,243263,243294,243361,243469,243485,243500,243519,243531,243589,243609,243636,243638-243640,243745,243891,243898,243927,243932,243934,243984,243986,243999,244058,244123,244232,244332,244418,244448,244554,244644,244659,244676,244789,244889,245064,245105,245119,245256,245355,245365,245369,245394-245395,245530,245535,245902,247372,247951,249371,249718

Modified: llvm/branches/release_37/lib/Target/BPF/BPFISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_37/lib/Target/BPF/BPFISelDAGToDAG.cpp?rev=251177&r1=251176&r2=251177&view=diff
==============================================================================
--- llvm/branches/release_37/lib/Target/BPF/BPFISelDAGToDAG.cpp (original)
+++ llvm/branches/release_37/lib/Target/BPF/BPFISelDAGToDAG.cpp Fri Oct 23 21:02:55 2015
@@ -130,13 +130,6 @@ SDNode *BPFDAGToDAGISel::Select(SDNode *
   // tablegen selection should be handled here.
   switch (Opcode) {
   default: break;
-
-  case ISD::UNDEF: {
-    errs() << "BUG: "; Node->dump(CurDAG); errs() << '\n';
-    report_fatal_error("shouldn't see UNDEF during Select");
-    break;
-  }
-
   case ISD::INTRINSIC_W_CHAIN: {
     unsigned IntNo = cast<ConstantSDNode>(Node->getOperand(1))->getZExtValue();
     switch (IntNo) {

Modified: llvm/branches/release_37/lib/Target/BPF/BPFISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_37/lib/Target/BPF/BPFISelLowering.cpp?rev=251177&r1=251176&r2=251177&view=diff
==============================================================================
--- llvm/branches/release_37/lib/Target/BPF/BPFISelLowering.cpp (original)
+++ llvm/branches/release_37/lib/Target/BPF/BPFISelLowering.cpp Fri Oct 23 21:02:55 2015
@@ -129,9 +129,6 @@ BPFTargetLowering::BPFTargetLowering(con
   setOperationAction(ISD::SUBC, MVT::i64, Expand);
   setOperationAction(ISD::SUBE, MVT::i64, Expand);
 
-  // no UNDEF allowed
-  setOperationAction(ISD::UNDEF, MVT::i64, Expand);
-
   setOperationAction(ISD::ROTR, MVT::i64, Expand);
   setOperationAction(ISD::ROTL, MVT::i64, Expand);
   setOperationAction(ISD::SHL_PARTS, MVT::i64, Expand);

Modified: llvm/branches/release_37/test/CodeGen/BPF/sockex2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_37/test/CodeGen/BPF/sockex2.ll?rev=251177&r1=251176&r2=251177&view=diff
==============================================================================
--- llvm/branches/release_37/test/CodeGen/BPF/sockex2.ll (original)
+++ llvm/branches/release_37/test/CodeGen/BPF/sockex2.ll Fri Oct 23 21:02:55 2015
@@ -311,7 +311,7 @@ flow_dissector.exit.thread:
 ; CHECK-LABEL: bpf_prog2:
 ; CHECK: ldabs_h r0, r6.data + 12 # encoding: [0x28,0x00,0x00,0x00,0x0c,0x00,0x00,0x00]
 ; CHECK: ldabs_h r0, r6.data + 16 # encoding: [0x28,0x00,0x00,0x00,0x10,0x00,0x00,0x00]
-; CHECK-NOT: implicit
+; CHECK: implicit-def: R
 ; CHECK: ld_64   r1
 ; CHECK-NOT: ori
 ; CHECK: call 1 # encoding: [0x85,0x00,0x00,0x00,0x01,0x00,0x00,0x00]




More information about the llvm-branch-commits mailing list