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 target/81614] Should -mtune-ctrl=partial_reg_stall be turned by default?


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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE
            Summary|x86 optimizer combines      |Should
                   |results of comparisons in a |-mtune-ctrl=partial_reg_sta
                   |way that risks partial      |ll be turned by default?
                   |register stalls             |

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
With -mtune-ctrl=partial_reg_stall, I got

[hjl@gnu-tools-1 pr81614]$ cat x.i
_Bool
foo(int a, int b, int c)
{
  return (a == c || b == c);
}

int
bar (int a, int b, int c)
{
  return (a == c || b == c);
}
[hjl@gnu-tools-1 pr81614]$ make
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -O2
-mtune-ctrl=partial_reg_stall -S x.i
[hjl@gnu-tools-1 pr81614]$ cat x.s
        .file   "x.i"
        .text
        .p2align 4,,15
        .globl  foo
        .type   foo, @function
foo:
.LFB0:
        .cfi_startproc
        cmpl    %edx, %edi
        sete    %al
        cmpl    %esi, %edx
        sete    %dl
        orb     %dl, %al
        ret
        .cfi_endproc
.LFE0:
        .size   foo, .-foo
        .p2align 4,,15
        .globl  bar
        .type   bar, @function
bar:
.LFB1:
        .cfi_startproc
        cmpl    %edx, %edi
        sete    %al
        cmpl    %esi, %edx
        sete    %dl
        orb     %dl, %al
        movzbl  %al, %eax
        ret
        .cfi_endproc
.LFE1:
        .size   bar, .-bar
        .ident  "GCC: (GNU) 8.0.0 20170730 (experimental)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-tools-1 pr81614]$ 

I opened PR 81616 to update default tuning options.

*** This bug has been marked as a duplicate of bug 81616 ***

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