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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>:

https://gcc.gnu.org/g:5596572b6bf72031de888301ebfe8e984df04dc9

commit r15-4698-g5596572b6bf72031de888301ebfe8e984df04dc9
Author: Andrew Pinski <quic_apin...@quicinc.com>
Date:   Sat Oct 26 02:14:18 2024 -0700

    tree: Mark PAREN_EXPR and VEC_DUPLICATE_EXPR as non-trapping [PR117234]

    While looking to fix a possible trapping issue in PHI-OPT's factor,
    I noticed that some tree codes could be marked as trapping even
    though they don't have a possibility to trap. In the case of PAREN_EXPR,
    it is basically a nop except when it comes to association across it so
    it can't trap.
    In the case of VEC_DUPLICATE_EXPR, it is similar to a CONSTRUCTOR, so it
    can't trap.

    This fixes those 2 issues and adds 4 testcases, 2 which are specific to
aarch64
    since the only way to get a VEC_DUPLICATE_EXPR is to use intrinsics
currently.

    Build and tested for aarch64-linux-gnu.

            PR tree-optimization/117234

    gcc/ChangeLog:

            * tree-eh.cc (operation_could_trap_helper_p): Treat
            PAREN_EXPR and VEC_DUPLICATE_EXPR like constructing
            expressions.

    gcc/testsuite/ChangeLog:

            * g++.dg/eh/noncall-fp-1.C: New test.
            * g++.target/aarch64/sve/noncall-eh-fp-1.C: New test.
            * gcc.dg/tree-ssa/trapping-1.c: New test.
            * gcc.target/aarch64/sve/trapping-1.c: New test.

    Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>

Reply via email to