[Issue 18034] SIMD optimization issues

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 19 17:20:34 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18034

bitter.taste at gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bitter.taste at gmx.com

--- Comment #1 from bitter.taste at gmx.com ---
The problem is quite subtle, after the glocal pass the following code
```
ushort8 v=ushort8(check);
ubyte16 ok=__simd(XMM.PCMPEQW, control, v);
```
is turned into
```
ubyte16 ok=__simd(XMM.PCMPEQW, control, (ushort8 v = ushort8(check));
```
and since `v' isn't used anywhere else in the code the rmdeadass pass removes
the dead assignment by turning the expression into
```
ubyte16 ok=__simd(XMM.PCMPEQW, control, (<bogus>, void16(check)));
```
Now, the ushort8 -> void16 conversion happens because that's the type of the
third argument of the __simd function and, as a result, the vector is
initialized with the wrong elements, leading to the failure reported above.

--


More information about the Digitalmars-d-bugs mailing list