Oops. Bad typo. Without the check of N1.hasOneUse() bad things can happen.
authorEvan Cheng <evan.cheng@apple.com>
Fri, 1 Sep 2006 22:52:28 +0000 (22:52 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 1 Sep 2006 22:52:28 +0000 (22:52 +0000)
commit1453de5aa93c48779e1a5cdedec6e1493f6988eb
treedb68bb6648c20f5dcedce3f9624ef98c24588ca6
parentaca36b932958a7e4a27786dd76e37259fbaa67e0
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
lib/Target/X86/X86ISelDAGToDAG.cpp