[Bug target/124174] aarch64: NEON vadd should be well-defined on overflow

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 20 22:07:08 GMT 2026


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2026-02-20
     Ever confirmed|0                           |1

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Alex Coplan from comment #6)
> The ACLE does say that intrinsic implementations shouldn't introduce UB:
> 
> https://github.com/ARM-software/acle/blob/main/main/acle.md#undefined-
> behavior
> 
> > Care should be taken by compiler implementers not to introduce the concept of undefined behavior to the semantics of an intrinsic. For example, the vabsd_s64 intrinsic has well defined behaviour for all input values, while the C99 llabs has undefined behaviour if the result would not be representable in a long long type. It would thus be incorrect to implement vabsd_s64 as a wrapper function or macro around llabs.

vabsd_s64 was discussed here:
https://inbox.sourceware.org/gcc-patches/20180731214839.GE1826@arm.com/#t

So I agree with Alex's reading here.


More information about the Gcc-bugs mailing list