public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/50696] [x32] Unnecessary lea Date: Tue, 11 Oct 2011 20:12:00 -0000 [thread overview] Message-ID: <bug-50696-4-6o5FcpOrFD@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-50696-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50696 --- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2011-10-11 20:11:59 UTC --- Does this patch diff --git a/gcc/combine.c b/gcc/combine.c index 6c3b17c..52259b6 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -5078,6 +5078,22 @@ subst (rtx x, rtx from, rtx to, int in_dest, int in_cond, int unique_copy) } } } +#ifdef POINTERS_EXTEND_UNSIGNED + else if (POINTERS_EXTEND_UNSIGNED > 0 + && code == MEM + && GET_MODE (XEXP (x, 0)) == Pmode + && GET_MODE (from) == ptr_mode + && GET_CODE (XEXP (x, 0)) == ZERO_EXTEND + && COMBINE_RTX_EQUAL_P (XEXP (XEXP (x, 0), 0), from)) + { + /* If an address is zero-extended from ptr_mode to + Pmode, replace FROM with TO. */ + SUBST (XEXP (XEXP (x, 0), 0), + (unique_copy && n_occurrences + ? copy_rtx (to) : to)); + n_occurrences++; + } +#endif else { len = GET_RTX_LENGTH (code); make any senses?
next prev parent reply other threads:[~2011-10-11 20:12 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-10-11 17:36 [Bug target/50696] New: " hjl.tools at gmail dot com 2011-10-11 18:00 ` [Bug target/50696] " hjl.tools at gmail dot com 2011-10-11 20:09 ` [Bug rtl-optimization/50696] " hjl.tools at gmail dot com 2011-10-11 20:12 ` hjl.tools at gmail dot com [this message] 2011-10-11 22:14 ` hjl.tools at gmail dot com 2011-10-11 23:29 ` hjl.tools at gmail dot com 2011-10-14 16:25 ` bonzini at gnu dot org 2011-10-14 16:36 ` hjl.tools 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-50696-4-6o5FcpOrFD@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).