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 rtl-optimization/110206] [14 Regression] wrong code with -Os -march=cascadelake since r14-1246 Date: Fri, 14 Jul 2023 15:17:29 +0000 [thread overview] Message-ID: <bug-110206-4-GSD8pe3JrK@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-110206-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110206 --- Comment #17 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:1815e313a8fb519a77c94a908eb6dafc4ce51ffe commit r14-2525-g1815e313a8fb519a77c94a908eb6dafc4ce51ffe Author: Uros Bizjak <ubizjak@gmail.com> Date: Fri Jul 14 11:46:22 2023 +0200 cprop: Do not set REG_EQUAL note when simplifying paradoxical subreg [PR110206] cprop1 pass does not consider paradoxical subreg and for (insn 22) claims that it equals 8 elements of HImodeby setting REG_EQUAL note: (insn 21 19 22 4 (set (reg:V4QI 98) (mem/u/c:V4QI (symbol_ref/u:DI ("*.LC1") [flags 0x2]) [0 S4 A32])) "pr110206.c":12:42 1530 {*movv4qi_internal} (expr_list:REG_EQUAL (const_vector:V4QI [ (const_int -52 [0xffffffffffffffcc]) repeated x4 ]) (nil))) (insn 22 21 23 4 (set (reg:V8HI 100) (zero_extend:V8HI (vec_select:V8QI (subreg:V16QI (reg:V4QI 98) 0) (parallel [ (const_int 0 [0]) (const_int 1 [0x1]) (const_int 2 [0x2]) (const_int 3 [0x3]) (const_int 4 [0x4]) (const_int 5 [0x5]) (const_int 6 [0x6]) (const_int 7 [0x7]) ])))) "pr110206.c":12:42 7471 {sse4_1_zero_extendv8qiv8hi2} (expr_list:REG_EQUAL (const_vector:V8HI [ (const_int 204 [0xcc]) repeated x8 ]) (expr_list:REG_DEAD (reg:V4QI 98) (nil)))) We rely on the "undefined" vals to have a specific value (from the earlier REG_EQUAL note) but actual code generation doesn't ensure this (it doesn't need to). That said, the issue isn't the constant folding per-se but that we do not actually constant fold but register an equality that doesn't hold. PR target/110206 gcc/ChangeLog: * fwprop.cc (contains_paradoxical_subreg_p): Move to ... * rtlanal.cc (contains_paradoxical_subreg_p): ... here. * rtlanal.h (contains_paradoxical_subreg_p): Add prototype. * cprop.cc (try_replace_reg): Do not set REG_EQUAL note when the original source contains a paradoxical subreg. gcc/testsuite/ChangeLog: * gcc.target/i386/pr110206.c: New test.
next prev parent reply other threads:[~2023-07-14 15:17 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-06-11 11:27 [Bug target/110206] New: [14 Regression] wrong code with -Os -march=cascadelake zsojka at seznam dot cz 2023-06-11 16:24 ` [Bug target/110206] " pinskia at gcc dot gnu.org 2023-06-11 16:39 ` pinskia at gcc dot gnu.org 2023-06-11 17:37 ` [Bug target/110206] [14 Regression] wrong code with -Os -march=cascadelake since r14-1246 jakub at gcc dot gnu.org 2023-06-12 8:22 ` rguenth at gcc dot gnu.org 2023-06-12 8:55 ` ubizjak at gmail dot com 2023-06-12 9:09 ` ubizjak at gmail dot com 2023-06-12 9:11 ` [Bug rtl-optimization/110206] " ubizjak at gmail dot com 2023-06-12 9:15 ` ubizjak at gmail dot com 2023-06-12 9:18 ` ubizjak at gmail dot com 2023-07-08 14:07 ` ubizjak at gmail dot com 2023-07-08 16:56 ` ubizjak at gmail dot com 2023-07-08 17:36 ` ubizjak at gmail dot com 2023-07-09 8:54 ` ubizjak at gmail dot com 2023-07-10 11:54 ` rguenth at gcc dot gnu.org 2023-07-10 12:33 ` ubizjak at gmail dot com 2023-07-10 12:37 ` ubizjak at gmail dot com 2023-07-13 17:51 ` ubizjak at gmail dot com 2023-07-14 6:26 ` ubizjak at gmail dot com 2023-07-14 15:17 ` cvs-commit at gcc dot gnu.org [this message] 2023-07-14 20:03 ` cvs-commit at gcc dot gnu.org 2023-07-14 22:38 ` cvs-commit at gcc dot gnu.org 2023-07-14 22:39 ` 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-110206-4-GSD8pe3JrK@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).