https://issues.dlang.org/show_bug.cgi?id=20112

--- Comment #7 from Iain Buclaw <[email protected]> ---
(In reply to thomas.bockman from comment #3)
> > Semantically, this can only be done by unrolling the assignment
> 
> I've found that this is very unreliable. Sometimes the optimizer correctly
> replaces the individual component casts with the SIMD conversion
> instructions, and sometimes it doesn't. On LLVM, at least, inlining
> sometimes undoes the optimization.
> 
> I haven't been able to get this working reliably without resorting to inline
> assembly language.
Just having a quick look, it requires -O3 in order to coerce out a 'cvttps2dq'
instruction.  To make it consistent, you can set @optimize and @target
attributes on the function (I think it works identically for both gdc and ldc).

--

Reply via email to