public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/59461] New: missed zero-extension elimination in the combiner Date: Tue, 10 Dec 2013 23:13:00 -0000 [thread overview] Message-ID: <bug-59461-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59461 Bug ID: 59461 Summary: missed zero-extension elimination in the combiner Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ebotcazou at gcc dot gnu.org This is a spin-off of PR rtl-optimization/58295. The zero-extension is not (and has never been) eliminated on the SPARC at -O2: ee_isdigit2: sethi %hi(zeb_test_array), %g1 or %g1, %lo(zeb_test_array), %g1 ldub [%g1+%o0], %g1 mov 0, %o0 add %g1, -48, %g1 and %g1, 0xff, %g1 cmp %g1, 9 jmp %o7+8 movleu %icc, 1, %o0 .size ee_isdigit2, .-ee_isdigit2 The instruction "and %g1, 0xff, %g1" is redundant like on the ARM and the combiner should eliminate it. The difference between the ARM and the SPARC is that the former explicitly zero-extends the load from memory while the latter does it only implicitly via LOAD_EXTEND_OP. This shouldn't matter in the end, but does here because of some weakness of the nonzero_bits machinery.
next reply other threads:[~2013-12-10 23:13 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-12-10 23:13 ebotcazou at gcc dot gnu.org [this message] 2013-12-10 23:14 ` [Bug rtl-optimization/59461] " ebotcazou at gcc dot gnu.org 2013-12-11 9:23 ` rguenth at gcc dot gnu.org 2013-12-11 9:51 ` ebotcazou 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-59461-4@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).