tree-optimization/125124 - disable sanity checking of BB SLP partitioning

The following disables a sanity check that BB SLP partitioning correctly
partitioned the SLP graph.

	PR tree-optimization/125124
	* tree-vect-slp.cc (vect_bb_slp_scalar_cost): Disable
	BB SLP partitioning sanity-check.

	* gcc.dg/torture/pr125124.c: New testcase.
This commit is contained in:
Richard Biener
2026-05-04 14:08:07 +02:00
committed by Richard Biener
parent 4e45547e66
commit b756d03533
2 changed files with 31 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-additional-options "-ftree-vectorize" } */
char ff_rv60_idct16x16_add_dst_1, ff_rv60_idct16x16_add___trans_tmp_1;
short ff_rv60_idct16x16_add_tmp[56];
void ff_rv60_idct16x16_add() {
for (int y; y; y++) {
int tmp00 = 31 * ff_rv60_idct16x16_add_tmp[y * 16] -
7 * ff_rv60_idct16x16_add_tmp[y * 16 + 1] -
6 * ff_rv60_idct16x16_add_tmp[y * 16 + 10] -
20 * ff_rv60_idct16x16_add_tmp[y * 16 + 4],
tmp02 = 20 * ff_rv60_idct16x16_add_tmp[y * 16] -
6 * ff_rv60_idct16x16_add_tmp[y * 16 + 1] +
7 * ff_rv60_idct16x16_add_tmp[y * 16 + 10] +
31 * ff_rv60_idct16x16_add_tmp[y * 16 + 4];
ff_rv60_idct16x16_add_dst_1 = (tmp00 >> 7) + (tmp02 >> 7);
{
if (ff_rv60_idct16x16_add_dst_1)
ff_rv60_idct16x16_add___trans_tmp_1 = ff_rv60_idct16x16_add_dst_1;
}
ff_rv60_idct16x16_add_dst_1 = ff_rv60_idct16x16_add___trans_tmp_1;
}
}

View File

@@ -9452,7 +9452,14 @@ vect_bb_slp_scalar_cost (bb_vec_info vinfo,
continue;
}
gcc_assert (!gimple_visited_p (stmt->stmt));
/* The following assert verifies that vect_bb_partition_graph
partitions the SLP graph in a way that each scalar stmt of
the coverage of the SLP graph belongs to exactly one subgraph.
??? This is currently not guaranteed since the function
works purely on SLP_TREE_SCALAR_STMTS, resulting in the assert
tripping or scalar stmts costed multiple times, making vectorization
more profitable than it really is. */
/* gcc_checking_assert (!gimple_visited_p (stmt->stmt)); */
if (vect_nop_conversion_p (stmt))
;