[DAGCombiner] don't group bswap with casts in logic hoisting fold
authorSanjay Patel <spatel@rotateright.com>
Thu, 6 Dec 2018 22:10:44 +0000 (22:10 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 6 Dec 2018 22:10:44 +0000 (22:10 +0000)
commit70af85b0accbe887604120776ad2e9a62340a64a
tree37e0f7f5466c07c88025e51715456a626bd35a23
parentb0b61955a10f4289cbdee6c11ef284fad04a6a70
[DAGCombiner] don't group bswap with casts in logic hoisting fold

This was probably organized as it was because bswap is a unary op.
But that's where the similarity to the other opcodes ends. We should
not limit this transform to scalars, and we should not try it if
either input has other uses. This is another step towards trying to
clean this whole function up to prevent it from causing infinite loops
and memory explosions.

Earlier commits in this series:
rL348501
rL348508
rL348518

llvm-svn: 348534
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/bswap-vector.ll