D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 9301 - using XMM.PSHUFD results in an internal compiler error
Summary: using XMM.PSHUFD results in an internal compiler error
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: ice, pull, SIMD
Depends on:
Blocks:
 
Reported: 2013-01-12 07:03 UTC by jerro.public
Modified: 2013-11-23 12:36 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description jerro.public 2013-01-12 07:03:51 UTC
The following code causes an internal compiler error with DMD 2.061:

import core.simd;

void main()
{
    int4 a; 
    __simd(XMM.PSHUFD, a, 0x0);
}

The compiler outputs:

Internal error: e2ir.c 3882
Comment 1 jerro.public 2013-01-12 07:55:56 UTC
This code probably shouldn't even compile, since pshufd needs to arguments, not one. But because the code results in an ICE, not an error message, I think this is a bug in the compiler.
Comment 2 Walter Bright 2013-01-12 11:59:27 UTC
You are correct in that ICE's are always compiler bugs.
Comment 3 yebblies 2013-11-23 05:13:58 UTC
Reduced:

void main()
{
    __vector(void[16]) x = 0x0;
}
Comment 4 yebblies 2013-11-23 05:30:55 UTC
The ice actually happens even on platforms with no simd.

https://github.com/D-Programming-Language/dmd/pull/2863
Comment 5 github-bugzilla 2013-11-23 12:36:26 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0d60cae8f7d7bd3575f3c6464432c30fa9a952fc
Fix Issue 9301 - using XMM.PSHUFD results in an internal compiler error

https://github.com/D-Programming-Language/dmd/commit/fd49fb70083d8faddbf13f39bc4ecafad81040d5
Merge pull request #2863 from yebblies/issue9301

Issue 9301 - using XMM.PSHUFD results in an internal compiler error