On Saturday, 3 October 2015 at 15:39:33 UTC, Marco Leise wrote:
This is a bug in overload resolution when __vector(void[16])
is involved. You can go around it by changing float4 to void16,
only to run into an internal compiler error:
  backend/gother.c 988
So file a bug for both @ issues.dlang.org
Also it looks like DMD wants you to use the return value of
the intrinsic, is that expected?

I guessed I wouldn't need the return value as the intel C intrinsic for this opcode has a void return type. I did try supplying a return type but I couldn't circumvent the overload error so I had no clue if it would make any difference.

I changed the type of result to void16 like this:

float dot_simd1(float4  a, float4 b)
{
    void16 result = __simd(XMM.DPPS, a, b, 0xFF);
    float value;
    __simd_sto(XMM.STOSS, value, result);
    return value;
}

and for me this code compiles and runs without any errors now.
I'm using DMD64 D Compiler v2.068 on Linux. If you got an internal compiler error that means that it's a compiler bug though I have no clue what. Did you try the same thing I did or casting the variable? I guess I should file a bugreport for overload resolution if it's not a duplicate for now?

Reply via email to