OSDN Git Service

When doing the very-late shift-and address-mode optimization,
authorDan Gohman <gohman@apple.com>
Mon, 13 Oct 2008 20:52:04 +0000 (20:52 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 13 Oct 2008 20:52:04 +0000 (20:52 +0000)
commit7b8e96401ca2859d0c9fd4962c3e3da9973eb443
tree753056b1874778354f0e7bd4b871f71344e07d67
parentb82eb06faf5c67bc906d10d5f36c3727f3806d05
When doing the very-late shift-and address-mode optimization,
create a new DAG node to represent the new shift to keep the
DAG consistent, even though it'll almost always be folded into
the address.

If a user of the resulting address has multiple uses, the
nodes may get revisited by a later MatchAddress call, in which
case DAG inconsistencies do matter.

This fixes PR2849.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57465 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp
test/CodeGen/X86/pr2849.ll [new file with mode: 0644]