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

--- Comment #23 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Robin Dapp <rd...@gcc.gnu.org>:

https://gcc.gnu.org/g:660e17f00658b68115282e6de38243e3c6cc1ee2

commit r14-8430-g660e17f00658b68115282e6de38243e3c6cc1ee2
Author: Robin Dapp <rdapp....@gmail.com>
Date:   Mon Jan 15 16:23:30 2024 +0100

    fold-const: Handle AND, IOR, XOR with stepped vectors [PR112971].

    Found in PR112971 this patch adds folding support for bitwise operations
    of const duplicate zero/one vectors with stepped vectors.
    On riscv we have the situation that a folding would perpetually continue
    without simplifying because e.g. {0, 0, 0, ...} & {7, 6, 5, ...} would
    not be folded to {0, 0, 0, ...}.

    gcc/ChangeLog:

            PR middle-end/112971

            * fold-const.cc (simplify_const_binop): New function for binop
            simplification of two constant vectors when element-wise
            handling is not necessary.
            (const_binop): Call new function.

    gcc/testsuite/ChangeLog:

            * gcc.target/riscv/rvv/autovec/pr112971.c: New test.

Reply via email to