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/28366] Divide with vectors cause extra stores (and more stack space) (with VMX)


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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-01-24
                 CC|                            |msebor at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
With -mcpu=power7 and later, gcc emits the following optimal code for the test
case.  With -mcpu=power6 and prior, I can confirm that the does look
suboptimal.

In light of the -power7 output and the fact that this has been open for 10
years with no activity, should the bug be closed as WONTFIX?

$ /build/gcc-trunk/gcc/xgcc -B /build/gcc-trunk/gcc -Wall -Wextra -O2 -maltivec
-O2 -mabi=altivec -m64 -S -o/dev/stdout -mcpu=power7 t.c
        .file   "t.c"
        .machine power7
        .section        ".toc","aw"
        .section        ".text"
        .align 2
        .p2align 4,,15
        .globl f
        .section        ".opd","aw"
        .align 3
f:
        .quad   .L.f,.TOC.@tocbase,0
        .previous
        .type   f, @function
.L.f:
        xvdivsp 34,34,35
        blr
        .long 0
        .byte 0,0,0,0,0,0,0,0
        .size   f,.-.L.f
        .ident  "GCC: (GNU) 6.0.0 20160119 (experimental)"


-mcpu=power6 code:

$ /build/gcc-trunk/gcc/xgcc -B /build/gcc-trunk/gcc -Wall -Wextra -O2 -O2
-maltivec -O2 -mabi=altivec -m64 -S -o/dev/stdout -mcpu=power6 t.c
        .file   "t.c"
        .machine power6
        .abiversion 2
        .section        ".toc","aw"
        .section        ".text"
        .align 2
        .p2align 4,,15
        .globl f
        .type   f, @function
f:
        addi 10,1,-176
        li 9,32
        stvx 2,10,9
        li 9,48
        stvx 3,10,9
        li 9,64
        stvx 2,10,9
        li 9,80
        stvx 3,10,9
        li 9,96
        stvx 2,10,9
        li 9,112
        stvx 3,10,9
        li 9,128
        stvx 2,10,9
        li 9,144
        stvx 3,10,9
        li 9,160
        lfs 0,-128(1)
        lfs 10,-144(1)
        fdivs 10,10,0
        lfs 11,-108(1)
        lfs 0,-92(1)
        fdivs 11,11,0
        lfs 12,-72(1)
        lfs 0,-56(1)
        fdivs 12,12,0
        lfs 9,-20(1)
        lfs 0,-36(1)
        fdivs 0,0,9
        stfs 10,-16(1)
        stfs 11,-12(1)
        stfs 12,-8(1)
        stfs 0,-4(1)
        lvx 2,10,9
        blr
        .long 0
        .byte 0,0,0,0,0,0,0,0
        .size   f,.-f
        .ident  "GCC: (GNU) 6.0.0 20160121 (experimental)"
        .section        .note.GNU-stack,"",@progbits

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