simd-everywhere / simde

Implementations of SIMD instruction sets for systems which don't natively support them.
https://simd-everywhere.github.io/blog/
MIT License
2.33k stars 242 forks source link

Extend constant range in simde_vshll_n_XXX intrinsics #1068

Closed M-HT closed 11 months ago

M-HT commented 11 months ago

This extends constant range in simde_vshll_n_XXX intrinsics according to #1064, including tests for new values.

mr-c commented 11 months ago

https://github.com/simd-everywhere/simde/actions/runs/6317206038/job/17153486684#step:9:2257

rosbif commented 11 months ago

AFAICS the only failure is the compilation of all the n=0 cases with gcc 12 on armv7. However this compilation succeeds and passes all tests with clang 15. ISTM that this must be a gcc 12 compiler bug. @M-HT : What do you think?

M-HT commented 11 months ago

It looks like gcc bug, but when I try vshll_n_XXX intrinsics with zero shift in Compiler Explorer, it compiles correctly with ARM GCC 12.3.0 (other versions too), so I'm not sure why it doesn't compile here.

M-HT commented 11 months ago

My mistake, Compiler Explorer doesn't compile the resulting code, that's why there's no error.

M-HT commented 11 months ago

I filed a bug with gcc.

mr-c commented 11 months ago

Thank you @M-HT . Now that we have a bug number, can you add a workaround that disables that test?

See https://github.com/simd-everywhere/simde/blob/6858b928d19842fdc1a48dbd0fb1b57447da86b0/simde/simde-common.h#L915C1-L915C1

M-HT commented 11 months ago

@mr-c This is hopefully what you had in mind.