public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/109311] New: [13 Regression] bb_is_just_return miss to realize some bb from r13-6873-g776a5bb5894315
@ 2023-03-28 5:33 linkw at gcc dot gnu.org
2023-03-28 5:36 ` [Bug rtl-optimization/109311] " linkw at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-03-28 5:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109311
Bug ID: 109311
Summary: [13 Regression] bb_is_just_return miss to realize some
bb from r13-6873-g776a5bb5894315
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: linkw at gcc dot gnu.org
Target Milestone: ---
Commit r13-6873-g776a5bb5894315 changed BB insns walking order under the
assumption that the handlings in the loop is order independent. But
unfortunately some failures shows it's not.
For a BB:
15: L15:
20: NOTE_INSN_BASIC_BLOCK 5
19: use %3:SI
32: NOTE_INSN_EPILOGUE_BEG
33: simple_return
;; succ: EXIT
Previously function bb_is_just_return would return true while now it returns
false, since backward walking will meet return insn first, the USE insn isn't
considered as one use to be in *use but instead is taken as unexpected insn
then return false.
By adjusting it not to check !*ret for use can workaround it,
if (!*ret && ANY_RETURN_P (pat))
*ret = insn;
- else if (!*ret && !*use && GET_CODE (pat) == USE
+ else if (!*use && GET_CODE (pat) == USE
&& REG_P (XEXP (pat, 0))
&& REG_FUNCTION_VALUE_P (XEXP (pat, 0)))
*use = insn;
but I'm not sure if there is some reason to check both !*ret && !*use, such as
to exclude something like:
simple_return
use %3:SI
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/109311] [13 Regression] bb_is_just_return miss to realize some bb from r13-6873-g776a5bb5894315
2023-03-28 5:33 [Bug rtl-optimization/109311] New: [13 Regression] bb_is_just_return miss to realize some bb from r13-6873-g776a5bb5894315 linkw at gcc dot gnu.org
@ 2023-03-28 5:36 ` linkw at gcc dot gnu.org
2023-03-28 7:31 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-03-28 5:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109311
Kewen Lin <linkw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
CC| |bergner at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org,
| |segher at gcc dot gnu.org,
| |seurer at linux dot vnet.ibm.com
Target| |powerpc*-linux-gnu
--- Comment #1 from Kewen Lin <linkw at gcc dot gnu.org> ---
Failures on both LE and BE:
< FAIL: gcc.target/powerpc/conditional-return.c scan-assembler \\\\mbeqlr\\\\M
< FAIL: gcc.target/powerpc/vec-stril-11.c scan-assembler-times
\\\\mvstribr\\\\. 2
< FAIL: gcc.target/powerpc/vec-stril-13.c scan-assembler-times
\\\\mvstrihr\\\\. 2
< FAIL: gcc.target/powerpc/vec-stril-15.c scan-assembler-times
\\\\mvstrihr\\\\. 2
< FAIL: gcc.target/powerpc/vec-stril-9.c scan-assembler-times \\\\mvstribr\\\\.
2
< FAIL: gcc.target/powerpc/vec-strir-11.c scan-assembler-times
\\\\mvstribl\\\\. 2
< FAIL: gcc.target/powerpc/vec-strir-13.c scan-assembler-times
\\\\mvstrihl\\\\. 2
< FAIL: gcc.target/powerpc/vec-strir-15.c scan-assembler-times
\\\\mvstrihl\\\\. 2
< FAIL: gcc.target/powerpc/vec-strir-9.c scan-assembler-times \\\\mvstribl\\\\.
2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/109311] [13 Regression] bb_is_just_return miss to realize some bb from r13-6873-g776a5bb5894315
2023-03-28 5:33 [Bug rtl-optimization/109311] New: [13 Regression] bb_is_just_return miss to realize some bb from r13-6873-g776a5bb5894315 linkw at gcc dot gnu.org
2023-03-28 5:36 ` [Bug rtl-optimization/109311] " linkw at gcc dot gnu.org
@ 2023-03-28 7:31 ` rguenth at gcc dot gnu.org
2023-03-28 7:33 ` cvs-commit at gcc dot gnu.org
2023-03-28 7:35 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-03-28 7:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109311
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
Target Milestone|--- |13.0
Last reconfirmed| |2023-03-28
Ever confirmed|0 |1
Priority|P2 |P1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Doh - thanks for reporting, I'll revert the offending revision and revisit
during stage1. I think for the forward walk it indeed wants to reject
use-after-return, so to make it identical for the backward walk the check
then should be *ret && !*use instead of !*ret && !*use I think.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/109311] [13 Regression] bb_is_just_return miss to realize some bb from r13-6873-g776a5bb5894315
2023-03-28 5:33 [Bug rtl-optimization/109311] New: [13 Regression] bb_is_just_return miss to realize some bb from r13-6873-g776a5bb5894315 linkw at gcc dot gnu.org
2023-03-28 5:36 ` [Bug rtl-optimization/109311] " linkw at gcc dot gnu.org
2023-03-28 7:31 ` rguenth at gcc dot gnu.org
@ 2023-03-28 7:33 ` cvs-commit at gcc dot gnu.org
2023-03-28 7:35 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-28 7:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109311
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:b462947dae9f8c0dd7c11165ccfdf6acd6f12a1c
commit r13-6889-gb462947dae9f8c0dd7c11165ccfdf6acd6f12a1c
Author: Richard Biener <rguenther@suse.de>
Date: Tue Mar 28 09:31:36 2023 +0200
Revert "rtl-optimization/109237 - speedup bb_is_just_return"
This reverts commit 776a5bb5894315ab144dc74222fc580fde8fdd87.
PR rtl-optimization/109311
* cfgcleanup.cc (bb_is_just_return): Revert previous change.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/109311] [13 Regression] bb_is_just_return miss to realize some bb from r13-6873-g776a5bb5894315
2023-03-28 5:33 [Bug rtl-optimization/109311] New: [13 Regression] bb_is_just_return miss to realize some bb from r13-6873-g776a5bb5894315 linkw at gcc dot gnu.org
` (2 preceding siblings ...)
2023-03-28 7:33 ` cvs-commit at gcc dot gnu.org
@ 2023-03-28 7:35 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-03-28 7:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109311
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-28 7:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-28 5:33 [Bug rtl-optimization/109311] New: [13 Regression] bb_is_just_return miss to realize some bb from r13-6873-g776a5bb5894315 linkw at gcc dot gnu.org
2023-03-28 5:36 ` [Bug rtl-optimization/109311] " linkw at gcc dot gnu.org
2023-03-28 7:31 ` rguenth at gcc dot gnu.org
2023-03-28 7:33 ` cvs-commit at gcc dot gnu.org
2023-03-28 7:35 ` rguenth 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).