Reapply r174343, with a fix for a scary DAG combine bug where it failed to differenti...
authorOwen Anderson <resistor@mac.com>
Tue, 5 Feb 2013 19:24:39 +0000 (19:24 +0000)
committerOwen Anderson <resistor@mac.com>
Tue, 5 Feb 2013 19:24:39 +0000 (19:24 +0000)
commitb48783b09127136c98cc6b0399be757728504e56
tree0e3e86866d7f05fece712e87d5f9d905a844a52f
parent1018fa256d5b5a134c06dac76d1d285e04562187
Reapply r174343, with a fix for a scary DAG combine bug where it failed to differentiate between the alignment of the
base point of a load, and the overall alignment of the load.  This caused infinite loops in DAG combine with the
original application of this patch.

ORIGINAL COMMIT LOG:
When the target-independent DAGCombiner inferred a higher alignment for a load,
it would replace the load with one with the higher alignment.  However, it did
not place the new load in the worklist, which prevented later DAG combines in
the same phase (for example, target-specific combines) from ever seeing it.

This patch corrects that oversight, and updates some tests whose output changed
due to slightly different DAGCombine outputs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174431 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/AArch64/func-argpassing.ll
test/CodeGen/X86/divide-by-constant.ll