From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B2880385B805; Fri, 28 May 2021 07:58:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B2880385B805 From: "jens.seifert at de dot ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100809] New: PPC: __int128 divide/modulo does not use P10 instructions vdivsq/vdivuq Date: Fri, 28 May 2021 07:58:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jens.seifert at de dot ibm.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 May 2021 07:58:35 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100809 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=3Dpower10 -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=3D/opt/rh/devtoolset-10/root/usr/bin/gcc COLLECT_LTO_WRAPPER=3D/opt/rh/devtoolset-10/root/usr/libexec/gcc/ppc64le-re= dhat-linux/10/lto-wrapper Target: ppc64le-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=3Dc,c++,fortran,lto --prefix=3D/opt/rh/devtoolset-10/roo= t/usr --mandir=3D/opt/rh/devtoolset-10/root/usr/share/man --infodir=3D/opt/rh/devtoolset-10/root/usr/share/info --with-bugurl=3Dhttp://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=3Dposix --enable-checking=3Drelease --enable-targets=3Dpowerpcle-linux --disable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-ob= ject --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=3Dgnu --with-default-libstdcxx-abi=3Dgcc4-compatib= le --enable-plugin --enable-initfini-array --with-isl=3D/builddir/build/BUILD/gcc-10.2.1-20200804/obj-ppc64le-redhat-l= inux/isl-install --disable-libmpx --enable-gnu-indirect-function --enable-secureplt --with-long-double-128 --with-cpu-32=3Dpower8 --with-tune-32=3Dpower8 --with-cpu-64=3Dpower8 --with-tune-64=3Dpower8 --build=3Dppc64le-redhat-lin= ux Thread model: posix Supported LTO compression algorithms: zlib gcc version 10.2.1 20200804 (Red Hat 10.2.1-2) (GCC)=