Committed: Add testcases for a few PRs

These were fixed as part of the fix for PR 99766,
I thought it would be useful to add a few testcases
for the other cases that were failing.

Committed as obvious after running the tests to make
sure they work.

	PR rtl-optimization/100241
	PR rtl-optimization/99787

gcc/testsuite/ChangeLog:

	* gcc.c-torture/compile/pr100241-1.c: New test.
	* gcc.c-torture/compile/pr99787-1.c: New test.
This commit is contained in:
Andrew Pinski 2022-01-01 08:44:48 +00:00
parent 7918d8270a
commit 5fa4f98263
2 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,48 @@
/* { dg-require-visibility "" } */
/* { dg-options "-fvisibility=internal -fPIC" { target fpic } } */
extern char num_4x4_blocks_high_lookup, num_4x4_blocks_wide_lookup,
vp9_foreach_transformed_block_in_plane_xd_0_0_0;
int vp9_first_pass_encode_tile_mb_row_cpi_0,
vp9_first_pass_encode_tile_mb_row_tile_data_0_0, vp9_encode_sby_pass1_x;
typedef void foreach_transformed_block_visitor();
void vp9_encode_sby_pass1();
typedef struct {
long coded_error;
long sr_coded_error;
long frame_noise_energy;
long intra_error;
} FIRSTPASS_DATA;
typedef struct {
FIRSTPASS_DATA fp_data;
} TileDataEnc;
TileDataEnc accumulate_fp_mb_row_stat_this_tile;
void vp9_first_pass_encode_tile_mb_row(FIRSTPASS_DATA *fp_acc_data) {
int mb_col_end = vp9_first_pass_encode_tile_mb_row_tile_data_0_0;
for (; mb_col_end;) {
vp9_encode_sby_pass1();
if (vp9_first_pass_encode_tile_mb_row_cpi_0) {
FIRSTPASS_DATA __trans_tmp_1 = *fp_acc_data;
accumulate_fp_mb_row_stat_this_tile.fp_data.coded_error +=
accumulate_fp_mb_row_stat_this_tile.fp_data.sr_coded_error +=
__trans_tmp_1.sr_coded_error;
accumulate_fp_mb_row_stat_this_tile.fp_data.frame_noise_energy +=
__trans_tmp_1.frame_noise_energy;
accumulate_fp_mb_row_stat_this_tile.fp_data.intra_error +=
__trans_tmp_1.intra_error;
}
}
}
foreach_transformed_block_visitor vp9_foreach_transformed_block_in_plane_visit;
void vp9_foreach_transformed_block_in_plane(void *arg) {
int c, max_blocks_wide = num_4x4_blocks_wide_lookup;
for (; num_4x4_blocks_high_lookup;) {
c = 0;
for (; c < max_blocks_wide;
c += vp9_foreach_transformed_block_in_plane_xd_0_0_0)
vp9_foreach_transformed_block_in_plane_visit(arg);
}
}
void vp9_encode_sby_pass1() {
vp9_foreach_transformed_block_in_plane(&vp9_encode_sby_pass1_x);
}

View File

@ -0,0 +1,18 @@
/* { dg-options "-ftree-slp-vectorize -ffp-contract=on -ffloat-store" } */
_Complex foo_x_0;
int foo_n11, foo_i, foo_l;
_Complex float foo_s;
_Complex *foo_f_0_0_0;
void
foo() {
_Complex f[foo_l];
for (; foo_i; foo_i++) {
int n9;
for (; n9 < foo_l; n9++)
for (; foo_n11; foo_n11++)
foo_s += foo_f_0_0_0[n9] * 0 * foo_f_0_0_0[foo_n11];
foo_x_0 += foo_s;
}
}