[Issue 16550] Generic SIMD shuffle for Mir

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Nov 16 01:38:26 PST 2016


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

Iain Buclaw <ibuclaw at gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw at gdcproject.org

--- Comment #5 from Iain Buclaw <ibuclaw at gdcproject.org> ---
I can only think of movshdup/movsldup for extract(), but that doesn't quite do
what is being asked.

---
import gcc.builtins;

float4 a = [1,2,3,4];
auto b = __builtin_ia32_movshdup(a);  // [1,1,3,3]
auto c = __builtin_ia32_movshdup(a);  // [2,2,4,4]
---

Maybe you should provide assembly of what you'd like to be done.  But on the
surface, it doesn't look like it falls into the category of compiler
intrinsics, more like library code.

--


More information about the Digitalmars-d-bugs mailing list