public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6164] Committed: Add testcases for a few PRs
@ 2022-01-01 8:48 Andrew Pinski
0 siblings, 0 replies; only message in thread
From: Andrew Pinski @ 2022-01-01 8:48 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:5fa4f982636e7e66eee6a9b45cc0939ae95b4659
commit r12-6164-g5fa4f982636e7e66eee6a9b45cc0939ae95b4659
Author: Andrew Pinski <apinski@marvell.com>
Date: Sat Jan 1 08:44:48 2022 +0000
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.
Diff:
---
gcc/testsuite/gcc.c-torture/compile/pr100241-1.c | 48 ++++++++++++++++++++++++
gcc/testsuite/gcc.c-torture/compile/pr99787-1.c | 18 +++++++++
2 files changed, 66 insertions(+)
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr100241-1.c b/gcc/testsuite/gcc.c-torture/compile/pr100241-1.c
new file mode 100644
index 00000000000..593ef96bdb7
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr100241-1.c
@@ -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);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr99787-1.c b/gcc/testsuite/gcc.c-torture/compile/pr99787-1.c
new file mode 100644
index 00000000000..d98b7e746be
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr99787-1.c
@@ -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;
+ }
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-01 8:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-01 8:48 [gcc r12-6164] Committed: Add testcases for a few PRs Andrew Pinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).