public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/59461] New: missed zero-extension elimination in the combiner
@ 2013-12-10 23:13 ebotcazou at gcc dot gnu.org
  2013-12-10 23:14 ` [Bug rtl-optimization/59461] " ebotcazou at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2013-12-10 23:13 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-12-11  9:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-10 23:13 [Bug rtl-optimization/59461] New: missed zero-extension elimination in the combiner ebotcazou at gcc dot gnu.org
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

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).