File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
llvm/include/llvm/CodeGen Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -870,6 +870,12 @@ END_TWO_BYTE_PACK()
870870 SmallVectorImpl<const SDNode *> &Worklist,
871871 unsigned int MaxSteps = 0 ,
872872 bool TopologicalPrune = false ) {
873+ // NOTE(TimNN): I'm not confident that the in-progress D53106 actually
874+ // handles the topological ordering correctly, so I'm disabling
875+ // this performance optimization until the upstream patch has
876+ // been accepted.
877+ TopologicalPrune = false ;
878+
873879 SmallVector<const SDNode *, 8 > DeferredNodes;
874880 if (Visited.count (N))
875881 return true ;
@@ -901,6 +907,14 @@ END_TWO_BYTE_PACK()
901907 }
902908 for (const SDValue &OpV : M->op_values ()) {
903909 SDNode *Op = OpV.getNode ();
910+ // If we are adding a glued node, its glued user should be considered a
911+ // predecessor as well to prevent a node merge causing a non-immediate
912+ // use of a glue operand. Walk down all unvisited glue users.
913+ while (auto *GN = Op->getGluedUser ()) {
914+ if ((GN == M) || Visited.count (GN))
915+ break ;
916+ Op = GN;
917+ }
904918 if (Visited.insert (Op).second )
905919 Worklist.push_back (Op);
906920 if (Op == N)
You can’t perform that action at this time.
0 commit comments