aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-01-01 00:50:32 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-01-01 00:50:32 +0100
commitd235d09b7c86a2955bebdcb1991cd21758bcc21b (patch)
treee41ca71ae9127a80fbb1b4670ce2d762e50ef7a1 /gcc/expmed.c
parent1f01b45746bba314752b035821f4fca9dea21f78 (diff)
downloadgcc-d235d09b7c86a2955bebdcb1991cd21758bcc21b.zip
gcc-d235d09b7c86a2955bebdcb1991cd21758bcc21b.tar.gz
gcc-d235d09b7c86a2955bebdcb1991cd21758bcc21b.tar.bz2
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: r256051
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 6b22946..55bb353 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -2490,9 +2490,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;