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 target/107404] [12/13 Regression] Wrong code with -O3 since r12-6416-g037cc0b4a6646cc8 Date: Thu, 03 Nov 2022 13:18:52 +0000 [thread overview] Message-ID: <bug-107404-4-Z7CUOCSAfK@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107404-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107404 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Uros Bizjak <uros@gcc.gnu.org>: https://gcc.gnu.org/g:553b1d3dd5b9253ebdf66ee3260c717d5b807dd1 commit r13-3624-g553b1d3dd5b9253ebdf66ee3260c717d5b807dd1 Author: Uros Bizjak <ubizjak@gmail.com> Date: Thu Nov 3 14:17:42 2022 +0100 i386: Fix uninitialized register after peephole2 conversion [PR107404] The eliminate reg-reg move by inverting the condition of a cmove #2 peephole2 converts the following sequence: 473: bx:DI=[r14:DI*0x8+r12:DI] 960: r15:DI=r8:DI 485: {flags:CCC=cmp(r15:DI+bx:DI,bx:DI);r15:DI=r15:DI+bx:DI;} 737: r15:DI={(geu(flags:CCC,0))?r15:DI:bx:DI} to: 1110: {flags:CCC=cmp(r8:DI+bx:DI,bx:DI);r8:DI=r8:DI+bx:DI;} 1111: r15:DI=[r14:DI*0x8+r12:DI] 1112: r15:DI={(geu(flags:CCC,0))?r8:DI:r15:DI} Please note that(insn 1110) uses register BX, but its initialization was eliminated. Avoid conversion if eliminated move intialized a register, used in the moved instruction. 2022-11-03 Uroš Bizjak <ubizjak@gmail.com> gcc/ChangeLog: PR target/107404 * config/i386/i386.md (eliminate reg-reg move by inverting the condition of a cmove #2 peephole2): Check if eliminated move initialized a register, used in the moved instruction. gcc/testsuite/ChangeLog: PR target/107404 * g++.target/i386/pr107404.C: New test.
next prev parent reply other threads:[~2022-11-03 13:18 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-26 0:40 [Bug tree-optimization/107404] New: [12/13 Regression] Wrong code with -O3 vsevolod.livinskiy at gmail dot com 2022-10-26 0:59 ` [Bug tree-optimization/107404] " pinskia at gcc dot gnu.org 2022-10-26 1:07 ` pinskia at gcc dot gnu.org 2022-10-26 6:36 ` [Bug tree-optimization/107404] [12/13 Regression] Wrong code with -O3 since r12-6416-g037cc0b4a6646cc8 marxin at gcc dot gnu.org 2022-10-26 6:36 ` marxin at gcc dot gnu.org 2022-10-26 8:58 ` rsandifo at gcc dot gnu.org 2022-10-26 9:05 ` jakub at gcc dot gnu.org 2022-10-26 11:13 ` rsandifo at gcc dot gnu.org 2022-11-03 9:29 ` [Bug target/107404] " ubizjak at gmail dot com 2022-11-03 10:00 ` ubizjak at gmail dot com 2022-11-03 13:18 ` cvs-commit at gcc dot gnu.org [this message] 2022-11-03 16:13 ` cvs-commit at gcc dot gnu.org 2022-11-03 16:18 ` ubizjak at gmail dot com
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-107404-4-Z7CUOCSAfK@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).