public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "stefansf at linux dot ibm.com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102752] [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf Date: Thu, 14 Oct 2021 18:07:23 +0000 [thread overview] Message-ID: <bug-102752-4-f5AVtn4i1N@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-102752-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102752 --- Comment #2 from Stefan Schulze Frielinghaus <stefansf at linux dot ibm.com> --- It looks like I missed to take the TREE_TYPE of reduction_var. I just did a quick test with diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index fb9250031b5..0559b9c47d7 100644 --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -3430,7 +3430,7 @@ generate_strlen_builtin_using_rawmemchr (loop_p loop, tree reduction_var, static bool reduction_var_overflows_first (tree reduction_var, tree load_type) { - widest_int n2 = wi::lshift (1, TYPE_PRECISION (reduction_var));; + widest_int n2 = wi::lshift (1, TYPE_PRECISION (TREE_TYPE (reduction_var)));; widest_int m2 = wi::lshift (1, TYPE_PRECISION (ptrdiff_type_node) - 1); widest_int s = wi::to_widest (TYPE_SIZE_UNIT (load_type)); return wi::ltu_p (n2, wi::udiv_trunc (m2, s)); @@ -3681,7 +3681,7 @@ loop_distribution::transform_reduction_loop (loop_p loop) && ((TYPE_PRECISION (sizetype) >= TYPE_PRECISION (ptr_type_node) - 1 && TYPE_PRECISION (ptr_type_node) >= 32) || (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (reduction_var)) - && TYPE_PRECISION (reduction_var) <= TYPE_PRECISION (sizetype))) + && TYPE_PRECISION (TREE_TYPE (reduction_var)) <= TYPE_PRECISION (sizetype))) && builtin_decl_implicit (BUILT_IN_STRLEN)) generate_strlen_builtin (loop, reduction_var, load_iv.base, reduction_iv.base, loc); successfully. It's getting late here. I will come back to this tomorrow morning. Sorry for the inconvenience.
next prev parent reply other threads:[~2021-10-14 18:07 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-14 17:11 [Bug tree-optimization/102752] New: " law at gcc dot gnu.org 2021-10-14 17:14 ` [Bug tree-optimization/102752] " law at gcc dot gnu.org 2021-10-14 18:07 ` stefansf at linux dot ibm.com [this message] 2021-10-14 18:11 ` law at gcc dot gnu.org 2021-10-14 23:41 ` law at gcc dot gnu.org 2021-10-15 6:18 ` rguenth at gcc dot gnu.org 2021-10-15 9:41 ` stefansf at linux dot ibm.com 2021-10-15 9:43 ` stefansf at linux dot ibm.com 2021-10-15 14:41 ` 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-102752-4-f5AVtn4i1N@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).