public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114203] [13/14 Regression] Miscompilation: A possible miscompilation in GCC 13 and 14 with option -Os Date: Mon, 04 Mar 2024 09:36:40 +0000 [thread overview] Message-ID: <bug-114203-4-GMDGnX14NO@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114203-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114203 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|NEW |ASSIGNED --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- (set_nb_iterations_in_loop = b_3(D) != 0 ? (unsigned int) (32 - __builtin_clz ((unsigned int) b_3(D))) : 24)) The issue is for prec <= i_prec we do call = build_call_expr (fn, 1, src); if (define_at_zero) { tree is_zero = fold_build2 (NE_EXPR, boolean_type_node, src, build_zero_cst (TREE_TYPE (src))); call = fold_build3 (COND_EXPR, integer_type_node, is_zero, call, build_int_cst (integer_type_node, prec)); } if (leading && prec < i_prec) call = fold_build2 (MINUS_EXPR, integer_type_node, call, build_int_cst (integer_type_node, i_prec - prec)); but that's the wrong way around, 'define_at_zero' should happen after the adjustment for leading.
next prev parent reply other threads:[~2024-03-04 9:36 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-02 4:19 [Bug c/114203] New: " 141242068 at smail dot nju.edu.cn 2024-03-02 4:40 ` [Bug tree-optimization/114203] [13/14 Regression] " pinskia at gcc dot gnu.org 2024-03-04 9:36 ` rguenth at gcc dot gnu.org [this message] 2024-03-04 10:45 ` cvs-commit at gcc dot gnu.org 2024-03-04 10:46 ` [Bug tree-optimization/114203] [13 " rguenth at gcc dot gnu.org 2024-03-21 11:49 ` cvs-commit at gcc dot gnu.org 2024-03-21 11:51 ` rguenth 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-114203-4-GMDGnX14NO@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).