[llvm-branch-commits] [llvm-branch] r155672 - in /llvm/branches/release_31: ./ lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp test/CodeGen/X86/2012-04-26-sdglue.ll

Bill Wendling isanbard at gmail.com
Thu Apr 26 16:04:56 PDT 2012


Author: void
Date: Thu Apr 26 18:04:56 2012
New Revision: 155672

URL: http://llvm.org/viewvc/llvm-project?rev=155672&view=rev
Log:
Merging r155668:
------------------------------------------------------------------------
r155668 | atrick | 2012-04-26 14:48:25 -0700 (Thu, 26 Apr 2012) | 8 lines

Fix the SD scheduler to avoid gluing the same node twice.

DAGCombine strangeness may result in multiple loads from the same
offset. They both may try to glue themselves to another load. We could
insist that the redundant loads glue themselves to each other, but the
beter fix is to bail out from bad gluing at the time we detect it.

Fixes rdar://11314175: BuildSchedUnits assert.
------------------------------------------------------------------------

Added:
    llvm/branches/release_31/test/CodeGen/X86/2012-04-26-sdglue.ll
      - copied unchanged from r155668, llvm/trunk/test/CodeGen/X86/2012-04-26-sdglue.ll
Modified:
    llvm/branches/release_31/   (props changed)
    llvm/branches/release_31/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp

Propchange: llvm/branches/release_31/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Apr 26 18:04:56 2012
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155230,155284-155288,155307,155342,155466,155536
+/llvm/trunk:155230,155284-155288,155307,155342,155466,155536,155668

Modified: llvm/branches/release_31/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_31/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp?rev=155672&r1=155671&r2=155672&view=diff
==============================================================================
--- llvm/branches/release_31/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp (original)
+++ llvm/branches/release_31/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Thu Apr 26 18:04:56 2012
@@ -138,9 +138,11 @@
   // Don't add glue from a node to itself.
   if (GlueDestNode == N) return;
 
-  // Don't add glue to something which already has glue.
-  if (N->getValueType(N->getNumValues() - 1) == MVT::Glue) return;
-
+  // Don't add glue to something that already has it, either as a use or value.
+  if (N->getOperand(N->getNumOperands()-1).getValueType() == MVT::Glue ||
+      N->getValueType(N->getNumValues() - 1) == MVT::Glue) {
+    return;
+  }
   for (unsigned I = 0, E = N->getNumValues(); I != E; ++I)
     VTs.push_back(N->getValueType(I));
 





More information about the llvm-branch-commits mailing list