public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100809] New: PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq
@ 2021-05-28 7:58 jens.seifert at de dot ibm.com
2021-05-28 8:12 ` [Bug c++/100809] " jens.seifert at de dot ibm.com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: jens.seifert at de dot ibm.com @ 2021-05-28 7:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100809
Bug ID: 100809
Summary: PPC: __int128 divide/modulo does not use P10
instructions vdivsq/vdivuq
Product: gcc
Version: 10.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jens.seifert at de dot ibm.com
Target Milestone: ---
unsigned __int128 div(unsigned __int128 a, unsigned __int128 b)
{
return a/b;
}
__int128 div(__int128 a, __int128 b)
{
return a/b;
}
gcc -mcpu=power10 -save-temps -O2 int128.C
Output:
_Z3divoo:
.LFB0:
.cfi_startproc
.localentry _Z3divoo,1
mflr 0
std 0,16(1)
stdu 1,-32(1)
.cfi_def_cfa_offset 32
.cfi_offset 65, 16
bl __udivti3@notoc
addi 1,1,32
.cfi_def_cfa_offset 0
ld 0,16(1)
mtlr 0
.cfi_restore 65
blr
.long 0
.byte 0,9,0,1,128,0,0,0
.cfi_endproc
.LFE0:
.size _Z3divoo,.-_Z3divoo
.globl __divti3
.align 2
.p2align 4,,15
.globl _Z3divnn
.type _Z3divnn, @function
_Z3divnn:
.LFB1:
.cfi_startproc
.localentry _Z3divnn,1
mflr 0
std 0,16(1)
stdu 1,-32(1)
.cfi_def_cfa_offset 32
.cfi_offset 65, 16
bl __divti3@notoc
addi 1,1,32
.cfi_def_cfa_offset 0
ld 0,16(1)
mtlr 0
.cfi_restore 65
blr
.long 0
.byte 0,9,0,1,128,0,0,0
.cfi_endproc
Expected is the use of vdivsq/vdivuq.
GCC version:
/opt/rh/devtoolset-10/root/usr/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/opt/rh/devtoolset-10/root/usr/bin/gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-10/root/usr/libexec/gcc/ppc64le-redhat-linux/10/lto-wrapper
Target: ppc64le-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-10/root/usr
--mandir=/opt/rh/devtoolset-10/root/usr/share/man
--infodir=/opt/rh/devtoolset-10/root/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release
--enable-targets=powerpcle-linux --disable-multilib --with-system-zlib
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-gcc-major-version-only
--with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible
--enable-plugin --enable-initfini-array
--with-isl=/builddir/build/BUILD/gcc-10.2.1-20200804/obj-ppc64le-redhat-linux/isl-install
--disable-libmpx --enable-gnu-indirect-function --enable-secureplt
--with-long-double-128 --with-cpu-32=power8 --with-tune-32=power8
--with-cpu-64=power8 --with-tune-64=power8 --build=ppc64le-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.2.1 20200804 (Red Hat 10.2.1-2) (GCC)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/100809] PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq
2021-05-28 7:58 [Bug c++/100809] New: PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq jens.seifert at de dot ibm.com
@ 2021-05-28 8:12 ` jens.seifert at de dot ibm.com
2021-06-01 14:59 ` wschmidt at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jens.seifert at de dot ibm.com @ 2021-05-28 8:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100809
--- Comment #1 from Jens Seifert <jens.seifert at de dot ibm.com> ---
Same applies to modulo.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/100809] PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq
2021-05-28 7:58 [Bug c++/100809] New: PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq jens.seifert at de dot ibm.com
2021-05-28 8:12 ` [Bug c++/100809] " jens.seifert at de dot ibm.com
@ 2021-06-01 14:59 ` wschmidt at gcc dot gnu.org
2021-06-01 22:55 ` meissner at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2021-06-01 14:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100809
--- Comment #2 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
I believe this work is pending, but the patches are still under review.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/100809] PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq
2021-05-28 7:58 [Bug c++/100809] New: PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq jens.seifert at de dot ibm.com
2021-05-28 8:12 ` [Bug c++/100809] " jens.seifert at de dot ibm.com
2021-06-01 14:59 ` wschmidt at gcc dot gnu.org
@ 2021-06-01 22:55 ` meissner at gcc dot gnu.org
2021-06-01 22:58 ` meissner at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: meissner at gcc dot gnu.org @ 2021-06-01 22:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100809
Michael Meissner <meissner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-06-01
Status|UNCONFIRMED |NEW
CC| |carll at gcc dot gnu.org,
| |meissner at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #3 from Michael Meissner <meissner at gcc dot gnu.org> ---
Carl Love submitted a patch for this on April 26th.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/100809] PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq
2021-05-28 7:58 [Bug c++/100809] New: PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq jens.seifert at de dot ibm.com
` (2 preceding siblings ...)
2021-06-01 22:55 ` meissner at gcc dot gnu.org
@ 2021-06-01 22:58 ` meissner at gcc dot gnu.org
2021-06-04 20:17 ` meissner at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: meissner at gcc dot gnu.org @ 2021-06-01 22:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100809
--- Comment #4 from Michael Meissner <meissner at gcc dot gnu.org> ---
Note, in looking at Carl's patch, it is only for adding the built-ins. I don't
believe it adds direct support for {,u}divti3 and {,u}moddti3 to implement
these for normal __int128 variables.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/100809] PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq
2021-05-28 7:58 [Bug c++/100809] New: PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq jens.seifert at de dot ibm.com
` (3 preceding siblings ...)
2021-06-01 22:58 ` meissner at gcc dot gnu.org
@ 2021-06-04 20:17 ` meissner at gcc dot gnu.org
2021-07-08 1:56 ` [Bug target/100809] " cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: meissner at gcc dot gnu.org @ 2021-06-04 20:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100809
Michael Meissner <meissner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |meissner at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #5 from Michael Meissner <meissner at gcc dot gnu.org> ---
Patch submitted:
https://gcc.gnu.org/pipermail/gcc-patches/2021-June/571942.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/100809] PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq
2021-05-28 7:58 [Bug c++/100809] New: PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq jens.seifert at de dot ibm.com
` (4 preceding siblings ...)
2021-06-04 20:17 ` meissner at gcc dot gnu.org
@ 2021-07-08 1:56 ` cvs-commit at gcc dot gnu.org
2021-07-14 17:25 ` cvs-commit at gcc dot gnu.org
2021-07-14 17:53 ` meissner at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-08 1:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100809
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Michael Meissner <meissner@gcc.gnu.org>:
https://gcc.gnu.org/g:852b11da11a181df517c0348df044354ff0656d6
commit r12-2135-g852b11da11a181df517c0348df044354ff0656d6
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Wed Jul 7 21:55:38 2021 -0400
Generate 128-bit int divide/modulus on power10.
This patch adds support for the VDIVSQ, VDIVUQ, VMODSQ, and VMODUQ
instructions to do 128-bit arithmetic.
2021-07-07 Michael Meissner <meissner@linux.ibm.com>
gcc/
PR target/100809
* config/rs6000/rs6000.md (udivti3): New insn.
(divti3): New insn.
(umodti3): New insn.
(modti3): New insn.
gcc/testsuite/
PR target/100809
* gcc.target/powerpc/p10-vdivq-vmodq.c: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/100809] PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq
2021-05-28 7:58 [Bug c++/100809] New: PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq jens.seifert at de dot ibm.com
` (5 preceding siblings ...)
2021-07-08 1:56 ` [Bug target/100809] " cvs-commit at gcc dot gnu.org
@ 2021-07-14 17:25 ` cvs-commit at gcc dot gnu.org
2021-07-14 17:53 ` meissner at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-14 17:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100809
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Michael Meissner
<meissner@gcc.gnu.org>:
https://gcc.gnu.org/g:8ebcd3608584e544ae8e7c422b3f2400758c47f5
commit r11-8743-g8ebcd3608584e544ae8e7c422b3f2400758c47f5
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Wed Jul 14 13:23:51 2021 -0400
Generate 128-bit int divide/modulus on power10.
This patch adds support for the VDIVSQ, VDIVUQ, VMODSQ, and VMODUQ
instructions to do 128-bit arithmetic.
Backported from master: 2021-07-07 Michael Meissner
<meissner@linux.ibm.com>
2021-07-14 Michael Meissner <meissner@linux.ibm.com>
gcc/
PR target/100809
* config/rs6000/rs6000.md (udivti3): New insn.
(divti3): New insn.
(umodti3): New insn.
(modti3): New insn.
gcc/testsuite/
PR target/100809
* gcc.target/powerpc/p10-vdivq-vmodq.c: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/100809] PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq
2021-05-28 7:58 [Bug c++/100809] New: PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq jens.seifert at de dot ibm.com
` (6 preceding siblings ...)
2021-07-14 17:25 ` cvs-commit at gcc dot gnu.org
@ 2021-07-14 17:53 ` meissner at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: meissner at gcc dot gnu.org @ 2021-07-14 17:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100809
Michael Meissner <meissner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Michael Meissner <meissner at gcc dot gnu.org> ---
Patch applied to mainline and GCC 11 branches. PR closed.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-07-14 17:53 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 7:58 [Bug c++/100809] New: PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq jens.seifert at de dot ibm.com
2021-05-28 8:12 ` [Bug c++/100809] " jens.seifert at de dot ibm.com
2021-06-01 14:59 ` wschmidt at gcc dot gnu.org
2021-06-01 22:55 ` meissner at gcc dot gnu.org
2021-06-01 22:58 ` meissner at gcc dot gnu.org
2021-06-04 20:17 ` meissner at gcc dot gnu.org
2021-07-08 1:56 ` [Bug target/100809] " cvs-commit at gcc dot gnu.org
2021-07-14 17:25 ` cvs-commit at gcc dot gnu.org
2021-07-14 17:53 ` meissner 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).