public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "krebbel at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/94613] New: combine: Wrong code due to splitting a simplified IF_THEN_ELSE Date: Thu, 16 Apr 2020 07:01:53 +0000 [thread overview] Message-ID: <bug-94613-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94613 Bug ID: 94613 Summary: combine: Wrong code due to splitting a simplified IF_THEN_ELSE Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: critical Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: krebbel at gcc dot gnu.org Target Milestone: --- Created attachment 48284 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48284&action=edit autoreduced testcase When compiling the attached testcase for IBM Z GCC optimizes an OR operation away during combine leading to wrong code being generated: cc1plus -O3 -march=z14 t.ii -quiet -o t.s try_combine is invoked for the following 3 insns: i1: 28: r111 = r110 | r158 i2: 31: r115 = r111 - r94 i3: 36: r122 = (r110 == 0 ? r115 : r177) i3 becomes the following after inserting i1 and i2 36: r122 = (r110 == 0 ? r110 | r158 - r94 : r177) simplification omits ORing r110 since it is 0 anyway: 36: r122 = (r110 == 0 ? r158 - r94 : r177) after not being able to recognize the insn it gets split into parts again: 28: deleted 31: r115 = r158 - r94 36: r122 = (r110 == 0 ? r115 : r177)
next reply other threads:[~2020-04-16 7:01 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-16 7:01 krebbel at gcc dot gnu.org [this message] 2020-04-16 7:02 ` [Bug rtl-optimization/94613] " krebbel at gcc dot gnu.org 2020-04-16 7:05 ` krebbel at gcc dot gnu.org 2020-04-16 7:05 ` krebbel at gcc dot gnu.org 2020-04-16 7:09 ` krebbel at gcc dot gnu.org 2020-04-16 7:10 ` rguenth at gcc dot gnu.org 2020-04-16 7:15 ` rguenth at gcc dot gnu.org 2020-04-16 7:37 ` krebbel at gcc dot gnu.org 2020-04-16 8:21 ` [Bug target/94613] Wrong code generated for vec_sel builtin krebbel at gcc dot gnu.org 2020-04-16 8:28 ` [Bug target/94613] S/390: " krebbel at gcc dot gnu.org 2020-04-16 21:18 ` segher at gcc dot gnu.org 2020-04-20 17:39 ` [Bug target/94613] S/390, powerpc: " cvs-commit at gcc dot gnu.org 2020-05-04 8:39 ` cvs-commit at gcc dot gnu.org 2020-05-04 8:43 ` cvs-commit at gcc dot gnu.org 2020-05-07 11:56 ` jakub at gcc dot gnu.org 2020-07-23 6:52 ` rguenth at gcc dot gnu.org 2021-04-08 12:02 ` rguenth at gcc dot gnu.org 2021-05-04 12:32 ` rguenth at gcc dot gnu.org 2021-05-27 0:57 ` luoxhu at gcc dot gnu.org 2021-10-28 3:18 ` cvs-commit at gcc dot gnu.org 2021-10-28 3:18 ` cvs-commit at gcc dot gnu.org 2021-10-28 6:04 ` luoxhu 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-94613-4@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).