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

--- Comment #17 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:517f7e3f02b4c945d2b4bdabb490961cf986391e

commit r15-9491-g517f7e3f02b4c945d2b4bdabb490961cf986391e
Author: Robin Dapp <rd...@ventanamicro.com>
Date:   Fri Apr 4 17:06:44 2025 +0200

    RISC-V: Do not lift up vsetvl into non-transparent blocks [PR119547].

    When lifting up a vsetvl into a block we currently don't consider the
    block's transparency with respect to the vsetvl as in other parts of the
    pass.  This patch does not perform the lift when transparency is not
    guaranteed.

    This condition is more restrictive than necessary as we can still
    perform a vsetvl lift if the conflicting register is only every used
    in vsetvls and no regular insns but given how late we are in the GCC 15
    cycle it seems better to defer this.  Therefore
    gcc.target/riscv/rvv/vsetvl/avl_single-68.c is XFAILed for now.

    This issue was found in OpenCV where it manifests as a runtime error.
    Zhijin Zeng debugged PR119547 and provided an initial patch.

    Reported-By: æ¾æ²»é <zhijin.z...@spacemit.com>

            PR target/119547

    gcc/ChangeLog:

            * config/riscv/riscv-vsetvl.cc
(pre_vsetvl::earliest_fuse_vsetvl_info):
            Do not perform lift if block is not transparent.

    gcc/testsuite/ChangeLog:

            * gcc.target/riscv/rvv/vsetvl/avl_single-68.c: xfail.
            * g++.target/riscv/rvv/autovec/pr119547.C: New test.
            * g++.target/riscv/rvv/autovec/pr119547-2.C: New test.
            * gcc.target/riscv/rvv/vsetvl/vlmax_switch_vtype-10.c: Adjust.

Reply via email to