Changes in directory llvm/lib/CodeGen/SelectionDAG:
DAGCombiner.cpp updated: 1.202 -> 1.203
---
Log message:
Chain can be any operand
---
Diffs of the changes: (+9 -11)
DAGCombiner.cpp | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.202
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.203
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.202 Tue Sep 26 03:14:06 2006
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Sep 26 04:32:41 2006
@@ -3956,17 +3956,15 @@
/// hasChainUsers - Returns true if one of the users of a load node has the
/// chain result as an operand.
bool DAGCombiner::hasChainUsers(SDNode *Load) {
- // Don't even bother if the load only has one user (conservatively the
value.)
- if (!Load->hasOneUse()) {
- SDOperand Chain(Load, 1); // The load's chain result.
-
- // For each user of the load.
- for (SDNode::use_iterator UI = Load->use_begin(), UE = Load->use_end();
- UI != UE; ++UI) {
-
- // Chain will be the first operand.
- if ((*UI)->getOperand(0) == Chain)
- return true;
+ SDOperand Chain(Load, 1); // The load's chain result.
+
+ // For each user of the load.
+ for (SDNode::use_iterator UI = Load->use_begin(), UE = Load->use_end();
+ UI != UE; ++UI) {
+ const SDNode *User = *UI;
+
+ for (unsigned i = 0, e = User->getNumOperands(); i != e; ++i) {
+ if (User->getOperand(i) == Chain) return true;
}
}
_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits