arduano / simdeez

easy simd
MIT License
331 stars 25 forks source link

Recursive generic simd functions don't work properly when inlined into target_feature functions #3

Closed jackmott closed 5 years ago

jackmott commented 6 years ago

see: https://github.com/rust-lang/rust/issues/53117

Caused by this llvm bug (probably): https://bugs.llvm.org/show_bug.cgi?id=37358

EDIT: Rust now has a workaround for the llvm bug but it doesn't appear to fix this issue.

The only work around I know of at this time is either copy-paste the generic function to separate functions for each SIMD target you want, or find a way to make your function non recursive.

If anyone has ideas for a better workaround let me know, otherwise I'll leave this open until the llvm bug is fixed. If you have an account on the llvm bug tracker feel free to politely mention you would like to see this fixed.

jackmott commented 5 years ago

A recent PR in the rust has fixed this on nightly. I will keep this open until it is on stable then close it.

jackmott commented 5 years ago

Another update - the PR for the Rust workaround has been reverted, it was causing some problems, and LLVM has a proposed fix, so the real fix should be soon!

jackmott commented 5 years ago

a fix was just merged for this in llvm so hopefully that will flow into Rust soon!

jackmott commented 5 years ago

latest rust this seems to be fixed now.