+2014-02-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/59261
+ * expmed.c (expand_mult): For MODE_VECTOR_INT multiplication
+ if there is no vashl<mode>3 or ashl<mode>3 insn, skip_synth.
+
2014-02-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/60012
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);
+2014-02-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/59261
+ * gcc.dg/pr59261.c: New test.
+
2014-02-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/60012
--- /dev/null
+/* PR middle-end/59261 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef signed char V __attribute__((vector_size (8)));
+
+void
+foo (V *a, V *b)
+{
+ *a = *b * 3;
+}
+
+void
+bar (V *a, V *b)
+{
+ *a = *b * 4;
+}