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

* [Bug rtl-optimization/51924] [4.7 Regression] wrong code with -O -free -fno-rename-registers -ftree-vectorize -funroll-loops
  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 ` zsojka at seznam dot cz
  2012-01-20 22:00 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2012-01-20 21:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> 2012-01-20 21:00:21 UTC ---
> With -free (top), the value is extended r10d -> rax (where only r10b is valid -
it is missing the r10b->r10d step)

The value is just moved from r10, not extended from r10d, but the effect is the
same...


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

* [Bug rtl-optimization/51924] [4.7 Regression] wrong code with -O -free -fno-rename-registers -ftree-vectorize -funroll-loops
  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
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-20 22:00 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0
           Severity|normal                      |major


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

* [Bug rtl-optimization/51924] [4.7 Regression] wrong code with -O -free -fno-rename-registers -ftree-vectorize -funroll-loops
  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
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2012-01-21 14:07 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-21
                 CC|                            |enkovich.gnu at gmail dot
                   |                            |com, ubizjak at gmail dot
                   |                            |com
     Ever Confirmed|0                           |1

--- Comment #2 from Uros Bizjak <ubizjak at gmail dot com> 2012-01-21 12:59:49 UTC ---
Confirmed, CCed author of REE pass.


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

* [Bug rtl-optimization/51924] [4.7 regression] wrong code with -O -free -fno-rename-registers -ftree-vectorize -funroll-loops
  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
                   ` (2 preceding siblings ...)
  2012-01-21 14:07 ` ubizjak at gmail dot com
@ 2012-01-21 14:42 ` ebotcazou at gcc dot gnu.org
  2012-01-21 15:57 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-01-21 14:42 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org
         AssignedTo|unassigned at gcc dot       |ebotcazou at gcc dot
                   |gnu.org                     |gnu.org
            Summary|[4.7 Regression] wrong code |[4.7 regression] wrong code
                   |with -O -free               |with -O -free
                   |-fno-rename-registers       |-fno-rename-registers
                   |-ftree-vectorize            |-ftree-vectorize
                   |-funroll-loops              |-funroll-loops

--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-01-21 14:31:06 UTC ---
Investigating.


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

* [Bug rtl-optimization/51924] [4.7 regression] wrong code with -O -free -fno-rename-registers -ftree-vectorize -funroll-loops
  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
                   ` (3 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-21 15:57 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-21 15:25:18 UTC ---
Possibly related to PR51933.


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

* [Bug rtl-optimization/51924] [4.7 regression] wrong code with -O -free -fno-rename-registers -ftree-vectorize -funroll-loops
  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
                   ` (4 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-01-22 16:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-01-22 14:35:44 UTC ---
Author: ebotcazou
Date: Sun Jan 22 14:35:39 2012
New Revision: 183390

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183390
Log:
    PR rtl-optimization/51924
    * ree.c (combine_set_extension): Improve debugging message.
    (combine_reaching_defs): Likewise.
    (get_defs): Rename confusingly named variable.
    (find_and_remove_re): Skip a candidate if the extension expression has
    been modified.

Added:
    trunk/gcc/testsuite/gcc.dg/ext-elim-1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ree.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/51924] [4.7 regression] wrong code with -O -free -fno-rename-registers -ftree-vectorize -funroll-loops
  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
                   ` (5 preceding siblings ...)
  2012-01-22 16:28 ` ebotcazou at gcc dot gnu.org
@ 2012-01-22 16:35 ` ebotcazou at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-01-22 16:35 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-01-22 14:46:53 UTC ---
Thanks for reporting the problem.


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