https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57233
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Mon Jun 30 16:56:01 2014 New Revision: 212158 URL: https://gcc.gnu.org/viewcvs?rev=212158&root=gcc&view=rev Log: 2014-06-30 Jakub Jelinek <ja...@redhat.com> Backported from mainline 2014-06-27 Jakub Jelinek <ja...@redhat.com> PR tree-optimization/57233 PR tree-optimization/61299 * tree-vect-generic.c (get_compute_type, count_type_subparts): New functions. (expand_vector_operations_1): Use them. If {L,R}ROTATE_EXPR would be lowered to scalar shifts, check if corresponding shifts and vector BIT_IOR_EXPR are supported and don't lower or lower just to narrower vector type in that case. * expmed.c (expand_shift_1): Fix up handling of vector shifts and rotates. * gcc.dg/pr57233.c: New test. * gcc.target/i386/pr57233.c: New test. * gcc.target/i386/sse2-pr57233.c: New test. * gcc.target/i386/avx-pr57233.c: New test. * gcc.target/i386/avx2-pr57233.c: New test. * gcc.target/i386/avx512f-pr57233.c: New test. * gcc.target/i386/xop-pr57233.c: New test. Added: branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr57233.c branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/avx-pr57233.c branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/avx2-pr57233.c branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/avx512f-pr57233.c branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/pr57233.c branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/sse2-pr57233.c branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/xop-pr57233.c Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/expmed.c branches/gcc-4_9-branch/gcc/testsuite/ChangeLog branches/gcc-4_9-branch/gcc/tree-vect-generic.c