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 | 42febc6e9963f82d5c56c3c7e6afe5e00769af41 (patch) | |
tree | 831ef5f6559c00be76e73b0b5554a74c4efb533d /lib | |
parent | 104e99256d951674faadd865ed44ec698ede31ea (diff) | |
download | external_llvm-42febc6e9963f82d5c56c3c7e6afe5e00769af41.zip external_llvm-42febc6e9963f82d5c56c3c7e6afe5e00769af41.tar.gz external_llvm-42febc6e9963f82d5c56c3c7e6afe5e00769af41.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131183 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 9a0afa9..131e43c 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/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. |