public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/67814] New: pentium4 cmp instruction register allocation error (tree-pre?)
@ 2015-10-02  6:32 vtjnash at gmail dot com
  2015-10-05 17:54 ` [Bug rtl-optimization/67814] " vtjnash at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: vtjnash at gmail dot com @ 2015-10-02  6:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67814

            Bug ID: 67814
           Summary: pentium4 cmp instruction register allocation error
                    (tree-pre?)
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vtjnash at gmail dot com
  Target Milestone: ---

Created attachment 36437
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36437&action=edit
alloc.c compile unit containing jl_compute_field_offsets

when building code with

`gcc -m32 -march=pentium4 -fPIC -O1 -ftree-pre`, I observed the following
register allocation (?) error when the compiler was creating what should have
been a `cmp %eax,%edx` instruction (dropping any one of those flags seems to be
sufficient to avoid the error):

            size_t alsz = LLT_ALIGN(sz, al);
     cc8:       8b 55 e4                mov    -0x1c(%ebp),%edx
     ccb:       89 d0                   mov    %edx,%eax
     ccd:       83 e8 01                sub    $0x1,%eax
     cd0:       01 d8                   add    %ebx,%eax
     cd2:       21 c8                   and    %ecx,%eax
     cd4:       89 45 e4                mov    %eax,-0x1c(%ebp)
            if (alsz > sz)
**   cd7:       39 d2                   cmp    %edx,%edx  **
     cd9:       76 04                   jbe    cdf
<jl_compute_field_offsets+0x108>
                st->haspadding = 1;
     cdb:       80 4f 27 20             orb    $0x20,0x27(%edi)

The original source code can be found at
https://github.com/JuliaLang/julia/blob/26b58c6138b3e8e704ba35762e79b982b4e69b33/src/alloc.c#L583-L585,
the .i file is attached.


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

end of thread, other threads:[~2015-10-13 10:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-02  6:32 [Bug tree-optimization/67814] New: pentium4 cmp instruction register allocation error (tree-pre?) vtjnash at gmail dot com
2015-10-05 17:54 ` [Bug rtl-optimization/67814] " vtjnash at gmail dot com
2015-10-10 16:13 ` [Bug rtl-optimization/67814] cmp instruction register allocation error (x86) vtjnash at gmail dot com
2015-10-11 16:04 ` ubizjak at gmail dot com
2015-10-13  1:55 ` vtjnash at gmail dot com
2015-10-13 10:09 ` ubizjak at gmail dot com

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