View | Details | Raw Unified | Return to bug 59261
Collapse All | Expand All | Context: (Patch / File /
)

(-)gcc/expmed.c.jj (+8 lines)
 Lines 3136-3141   expand_mult (enum machine_mode mode, rtx Link Here 
3136
      if (do_trapv)
3136
      if (do_trapv)
3137
	goto skip_synth;
3137
	goto skip_synth;
3138
3138
3139
      /* If mode is integer vector mode, check if the backend supports
3140
	 vector lshift (by scalar or vector) at all.  If not, we can't use
3141
	 synthetized multiply.  */
3142
      if (GET_MODE_CLASS (mode) == MODE_VECTOR_INT
3143
	  && optab_handler (vashl_optab, mode) == CODE_FOR_nothing
3144
	  && optab_handler (ashl_optab, mode) == CODE_FOR_nothing)
3145
	goto skip_synth;
3146
3139
      /* These are the operations that are potentially turned into
3147
      /* These are the operations that are potentially turned into
3140
	 a sequence of shifts and additions.  */
3148
	 a sequence of shifts and additions.  */
3141
      mode_bitsize = GET_MODE_UNIT_BITSIZE (mode);
3149
      mode_bitsize = GET_MODE_UNIT_BITSIZE (mode);
(-)gcc/testsuite/gcc.dg/pr59261.c.jj (+17 lines)
Line 0    Link Here 
1
/* PR middle-end/59261 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2" } */
4
5
typedef signed char V __attribute__((vector_size (8)));
6
7
void
8
foo (V *a, V *b)
9
{
10
  *a = *b * 3;
11
}
12
13
void
14
bar (V *a, V *b)
15
{
16
  *a = *b * 4;
17
}

Return to bug 59261