public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/51924] New: [4.7 Regression] wrong code with -O -free -fno-rename-registers -ftree-vectorize -funroll-loops
@ 2012-01-20 21:51 zsojka at seznam dot cz
  2012-01-20 21:54 ` [Bug rtl-optimization/51924] " zsojka at seznam dot cz
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2012-01-20 21:51 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51924
           Summary: [4.7 Regression] wrong code with -O -free
                    -fno-rename-registers -ftree-vectorize -funroll-loops
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 26397
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26397
reduced testcase

Output:
$ gcc -O -free -fno-rename-registers -ftree-vectorize -funroll-loops testcase.c
$ ./a.out
Aborted


In the output assembly when comparing output with -free and -fno-ree, this
often happens:
*************** bn_sub_words:
*** 152,159 ****
        mov     QWORD PTR [rdi+rcx], r10
        cmp     r9, r8
        setb    r10b
        cmp     r9, r8
!       cmovne  rax, r10
        add     rcx, 8
        cmp     rcx, r11
        jne     .L5
--- 156,164 ----
        mov     QWORD PTR [rdi+rcx], r10
        cmp     r9, r8
        setb    r10b
+       movzx   r10d, r10b
        cmp     r9, r8
!       cmovne  eax, r10d
        add     rcx, 8
        cmp     rcx, r11
        jne     .L5

With -fno-ree (bottom), the value is extended as r10b -> r10d -> eax (-> rax
before ret)
With -free (top), the value is extended r10d -> rax (where only r10b is valid -
it is missing the r10b->r10d step)

Tested revisions:
r183324 - fail
4.6 - doesn't know -free, but -free is included in -O2


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

end of thread, other threads:[~2012-01-22 14:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-20 21:51 [Bug rtl-optimization/51924] New: [4.7 Regression] wrong code with -O -free -fno-rename-registers -ftree-vectorize -funroll-loops zsojka at seznam dot cz
2012-01-20 21:54 ` [Bug rtl-optimization/51924] " zsojka at seznam dot cz
2012-01-20 22:00 ` pinskia at gcc dot gnu.org
2012-01-21 14:07 ` ubizjak at gmail dot com
2012-01-21 14:42 ` [Bug rtl-optimization/51924] [4.7 regression] " ebotcazou at gcc dot gnu.org
2012-01-21 15:57 ` jakub at gcc dot gnu.org
2012-01-22 16:28 ` ebotcazou at gcc dot gnu.org
2012-01-22 16:35 ` 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).