re PR middle-end/83623 (ICE: in convert_move, at expr.c:248 with -march=knl and 16bit vector bswap/rotate)

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.

	* gcc.dg/pr83623.c: New test.

From-SVN: r256061
This commit is contained in:
Jakub Jelinek 2018-01-01 12:27:17 +01:00 committed by Jakub Jelinek
parent dc9fa14196
commit f0b9bc3434
4 changed files with 26 additions and 3 deletions

View File

@ -1,3 +1,10 @@
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-23 Jakub Jelinek <jakub@redhat.com>
PR c++/83553

View File

@ -2331,9 +2331,8 @@ expand_shift_1 (enum tree_code code, machine_mode mode, rtx shifted,
&& 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;

View File

@ -1,3 +1,8 @@
2018-01-01 Jakub Jelinek <jakub@redhat.com>
PR middle-end/83623
* gcc.dg/pr83623.c: New test.
2017-12-28 Steven G. Kargl <kargl@gcc.gnu.org>
PR Fortran/83548

View File

@ -0,0 +1,12 @@
/* 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;
}