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/104604] [12 Regression]wrong code with -O2 VRP Complex integer division issue since r12-3328 Date: Tue, 22 Feb 2022 09:43:45 +0000 [thread overview] Message-ID: <bug-104604-4-sAW9ZNlluP@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104604-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104604 --- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:d44dc131f48254fccc69ec4178fec030e0e2761d commit r12-7324-gd44dc131f48254fccc69ec4178fec030e0e2761d Author: Jakub Jelinek <jakub@redhat.com> Date: Tue Feb 22 10:43:13 2022 +0100 ranger: Fix up REALPART_EXPR/IMAGPART_EXPR handling [PR104604] The following testcase is miscompiled since r12-3328. That change assumed that if rhs1 of a GIMPLE_ASSIGN is COMPLEX_CST, then that is the value of the lhs of the stmt, but that is not the case always, only if it is a GIMPLE_SINGLE_RHS stmt. If it is e.g. GIMPLE_UNARY_RHS or GIMPLE_BINARY_RHS (the latter happens in the testcase), then it can be e.g. __complex__ (3, 0) / var and the REALPART_EXPR of that isn't 3, but the realpart of the division. I assume once the ranger can do complex numbers adjust_*part_expr will just fetch one or the other range from a underlying complex range, but until then, we should limit this to what r12-3328 meant to do. 2022-02-22 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/104604 * gimple-range-fold.cc (adjust_imagpart_expr, adjust_realpart_expr): Only check if gimple_assign_rhs1 is COMPLEX_CST if gimple_assign_rhs_code is COMPLEX_CST. * gcc.c-torture/execute/pr104604.c: New test.
next prev parent reply other threads:[~2022-02-22 9:43 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-02-19 7:55 [Bug tree-optimization/104604] New: wrong code with -O2 -fconserve-stack --param=vrp1-mode=ranger zsojka at seznam dot cz 2022-02-19 8:10 ` [Bug tree-optimization/104604] [12 Regression]wrong code with -O2 VRP Complex integer division issue pinskia at gcc dot gnu.org 2022-02-21 9:44 ` rguenth at gcc dot gnu.org 2022-02-21 12:40 ` [Bug tree-optimization/104604] [12 Regression]wrong code with -O2 VRP Complex integer division issue since r12-3328 jakub at gcc dot gnu.org 2022-02-21 13:04 ` jakub at gcc dot gnu.org 2022-02-22 9:43 ` cvs-commit at gcc dot gnu.org [this message] 2022-02-22 9:56 ` jakub 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-104604-4-sAW9ZNlluP@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).