This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/71427] New: [7 Regression] wrong code with -Os -fno-tree-forwprop (breaks in the .bswap dump)


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

            Bug ID: 71427
           Summary: [7 Regression] wrong code with -Os -fno-tree-forwprop
                    (breaks in the .bswap dump)
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---
                CC: marxin at gcc dot gnu.org

Compiler output:
$ x86_64-pc-linux-gnu-gcc -Os -fno-tree-forwprop testcase.c -Wno-psabi
$ ./a.out 
Aborted

Diffing 6-branch and trunk assembly output shows:
@@ -7,10 +7,10 @@
 .LFB0:
        .cfi_startproc
        mov     dx, WORD PTR [rsp+10]
-       or      WORD PTR [rsp+70], dx
        mov     rax, rdi
        lea     rsi, [rsp+8]
        mov     ecx, 16
+       mov     WORD PTR [rsp+70], dx
        rep movsd
        ret
        .cfi_endproc


The "or" seems to disappear in the .bswap dump in trunk.
6-branch .bswap doesn't perform any transformation, but trunk's one does.

--- Comment #1 from Martin LiÅka <marxin at gcc dot gnu.org> ---
Can't reproduce the issue on a Haswell machine, can you please attach
'--verbose' output?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]