jfalcou / eve

Expressive Vector Engine - SIMD in C++ Goes Brrrr
https://jfalcou.github.io/eve/
Boost Software License 1.0
934 stars 56 forks source link

Move self_shl & self_shr to their respective callable version #1947

Open SadiinsoSnowfall opened 1 week ago

SadiinsoSnowfall commented 1 week ago
SadiinsoSnowfall commented 1 week ago

waiting for the behavior refactor PR

SadiinsoSnowfall commented 3 days ago

I have updated the iota test so as to not trigger UB, discussion on how to solve the root of the problem is ongoing but this is not the goal of this PR.

DenisYaroshevskiy commented 3 days ago

Iota test is correct. It shows a real problem in the system. Don't put asserts

SadiinsoSnowfall commented 1 day ago

The current ARM implementations of rshl and rshr taking an index_t as a shift value do not work: the vshlq_n_ family of intrinsics cannot take a negative shift constant. This problem was already present in neon_shifter but no unit test checked the behaviour of this flavour of rshr/l.

GCC does compile the current code without any problem, but this goes against the ARM documentation and the generated instructions are also a mismatch with what is described in the documentation.

jfalcou commented 36 minutes ago

The decision we took for now is to remove assert from shifts. We can advance on that, finish the callable transition and suppport for type translation and think about how EVE shoudl sue assert in the mean time.

@DenisYaroshevskiy are you OK with that ?