diff options
author | Nadav Rotem <nadav.rotem@intel.com> | 2011-05-11 14:40:50 +0000 |
---|---|---|
committer | Nadav Rotem <nadav.rotem@intel.com> | 2011-05-11 14:40:50 +0000 |
commit | 8a7beb80f0168876967c2aaebb4829ee1560250c (patch) | |
tree | a0263871a18b8b4db82fc729b102b84994048b50 /llvm/lib | |
parent | cfc9efa43ed9ce8f4324bbefcdcaf33ac7d3b790 (diff) | |
download | bcm5719-llvm-8a7beb80f0168876967c2aaebb4829ee1560250c.tar.gz bcm5719-llvm-8a7beb80f0168876967c2aaebb4829ee1560250c.zip |
Fixes a bug in the DAGCombiner. LoadSDNodes have two values (data, chain).
If there is a store after the load node, then there is a chain, which means
that there is another user. Thus, asking hasOneUser would fail. Instead we
ask hasNUsesOfValue on the 'data' value.
llvm-svn: 131183
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 9a0afa9eee5..131e43cd1c4 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -6566,7 +6566,7 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) { } } - if (!LN0 || !LN0->hasOneUse() || LN0->isVolatile()) + if (!LN0 || !LN0->hasNUsesOfValue(1,0) || LN0->isVolatile()) return SDValue(); // If Idx was -1 above, Elt is going to be -1, so just return undef. |