From 66b3ed5f3da50ca525401c340279f76679bd2c87 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 4 Feb 2014 10:36:18 +0100 Subject: re PR middle-end/59261 (FAIL: gcc.dg/vect/bb-slp-26.c -flto -ffat-lto-objects (internal compiler error)) PR middle-end/59261 * expmed.c (expand_mult): For MODE_VECTOR_INT multiplication if there is no vashl3 or ashl3 insn, skip_synth. * gcc.dg/pr59261.c: New test. From-SVN: r207456 --- gcc/expmed.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/expmed.c') diff --git a/gcc/expmed.c b/gcc/expmed.c index 8f4b008..7c1c979 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -3136,6 +3136,14 @@ expand_mult (enum machine_mode mode, rtx op0, rtx op1, rtx target, if (do_trapv) goto skip_synth; + /* If mode is integer vector mode, check if the backend supports + vector lshift (by scalar or vector) at all. If not, we can't use + synthetized multiply. */ + if (GET_MODE_CLASS (mode) == MODE_VECTOR_INT + && optab_handler (vashl_optab, mode) == CODE_FOR_nothing + && optab_handler (ashl_optab, mode) == CODE_FOR_nothing) + goto skip_synth; + /* These are the operations that are potentially turned into a sequence of shifts and additions. */ mode_bitsize = GET_MODE_UNIT_BITSIZE (mode); -- cgit v1.1