Re: [PATCH] aarch64: enforce lane checking for intrinsics

2024-01-29 Thread Richard Sandiford
Alexandre Oliva writes: > On Jan 23, 2024, Richard Sandiford wrote: > >> Performing the check in expand is itself wrong > > *nod* > >> So I think we should enforce the immediate range within the frontend >> instead, via TARGET_CHECK_BUILTIN_CALL. > > Sounds good. Can that accommodate the

Re: [PATCH] aarch64: enforce lane checking for intrinsics

2024-01-29 Thread Alexandre Oliva
On Jan 23, 2024, Richard Sandiford wrote: > Performing the check in expand is itself wrong *nod* > So I think we should enforce the immediate range within the frontend > instead, via TARGET_CHECK_BUILTIN_CALL. Sounds good. Can that accommodate the existing uses in always_inline wrappers? >

Re: [PATCH] aarch64: enforce lane checking for intrinsics

2024-01-23 Thread Richard Sandiford
Alexandre Oliva writes: > Calling arm_neon.h functions that take lanes as arguments may fail to > report malformed values if the intrinsic happens to be optimized away, > e.g. because it is pure or const and the result is unused. > > Adding __AARCH64_LANE_CHECK calls to the always_inline

[PATCH] aarch64: enforce lane checking for intrinsics

2024-01-22 Thread Alexandre Oliva
Calling arm_neon.h functions that take lanes as arguments may fail to report malformed values if the intrinsic happens to be optimized away, e.g. because it is pure or const and the result is unused. Adding __AARCH64_LANE_CHECK calls to the always_inline functions would duplicate errors in case