Thread overview | ||||||
---|---|---|---|---|---|---|
|
November 03, 2014 simd and dmd compiler v 2.066 and 2.067.0-b1 | ||||
---|---|---|---|---|
| ||||
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]); } } |
November 03, 2014 Re: simd and dmd compiler v 2.066 and 2.067.0-b1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Laeeth Isharc | 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.
|
November 03, 2014 Re: simd and dmd compiler v 2.066 and 2.067.0-b1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Laeeth Isharc | 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 |
November 03, 2014 Re: simd and dmd compiler v 2.066 and 2.067.0-b1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marc Schütz | 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.
|
Copyright © 1999-2021 by the D Language Foundation