@@ -44628,13 +44628,18 @@ ix86_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost,
4462844628
4462944629 case vector_load:
4463044630 index = sse_store_index (mode);
44631- gcc_assert (index >= 0);
44631+ /* See PR82713 - we may end up being called on non-vector type. */
44632+ if (index < 0)
44633+ index = 2;
4463244634 return ix86_vec_cost (mode,
4463344635 COSTS_N_INSNS (ix86_cost->sse_load[index]) / 2,
4463444636 true);
4463544637
4463644638 case vector_store:
4463744639 index = sse_store_index (mode);
44640+ /* See PR82713 - we may end up being called on non-vector type. */
44641+ if (index < 0)
44642+ index = 2;
4463844643 return ix86_vec_cost (mode,
4463944644 COSTS_N_INSNS (ix86_cost->sse_store[index]) / 2,
4464044645 true);
@@ -44647,13 +44652,19 @@ ix86_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost,
4464744652 Do that incrementally. */
4464844653 case unaligned_load:
4464944654 index = sse_store_index (mode);
44655+ /* See PR82713 - we may end up being called on non-vector type. */
44656+ if (index < 0)
44657+ index = 2;
4465044658 return ix86_vec_cost (mode,
4465144659 COSTS_N_INSNS
4465244660 (ix86_cost->sse_unaligned_load[index]) / 2,
4465344661 true);
4465444662
4465544663 case unaligned_store:
4465644664 index = sse_store_index (mode);
44665+ /* See PR82713 - we may end up being called on non-vector type. */
44666+ if (index < 0)
44667+ index = 2;
4465744668 return ix86_vec_cost (mode,
4465844669 COSTS_N_INSNS
4465944670 (ix86_cost->sse_unaligned_store[index]) / 2,
0 commit comments