Hi.

Not sure if my code is correct - I wanted to build the simplest working example of simd use. The following compiles and works under ldc (I have not disassessembled the result to see if it is using simd instructions), but generates a compiler error under dmd (2.066 and 2.067.0-b1 running under Fedora 20).

The only message is:

"Internal error: backend/el.c 2874"

Let me know if you think the code is okay, and if so I will see if I can figure out how to generate a bug report (if it's not something already known).

Thanks.


Laeeth.





import std.stdio;
import core.simd;

void main()
{
        short8 vec;
        foreach(i;0..8)
        {
                vec.ptr[i]=cast(short)i;
        }
        vec=3*vec;
        foreach(i;0..8)
        {
                writefln("%s",vec.ptr[i]);
        }
}

Reply via email to