public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/56999] New: [4.8/4.9 Regression] LRA caused miscompilation of xulrunner
@ 2013-04-18 16:28 jakub at gcc dot gnu.org
  2013-04-18 16:30 ` [Bug rtl-optimization/56999] " jakub at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-18 16:28 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56999

             Bug #: 56999
           Summary: [4.8/4.9 Regression] LRA caused miscompilation of
                    xulrunner
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org
                CC: vmakarov@gcc.gnu.org


With -fpic -O2 -m32 -march=i686 -mtune=atom the following testcase is
miscompiled with LRA (but, I don't have a runtime testcase, just eyeball
assembly right now).  The bad code is:
        movl    24(%esp), %eax
        addl    $12, %eax
        movl    %eax, 24(%esp)
        addl    $8, %eax
        testb   %cl, %cl
        movl    24(%esp), %ecx
        cmovne  %ecx, %eax
        movl    %eax, 24(%esp)
while reload has:
        movl    %ecx, %eax
        addl    $8, %ecx
        addl    $12, %eax
        cmpb    $0, 23(%esp)
        cmove   %ecx, %eax
instead.  So, reload performs the intentional ptr + (flag ? 12 : 8) while
the LRA code performs ptr + (flag ? 12 : 20) instead.  The source code related
to this is barriers ? &mJITInfo->jitHandleCtorBarriered :
&mJITInfo->jitHandleCtor where offsetof (JITScriptSet, jitHandleCtorBarriered)
== 12 and offsetof (JITScriptSet, jitHandleCtor) is 8, there is no field at
offset 20.


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

end of thread, other threads:[~2013-05-02 19:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-18 16:28 [Bug rtl-optimization/56999] New: [4.8/4.9 Regression] LRA caused miscompilation of xulrunner jakub at gcc dot gnu.org
2013-04-18 16:30 ` [Bug rtl-optimization/56999] " jakub at gcc dot gnu.org
2013-04-18 16:42 ` jakub at gcc dot gnu.org
2013-04-18 17:39 ` jakub at gcc dot gnu.org
2013-04-18 18:28 ` vmakarov at redhat dot com
2013-04-19  5:25 ` [Bug rtl-optimization/56999] [4.8 " jakub at gcc dot gnu.org
2013-04-19  8:19 ` mpolacek at gcc dot gnu.org
2013-04-19  8:19 ` mpolacek at gcc dot gnu.org
2013-04-30  6:57 ` evangelos at foutrelis dot com
2013-05-02 19:31 ` jakub 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).