[DAGCombiner] don't hoist logic op if operands have other uses, part 2
authorSanjay Patel <spatel@rotateright.com>
Thu, 6 Dec 2018 19:18:56 +0000 (19:18 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 6 Dec 2018 19:18:56 +0000 (19:18 +0000)
commitbfc7ffa40ffc570f54e2b4462dc6aae38da1a85a
tree682481297bd20b36ecb6167ff18de501ccbebfbb
parent845d5a0aa836e91be70802b6c6e5bc72b9585b2f
[DAGCombiner] don't hoist logic op if operands have other uses, part 2

The PPC test with 2 extra uses seems clearly better by avoiding this transform.
With 1 extra use, we also prevent an extra register move (although that might
be an RA problem). The general rule should be to only make a change here if
it is always profitable. The x86 diffs are all neutral.

llvm-svn: 348518
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/PowerPC/hoist-logic.ll
llvm/test/CodeGen/X86/packss.ll
llvm/test/CodeGen/X86/vector-shift-ashr-128.ll
llvm/test/CodeGen/X86/vector-shift-ashr-256.ll
llvm/test/CodeGen/X86/vector-shift-ashr-sub128.ll