[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp

Evan Cheng evan.cheng at apple.com
Fri Sep 1 15:52:42 PDT 2006



Changes in directory llvm/lib/Target/X86:

X86ISelDAGToDAG.cpp updated: 1.103 -> 1.104
---
Log message:

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.


---
Diffs of the changes:  (+2 -2)

 X86ISelDAGToDAG.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.103 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.104
--- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.103	Tue Aug 29 16:42:58 2006
+++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp	Fri Sep  1 17:52:28 2006
@@ -308,8 +308,8 @@
 
     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;
 






More information about the llvm-commits mailing list