+2018-01-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/83623
+ * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
+ check for bswap in mode rather than HImode and use that in expand_unop
+ too.
+
2017-12-31 Jakub Jelinek <jakub@redhat.com>
PR target/83536
&& CONST_INT_P (op1)
&& INTVAL (op1) == BITS_PER_UNIT
&& GET_MODE_SIZE (scalar_mode) == 2
- && optab_handler (bswap_optab, HImode) != CODE_FOR_nothing)
- return expand_unop (HImode, bswap_optab, shifted, NULL_RTX,
- unsignedp);
+ && optab_handler (bswap_optab, mode) != CODE_FOR_nothing)
+ return expand_unop (mode, bswap_optab, shifted, NULL_RTX, unsignedp);
if (op1 == const0_rtx)
return shifted;
2018-01-01 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/83623
+ * gcc.dg/pr83623.c: New test.
+
* gcc.target/i386/i386.exp
(check_effective_target_avx512vpopcntdqvl): New proc.
* gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c: Use
--- /dev/null
+/* PR middle-end/83623 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-mmovbe" { target i?86-*-* x86_64-*-* } } */
+
+unsigned short __attribute__ ((__vector_size__ (16))) x;
+
+void
+foo (void)
+{
+ x = x << 8 | x >> 8;
+}