aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-09-01 22:52:28 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-09-01 22:52:28 +0000
commit1453de5aa93c48779e1a5cdedec6e1493f6988eb (patch)
treedb68bb6648c20f5dcedce3f9624ef98c24588ca6 /lib
parentaca36b932958a7e4a27786dd76e37259fbaa67e0 (diff)
Oops. Bad typo. Without the check of N1.hasOneUse() bad things can happen.
Suppose the TokenFactor can reach the Op: [Load chain] ^ | [Load] ^ ^ | | / \- / | / [Op] / ^ ^ | .. | | / | [TokenFactor] | ^ | | | \ / \ / [Store] If we move the Load below the TokenFactor, we would have created a cycle in the DAG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86ISelDAGToDAG.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp
index 3322f8847a..c5ffb06fee 100644
--- a/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -308,8 +308,8 @@ void X86DAGToDAGISel::InstructionSelectPreprocess(SelectionDAG &DAG) {
SDOperand N1 = I->getOperand(1);
SDOperand N2 = I->getOperand(2);
- if (MVT::isFloatingPoint(N1.getValueType()) &&
- MVT::isVector(N1.getValueType()) &&
+ if (MVT::isFloatingPoint(N1.getValueType()) ||
+ MVT::isVector(N1.getValueType()) ||
!N1.hasOneUse())
continue;