public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/110701] [14 Regression] Wrong code at -O1/2/3/s on x86_64-linux-gnu Date: Mon, 17 Jul 2023 17:51:08 +0000 [thread overview] Message-ID: <bug-110701-4-9G5dh73lTk@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-110701-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110701 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Last reconfirmed| |2023-07-17 Target Milestone|--- |14.0 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. Trying 16 -> 17: 16: {r94:HI=r92:DI#0^0x3;clobber flags:CC;} REG_DEAD r92:DI REG_UNUSED flags:CC 17: r95:SI=sign_extend(r94:HI) REG_DEAD r94:HI Successfully matched this instruction: (set (reg:SI 95) (ior:SI (subreg:SI (reg:DI 92) 0) (const_int 3 [0x3]))) allowing combination of insns 16 and 17 original costs 4 + 4 = 8 replacement cost 4 deferring deletion of insn with uid = 16. modifying insn i3 17: {r95:SI=r92:DI#0|0x3;clobber flags:CC;} REG_UNUSED flags:CC REG_DEAD r92:DI deferring rescan insn with uid = 17. BUT r92 is defined by (insn 12 11 13 2 (parallel [ (set (reg:DI 92) (ashiftrt:DI (reg:DI 93 [ bD.2759 ]) (const_int 63 [0x3f]))) (clobber (reg:CC 17 flags)) ]) "/app/example.cpp":6:53 901 {ashrdi3_cvt} (expr_list:REG_DEAD (reg:DI 93 [ bD.2759 ]) (expr_list:REG_UNUSED (reg:CC 17 flags) (expr_list:REG_EQUAL (ashiftrt:DI (mem/c:DI (symbol_ref:DI ("b") [flags 0x2] <var_decl 0x7f6efc025d80 b>) [1 bD.2759+0 S8 A64]) (const_int 63 [0x3f])) (nil))))) (insn 13 12 14 2 (set (subreg:HI (reg:DI 92) 0) (not:HI (subreg:HI (reg:DI 92) 0))) "/app/example.cpp":6:53 816 {*one_cmplhi2_1} (nil)) (insn 14 13 16 2 (parallel [ (set (subreg:HI (reg:DI 92) 0) (and:HI (subreg:HI (reg:DI 92) 0) (const_int 340 [0x154]))) (clobber (reg:CC 17 flags)) ]) "/app/example.cpp":6:53 596 {*andhi_1} (expr_list:REG_UNUSED (reg:CC 17 flags) (nil))) So that should be ok, well no because SI != HI here ... and
next prev parent reply other threads:[~2023-07-17 17:51 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-07-17 10:21 [Bug c/110701] New: " shaohua.li at inf dot ethz.ch 2023-07-17 12:43 ` [Bug rtl-optimization/110701] [14 Regression] " xry111 at gcc dot gnu.org 2023-07-17 17:51 ` pinskia at gcc dot gnu.org [this message] 2023-07-17 17:55 ` pinskia at gcc dot gnu.org 2023-07-17 17:58 ` pinskia at gcc dot gnu.org 2023-07-18 15:38 ` roger at nextmovesoftware dot com 2023-07-18 17:17 ` roger at nextmovesoftware dot com 2023-07-27 18:23 ` roger at nextmovesoftware dot com 2023-10-04 16:12 ` cvs-commit at gcc dot gnu.org 2023-10-11 7:59 ` roger at nextmovesoftware 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-110701-4-9G5dh73lTk@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).