[Bug middle-end/94412] [8/9/10 Regression] wrong code with vectors

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 31 09:07:40 GMT 2020


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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:1dcffc8ddc48f0b45d3d0d2f763ef5870560eb9a

commit r10-7471-g1dcffc8ddc48f0b45d3d0d2f763ef5870560eb9a
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Mar 31 11:06:43 2020 +0200

    fold-const: Fix division folding with vector operands [PR94412]

    The following testcase is miscompiled since 4.9, we treat unsigned
    vector types as if they were signed and "optimize" negations across it.

    2020-03-31  Marc Glisse  <marc.glisse@inria.fr>
                Jakub Jelinek  <jakub@redhat.com>

            PR middle-end/94412
            * fold-const.c (fold_binary_loc) <case TRUNC_DIV_EXPR>: Use
            ANY_INTEGRAL_TYPE_P instead of INTEGRAL_TYPE_P.

            * gcc.c-torture/execute/pr94412.c: New test.

    Co-authored-by: Marc Glisse <marc.glisse@inria.fr>


More information about the Gcc-bugs mailing list