public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/115387] [15 regression] ICE in iovsprintf.c since r15-1081-ge14afbe2d1c Date: Mon, 10 Jun 2024 20:14:16 +0000 [thread overview] Message-ID: <bug-115387-4-NGCh87h1Aj@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-115387-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115387 --- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jeff Law <law@gcc.gnu.org>: https://gcc.gnu.org/g:d03ff3fd3e2da1352a404e3c53fe61314569345c commit r15-1167-gd03ff3fd3e2da1352a404e3c53fe61314569345c Author: Pan Li <pan2.li@intel.com> Date: Mon Jun 10 14:13:38 2024 -0600 [PATCH v1] Widening-Mul: Fix one ICE of gcall insertion for PHI match When enabled the PHI handing for COND_EXPR, we need to insert the gcall to replace the PHI node. Unfortunately, I made a mistake that insert the gcall to before the last stmt of the bb. See below gimple, the PHI is located at no.1 but we insert the gcall (aka no.9) to the end of the bb. Then the use of _9 in no.2 will have no def and will trigger ICE when verify_ssa. 1. # _9 = PHI <_3(4), 18446744073709551615(3)> // The PHI node to be deleted. 2. prephitmp_36 = (char *) _9; 3. buf.write_base = string_13(D); 4. buf.write_ptr = string_13(D); 5. buf.write_end = prephitmp_36; 6. buf.written = 0; 7. buf.mode = 3; 8. _7 = buf.write_end; 9. _9 = .SAT_ADD (string.0_2, maxlen_15(D)); // Insert gcall to last bb by mistake This patch would like to insert the gcall to before the start of the bb stmt. To ensure the possible use of PHI_result will have a def exists. After this patch the above gimple will be: 0. _9 = .SAT_ADD (string.0_2, maxlen_15(D)); // Insert gcall to start bb by mistake 1. # _9 = PHI <_3(4), 18446744073709551615(3)> // The PHI node to be deleted. 2. prephitmp_36 = (char *) _9; 3. buf.write_base = string_13(D); 4. buf.write_ptr = string_13(D); 5. buf.write_end = prephitmp_36; 6. buf.written = 0; 7. buf.mode = 3; 8. _7 = buf.write_end; The below test suites are passed for this patch: * The rv64gcv fully regression test with newlib. * The rv64gcv build with glibc. * The x86 regression test with newlib. * The x86 bootstrap test with newlib. PR target/115387 gcc/ChangeLog: * tree-ssa-math-opts.cc (math_opts_dom_walker::after_dom_children): Take the gsi of start_bb instead of last_bb. gcc/testsuite/ChangeLog: * gcc.target/riscv/pr115387-1.c: New test. * gcc.target/riscv/pr115387-2.c: New test.
next prev parent reply other threads:[~2024-06-10 20:14 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-06-07 18:21 [Bug target/115387] New: [15] RISC-V: ICE in iovsprintf.c ewlu at rivosinc dot com 2024-06-07 18:25 ` [Bug tree-optimization/115387] [15 regression] " pinskia at gcc dot gnu.org 2024-06-07 18:53 ` [Bug tree-optimization/115387] [15 regression] RISC-V: ICE in iovsprintf.c since r15-1081-ge14afbe2d1c ewlu at rivosinc dot com 2024-06-08 8:39 ` pan2.li at intel dot com 2024-06-09 12:16 ` dkm at gcc dot gnu.org 2024-06-09 12:23 ` dkm at gcc dot gnu.org 2024-06-10 3:37 ` pan2.li at intel dot com 2024-06-10 7:51 ` ubizjak at gmail dot com 2024-06-10 11:05 ` pan2.li at intel dot com 2024-06-10 11:18 ` sjames at gcc dot gnu.org 2024-06-10 11:18 ` [Bug tree-optimization/115387] [15 regression] " sjames at gcc dot gnu.org 2024-06-10 20:14 ` cvs-commit at gcc dot gnu.org [this message] 2024-06-10 21:51 ` slyfox at gcc dot gnu.org 2024-06-11 6:59 ` dkm at gcc dot gnu.org 2024-06-16 21:33 ` law 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-115387-4-NGCh87h1Aj@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).