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

--- Comment #22 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tamar Christina <[email protected]>:

https://gcc.gnu.org/g:24c5a3e5e8deb920c5d75f1125a0cf06b5b6aa63

commit r16-7035-g24c5a3e5e8deb920c5d75f1125a0cf06b5b6aa63
Author: Tamar Christina <[email protected]>
Date:   Mon Jan 26 08:06:34 2026 +0000

    vect: distinguish between MASK_CALL and non-trapping calls [PR123628]

    In the Fix for PR122103 an ambiguity was introduced when it comes to
fortran
    due to an inconsistency in libmvec headers.

    A reproducer is

    !GCC$ builtin (expf) attributes simd (notinbranch)
    SUBROUTINE a(b)
       REAL, DIMENSION(:) :: b
       c: DO i = 1, d
       IF (e <= f) THEN
          g = EXP(h)
          r = g
          IF (r > s) THEN
             b(i) = t
          END IF
       END IF
       END DO c
    END

    compiled with -O2 -march=armv8-a+sve, note that fortran, unlike C provides
the
    libmvec header math-vector-fortran.h unconditionally, which is a separate
bug
    PR118955 which causes the functions to become available outside of -Ofast.

    This means the cases for MASK_CALL and trapping math overlap for fortran at
-O2.

    The new masking code shouldn't handle SIMD clones.

    gcc/ChangeLog:

            PR tree-optimization/122103
            PR tree-optimization/123628
            * tree-if-conv.cc (if_convertible_simdclone_stmt_p): New.
            (if_convertible_stmt_p, predicate_statements): Use it.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/122103
            PR tree-optimization/123628
            * gfortran.target/aarch64/pr123628.f90: New test.

Reply via email to