public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "aldyh at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103192] [12 Regression] ICE on libgomp target-in-reduction-2.{C,c} Date: Fri, 12 Nov 2021 11:22:29 +0000 [thread overview] Message-ID: <bug-103192-4-Gi2TiFExby@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103192-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103192 --- Comment #6 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- Hmm, all these threads look correct. Following are my steps for verification. In a stage2 compiler I do: $ rm -f gimplify.o $ make cc1 CXXFLAGS="-O2 -fdisable-tree-threadfull2 -fdisable-tree-threadfull1 -fdisable-tree-thread2 -fdisable-tree-thread1 -fdbg-cnt=registered_jump_thread:543-543:544-544:550-550:551-551:552-552:553-553:554-554:555-555 -fdump-tree-all-details --param=threader-debug=all" $ ./cc1 a.c -O2 -fopenmp -quiet a.c: In function ‘foo’: a.c:35:13: internal compiler error: Segmentation fault ... ... This disables all the threaders except DOM and ethread. It also splits up the individual threaded paths for easy grepping in the source (dbgcnt.*543, dbgcnt.*544, etc). All of the threads are needed to reproduce. All of them are from ethread and belong to the gimplify_scan_omp_clauses function: $ grep Register.*jump gimplify.c.* gimplify.c.034t.ethread: [543] Registering jump thread: (687, 689) incoming edge; (689, 690) nocopy; gimplify.c.034t.ethread: [544] Registering jump thread: (688, 689) incoming edge; (689, 693) nocopy; gimplify.c.034t.ethread: [550] Registering jump thread: (776, 777) incoming edge; (777, 801) nocopy; gimplify.c.034t.ethread: [551] Registering jump thread: (779, 780) incoming edge; (780, 781) nocopy; gimplify.c.034t.ethread: [552] Registering jump thread: (780, 782) incoming edge; (782, 785) nocopy; gimplify.c.034t.ethread: [553] Registering jump thread: (784, 786) incoming edge; (786, 787) nocopy; gimplify.c.034t.ethread: [554] Registering jump thread: (785, 786) incoming edge; (786, 788) nocopy; gimplify.c.034t.ethread: [555] Registering jump thread: (804, 806) incoming edge; (806, 807) nocopy; All of these paths, with the exception of 551 are trivially solvable. For example: The IL immediate above this... ***dbgcnt: lower limit 543 reached for registered_jump_thread.*** ***dbgcnt: upper limit 543 reached for registered_jump_thread.*** [543] Registering jump thread: (687, 689) incoming edge; (689, 690) nocopy; path: 687->689->690 SUCCESS ...is the path: <bb 689> : # iftmp.2344_1598 = PHI <1(687), 0(688)> if (iftmp.2344_1598 != 0) goto <bb 690>; [INV] else goto <bb 693>; [INV] That's an obvious thread from 687->689->690. The rest are a similar pattern. The only different path is: ***dbgcnt: lower limit 551 reached for registered_jump_thread.*** ***dbgcnt: upper limit 551 reached for registered_jump_thread.*** [551] Registering jump thread: (779, 780) incoming edge; (780, 781) nocopy; path: 779->780->781 SUCCESS with an IL of: <bb 780> : # iftmp.2373_1603 = PHI <outer_ctx_1871(778), ctx_1868(779)> if (iftmp.2373_1603 != 0B) goto <bb 781>; [INV] else goto <bb 782>; [INV] but if you look at the definition of ctx_1868, it's clear it's threadable to bb781 because ctx_1868 is known to be non-zero: ctx_1868 = new_omp_context (region_type_1866(D)); ctx_1868->code = code_1869(D); Those are all the jump threads in play and they're all correct.
next prev parent reply other threads:[~2021-11-12 11:22 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-11 14:39 [Bug tree-optimization/103192] New: " jakub at gcc dot gnu.org 2021-11-11 15:31 ` [Bug tree-optimization/103192] " jakub at gcc dot gnu.org 2021-11-11 17:28 ` pinskia at gcc dot gnu.org 2021-11-12 7:28 ` rguenth at gcc dot gnu.org 2021-11-12 8:15 ` aldyh at gcc dot gnu.org 2021-11-12 10:28 ` aldyh at gcc dot gnu.org 2021-11-12 11:13 ` jamborm at gcc dot gnu.org 2021-11-12 11:22 ` aldyh at gcc dot gnu.org [this message] 2021-11-12 11:31 ` jakub at gcc dot gnu.org 2021-11-12 11:38 ` aldyh at gcc dot gnu.org 2021-11-12 11:40 ` jakub at gcc dot gnu.org 2021-11-12 13:28 ` aldyh at gcc dot gnu.org 2021-11-12 13:30 ` aldyh at gcc dot gnu.org 2021-11-13 18:27 ` jakub at gcc dot gnu.org 2021-11-13 19:07 ` hubicka at gcc dot gnu.org 2021-11-15 20:30 ` amacleod at redhat dot com 2021-11-15 22:08 ` amacleod at redhat dot com 2021-11-16 3:12 ` law at gcc dot gnu.org 2021-11-16 8:37 ` jakub at gcc dot gnu.org 2021-11-16 12:17 ` aldyh at gcc dot gnu.org 2021-11-16 13:34 ` jakub at gcc dot gnu.org 2021-11-16 13:51 ` jakub at gcc dot gnu.org 2021-11-17 13:19 ` cvs-commit at gcc dot gnu.org 2021-11-22 17:45 ` jakub at gcc dot gnu.org 2021-11-29 8:49 ` cvs-commit at gcc dot gnu.org 2022-05-10 8:21 ` cvs-commit at gcc dot gnu.org 2022-05-11 6:23 ` cvs-commit at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-103192-4-Gi2TiFExby@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).