www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - simd and dmd compiler v 2.066 and 2.067.0-b1

reply "Laeeth Isharc" <laeethnospam spammenot_laeeth.com> writes:
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]);
         }
}
Nov 03 2014
next sibling parent "John Colvin" <john.loughran.colvin gmail.com> writes:
On Monday, 3 November 2014 at 15:33:00 UTC, Laeeth Isharc wrote:
 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]);
         }
 }
It looks OK to me. Whether or not the code is correct, any internal compiler error or segfault is a bug.
Nov 03 2014
prev sibling parent reply "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> writes:
Reduced testcase:

     import core.simd;

     void main()
     {
         short8 vec;
         vec=vec*3;
     }

I've filed a bug report:
https://issues.dlang.org/show_bug.cgi?id=13674
Nov 03 2014
parent "Laeeth Isharc" <laeethnospam spammenot_laeeth.com> writes:
On Monday, 3 November 2014 at 21:23:50 UTC, Marc Schütz wrote:
 Reduced testcase:

     import core.simd;

     void main()
     {
         short8 vec;
         vec=vec*3;
     }

 I've filed a bug report:
 https://issues.dlang.org/show_bug.cgi?id=13674
Thanks - appreciate it. Laeeth.
Nov 03 2014