simde
simde copied to clipboard
Many intrinsics exhibit signed integer overflow UB
For example simde_vmul_laneq_s32: https://github.com/simd-everywhere/simde/blob/51743e7920b6e867678cb50e9c62effe28f70b33/simde/arm/neon/mul_lane.h#L389
The multiplication here is UB if signed overflow occurs. The ARM documentation does not specify such UB: https://developer.arm.com/architectures/instruction-sets/intrinsics/vmul_laneq_s32
The correct way to perform the multiplication would be to cast to (uint32_t) first.
This causes test failures with clang 20.