[DAGCombiner] Generalize masking of constant rotates.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 24 Oct 2015 18:44:52 +0000 (18:44 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 24 Oct 2015 18:44:52 +0000 (18:44 +0000)
commit2bc87a6f42016238e4068afba576fe7678d182f0
tree0676b7fae242ccb239bfb886cfa4c71e952a2ac1
parent75af6938b24f1fd6c2db9f52d5b1fdc3164dcfc2
[DAGCombiner] Generalize masking of constant rotates.

We don't need a mask of a rotation result to be a constant splat - any constant scalar/vector can be usefully folded.

Followup to D13851.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251197 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/vector-rotate-128.ll
test/CodeGen/X86/vector-rotate-256.ll