[PATCH] D18336: Prevent construction of cycle in DAG store merge

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 25 09:08:59 PDT 2016


jyknight added inline comments.

================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9687
@@ -9685,3 +9686,3 @@
       continue;
-    if (N->hasPredecessorHelper(Use, Visited, Worklist))
+    if (Visited.count(Use))
       return false;
----------------
Missed this spot.

================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:11160
@@ +11159,3 @@
+  // in the DAG. Any store candidate may indirectly depend on another
+  // candidate indirectly through it's operand (we already consider
+  // dependencies through the chain). Check in parallel by searching
----------------
"indirectly" is in there twice.

================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:11162
@@ +11161,3 @@
+  // dependencies through the chain). Check in parallel by searching
+  // up from non-chain operands of candidates for a candidate.
+  SmallPtrSet<const SDNode *, 16> Visited;
----------------
redundant "candidate".

================
Comment at: test/CodeGen/AArch64/vector_merge_dep_check.ll:13
@@ +12,3 @@
+  %x = extractelement <2 x i64> %_p_vec_full, i32 1
+  store i64 %x, i64* %a, align 8, !alias.scope !4, !noalias !9
+  %_p_vec_full155 = load <2 x i64>, <2 x i64>* %argB, align 4, !alias.scope !1, !noalias !3
----------------
Still need to add comment about what the test is testing.


http://reviews.llvm.org/D18336





More information about the llvm-commits mailing list