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
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.
You are correct in that ICE's are always compiler bugs.
Reduced: void main() { __vector(void[16]) x = 0x0; }
The ice actually happens even on platforms with no simd. https://github.com/D-Programming-Language/dmd/pull/2863
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