diff options
author | Pete Cooper <peter_cooper@apple.com> | 2012-02-13 00:10:03 +0000 |
---|---|---|
committer | Pete Cooper <peter_cooper@apple.com> | 2012-02-13 00:10:03 +0000 |
commit | ce3900849a3b5d43d27ad0fa4d94ff6c12afc9f0 (patch) | |
tree | 24d28f8b3426004f5b9908d614e296b6d474c61e /lib/Target/X86/X86ISelDAGToDAG.cpp | |
parent | 2ee746b87d9471d2dc024827cacdc46114ed3708 (diff) | |
download | external_llvm-ce3900849a3b5d43d27ad0fa4d94ff6c12afc9f0.zip external_llvm-ce3900849a3b5d43d27ad0fa4d94ff6c12afc9f0.tar.gz external_llvm-ce3900849a3b5d43d27ad0fa4d94ff6c12afc9f0.tar.bz2 |
Fixed bug when custom lowering DEC64m on x86.
If the DEC node had more than one user, it was doing this lowering but
leaving the original DEC node around and so decrementing twice.
Fixes PR11964.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86ISelDAGToDAG.cpp')
-rw-r--r-- | lib/Target/X86/X86ISelDAGToDAG.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index 830cb65..709be5f 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -2378,6 +2378,7 @@ SDNode *X86DAGToDAGISel::Select(SDNode *Node) { Chain->getOpcode() != ISD::LOAD || StoredVal->getOpcode() != X86ISD::DEC || StoredVal.getResNo() != 0 || + !StoredVal.getNode()->hasNUsesOfValue(1, 0) || StoredVal->getOperand(0).getNode() != Chain.getNode()) break; |