public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/58997] ICE on valid code at -O3 on x86_64-linux-gnu (affecting gcc trunk and 4.8.2) Date: Tue, 05 Nov 2013 09:41:00 -0000 [thread overview] Message-ID: <bug-58997-4-DSb9Dnx99W@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-58997-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58997 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2013-11-05 CC| |jakub at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 31158 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31158&action=edit gcc49-pr58997.patch Untested fix. Likely regressed in r110005. For IV_UNKNOWN_EXTEND, get_iv_value returns value in iv->mode rather than iv->extend_mode, so for iv_subreg we just need to adjust the last argument to lowpart_subreg. For iv_extend similarly, but IMHO (no testcase) if iv->extend is not unknown, but different from currently required extend, then the code misbehaves too, say for iv->extend IV_SIGN_EXTEND what get_iv_value returns is say HImode sign extended into SImode, if we do iv_extend IV_ZERO_EXTEND to say DImode on this, then it would give us for negative HImode a value with bits 16-31 all set rather than clear. And, additionally (again, no testcase), the uses in may_unswitch_on I can't see how we couldn't end up with get_iv_value returning there zero resp. sign extended op[i], i.e. wider than we want. If the other IV isn't sign/zero extended, or is extended to different mode or differently, or if the other operand is constant (which should be sign extended from the mode), I'd say this can create invalid RTL or wrong-code.
next prev parent reply other threads:[~2013-11-05 9:41 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-11-05 6:24 [Bug rtl-optimization/58997] New: " su at cs dot ucdavis.edu 2013-11-05 9:41 ` jakub at gcc dot gnu.org [this message] 2013-11-05 9:41 ` [Bug rtl-optimization/58997] [4.7/4.8/4.9 Regression] " jakub at gcc dot gnu.org 2013-11-05 19:39 ` jakub at gcc dot gnu.org 2013-11-19 13:35 ` [Bug rtl-optimization/58997] [4.7 " rguenth at gcc dot gnu.org 2014-06-12 13:31 ` rguenth 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-58997-4-DSb9Dnx99W@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).