public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug testsuite/109776] New: [14 Regression] pr81192 fails on some targets after recent propagator changes @ 2023-05-08 16:41 law at gcc dot gnu.org 2023-05-08 16:57 ` [Bug testsuite/109776] " pinskia at gcc dot gnu.org ` (6 more replies) 0 siblings, 7 replies; 8+ messages in thread From: law at gcc dot gnu.org @ 2023-05-08 16:41 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109776 Bug ID: 109776 Summary: [14 Regression] pr81192 fails on some targets after recent propagator changes Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: law at gcc dot gnu.org Target Milestone: --- pr81192 is failing on some targets (xstormy16-elf for example) after this change: commit 21e2ef2dc25de318de29ec32d5390350c6717c6a Author: Andrew Pinski <apinski@marvell.com> Date: Tue May 2 00:10:46 2023 -0700 Move substitute_and_fold over to use simple_dce_from_worklist While looking into a different issue, I noticed that it would take until the second forwprop pass to do some forward proping and it was because the ssa name was used more than once but the second statement was "dead" and we don't remove that until much later. So this uses simple_dce_from_worklist instead of manually removing of the known unused statements instead. Propagate engine does not do a cleanupcfg afterwards either but manually cleans up possible EH edges so simple_dce_from_worklist needs to communicate that back to the propagate engine. Some testcases needed to be updated/changed even because of better optimization. gcc.dg/pr81192.c even had to be changed to be using the gimple FE so it would be less fragile in the future too. gcc.dg/tree-ssa/pr98737-1.c was failing because __atomic_fetch_ was being matched but in those cases, the result was not being used so both __atomic_fetch_ and __atomic_x_and_fetch_ are valid choices and would not make a code generation difference. evrp7.c, evrp8.c, vrp35.c, vrp36.c: just needed a slightly change as the removal message is different slightly. kernels-alias-8.c: ccp1 is able to remove an unused load which causes ealias to have one less load to analysis so update the expected scan #. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: PR tree-optimization/109691 * tree-ssa-dce.cc (simple_dce_from_worklist): Add need_eh_cleanup argument. If the removed statement can throw, have need_eh_cleanup include the bb of that statement. * tree-ssa-dce.h (simple_dce_from_worklist): Update declaration. * tree-ssa-propagate.cc (struct prop_stats_d): Remove num_dce. (substitute_and_fold_dom_walker::substitute_and_fold_dom_walker): Initialize dceworklist instead of stmts_to_remove. (substitute_and_fold_dom_walker::~substitute_and_fold_dom_walker): Destore dceworklist instead of stmts_to_remove. (substitute_and_fold_dom_walker::before_dom_children): Set dceworklist instead of adding to stmts_to_remove. (substitute_and_fold_engine::substitute_and_fold): Call simple_dce_from_worklist instead of poping from the list. Don't update the stat on removal statements. [ ... ] The compiler is complaining with this message: /home/jlaw/test/gcc/gcc/testsuite/gcc.dg/pr81192.c: In function 'fn2':^M /home/jlaw/test/gcc/gcc/testsuite/gcc.dg/pr81192.c:50:1: error: type mismatch in binary expression^M long int^M ^M long int^M ^M int^M ^M iftmp2_8_14 = j_6(D) + 1;^M /home/jlaw/test/gcc/gcc/testsuite/gcc.dg/pr81192.c:50:1: error: mismatching comparison operand types^M long int^M int^M if (c0_1_13 != 0)^M compiler exited with status 1 I suspect the testsuite needs further twiddling to work on 16bit int targets. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/109776] [14 Regression] pr81192 fails on some targets after recent propagator changes 2023-05-08 16:41 [Bug testsuite/109776] New: [14 Regression] pr81192 fails on some targets after recent propagator changes law at gcc dot gnu.org @ 2023-05-08 16:57 ` pinskia at gcc dot gnu.org 2023-05-08 16:58 ` pinskia at gcc dot gnu.org ` (5 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: pinskia at gcc dot gnu.org @ 2023-05-08 16:57 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109776 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testsuite-fail --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >I suspect the testsuite needs further twiddling to work on 16bit int targets. Actually it looks like a gimple front-end issue really. iftmp2_8 and j and c0_1 are all declared as int types rather than long int. So the testcase seems correct. Do other gcc.dg/gimplefe-* testcase fail on this target too? ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/109776] [14 Regression] pr81192 fails on some targets after recent propagator changes 2023-05-08 16:41 [Bug testsuite/109776] New: [14 Regression] pr81192 fails on some targets after recent propagator changes law at gcc dot gnu.org 2023-05-08 16:57 ` [Bug testsuite/109776] " pinskia at gcc dot gnu.org @ 2023-05-08 16:58 ` pinskia at gcc dot gnu.org 2023-05-08 17:39 ` rguenth at gcc dot gnu.org ` (4 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: pinskia at gcc dot gnu.org @ 2023-05-08 16:58 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109776 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- For an example gcc.dg/gimplefe-10.c ? ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/109776] [14 Regression] pr81192 fails on some targets after recent propagator changes 2023-05-08 16:41 [Bug testsuite/109776] New: [14 Regression] pr81192 fails on some targets after recent propagator changes law at gcc dot gnu.org 2023-05-08 16:57 ` [Bug testsuite/109776] " pinskia at gcc dot gnu.org 2023-05-08 16:58 ` pinskia at gcc dot gnu.org @ 2023-05-08 17:39 ` rguenth at gcc dot gnu.org 2023-05-08 17:43 ` pinskia at gcc dot gnu.org ` (3 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: rguenth at gcc dot gnu.org @ 2023-05-08 17:39 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109776 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2023-05-08 Status|UNCONFIRMED |NEW Target Milestone|--- |14.0 --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- The issue is xstormy has a 16bit int type and both 1 and 0 are getting assigned 'int'. Since you #define int you need to wrap all literals with _Literal (int) ... and of course 2147483647 won't fit (thus dg-require-effective-target int32plus?) ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/109776] [14 Regression] pr81192 fails on some targets after recent propagator changes 2023-05-08 16:41 [Bug testsuite/109776] New: [14 Regression] pr81192 fails on some targets after recent propagator changes law at gcc dot gnu.org ` (2 preceding siblings ...) 2023-05-08 17:39 ` rguenth at gcc dot gnu.org @ 2023-05-08 17:43 ` pinskia at gcc dot gnu.org 2023-05-08 18:04 ` cvs-commit at gcc dot gnu.org ` (2 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: pinskia at gcc dot gnu.org @ 2023-05-08 17:43 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109776 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Richard Biener from comment #3) > The issue is xstormy has a 16bit int type and both 1 and 0 are getting > assigned > 'int'. > > Since you #define int you need to wrap all literals with _Literal (int) ... > and of course 2147483647 won't fit (thus dg-require-effective-target > int32plus?) Oh I missed the define for some reason when I was looking into the tests today. Let me try to fix it for 16bit int targets. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/109776] [14 Regression] pr81192 fails on some targets after recent propagator changes 2023-05-08 16:41 [Bug testsuite/109776] New: [14 Regression] pr81192 fails on some targets after recent propagator changes law at gcc dot gnu.org ` (3 preceding siblings ...) 2023-05-08 17:43 ` pinskia at gcc dot gnu.org @ 2023-05-08 18:04 ` cvs-commit at gcc dot gnu.org 2023-05-08 18:06 ` pinskia at gcc dot gnu.org 2023-05-08 18:31 ` law at gcc dot gnu.org 6 siblings, 0 replies; 8+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2023-05-08 18:04 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109776 --- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>: https://gcc.gnu.org/g:5d85b5d649fff675ff00adcc99371bccf4ef5944 commit r14-587-g5d85b5d649fff675ff00adcc99371bccf4ef5944 Author: Andrew Pinski <apinski@marvell.com> Date: Mon May 8 10:58:06 2023 -0700 Fix pr81192.c for int16 targets I had missed when converting this testcase to Gimple that there was a define for int/unsigned type specifically to get an INT32 type. This means when using a literal integer constant you need to use the `_Literal (type)` to form the types correctly on the constants. This fixes the issue and has been both tested on xstormy16-elf and x86_64-linux-gnu. Committed as obvious. gcc/testsuite/ChangeLog: PR testsuite/109776 * gcc.dg/pr81192.c: Fix integer constants for int16 targets. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/109776] [14 Regression] pr81192 fails on some targets after recent propagator changes 2023-05-08 16:41 [Bug testsuite/109776] New: [14 Regression] pr81192 fails on some targets after recent propagator changes law at gcc dot gnu.org ` (4 preceding siblings ...) 2023-05-08 18:04 ` cvs-commit at gcc dot gnu.org @ 2023-05-08 18:06 ` pinskia at gcc dot gnu.org 2023-05-08 18:31 ` law at gcc dot gnu.org 6 siblings, 0 replies; 8+ messages in thread From: pinskia at gcc dot gnu.org @ 2023-05-08 18:06 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109776 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Fixed. I ran `make check-gcc RUNTESTFLAGS="dg.exp=pr81192.c"` to make sure the testcase now works too. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/109776] [14 Regression] pr81192 fails on some targets after recent propagator changes 2023-05-08 16:41 [Bug testsuite/109776] New: [14 Regression] pr81192 fails on some targets after recent propagator changes law at gcc dot gnu.org ` (5 preceding siblings ...) 2023-05-08 18:06 ` pinskia at gcc dot gnu.org @ 2023-05-08 18:31 ` law at gcc dot gnu.org 6 siblings, 0 replies; 8+ messages in thread From: law at gcc dot gnu.org @ 2023-05-08 18:31 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109776 --- Comment #7 from Jeffrey A. Law <law at gcc dot gnu.org> --- Thanks. That took care of the xstormy16 issues. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-05-08 18:31 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-05-08 16:41 [Bug testsuite/109776] New: [14 Regression] pr81192 fails on some targets after recent propagator changes law at gcc dot gnu.org 2023-05-08 16:57 ` [Bug testsuite/109776] " pinskia at gcc dot gnu.org 2023-05-08 16:58 ` pinskia at gcc dot gnu.org 2023-05-08 17:39 ` rguenth at gcc dot gnu.org 2023-05-08 17:43 ` pinskia at gcc dot gnu.org 2023-05-08 18:04 ` cvs-commit at gcc dot gnu.org 2023-05-08 18:06 ` pinskia at gcc dot gnu.org 2023-05-08 18:31 ` law at gcc dot gnu.org
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).