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)
commitde89ecf1fc188da86e59979a90611f78d9fd0770
treed9c4fcf6c3e28429f807c9f55255c36bf0dff956
parente4778758731f906895d3857c6223fcae815dcb1b
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.

llvm-svn: 174431
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/func-argpassing.ll
llvm/test/CodeGen/X86/divide-by-constant.ll