Bug 16116 – Infinite loop on (somewhat complex) simd math
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-06-02T17:31:00Z
Last change time
2017-08-02T08:07:04Z
Keywords
pull, SIMD
Assigned to
nobody
Creator
jbc.engelen
Comments
Comment #0 by jbc.engelen — 2016-06-02T17:31:09Z
DMD 2.071.0 hangs on:
```
import core.simd;
void foo() {
ushort8 src;
ushort8 dest;
ushort src0;
dest = ((src * (src0 + 1) + dest * (256 - src0))>>8);
}
```
LDC has the same problem so probably a front-end bug.
Note: I think the ">>" is unsupported by DMD for SIMD.
Related report:
https://issues.dlang.org/show_bug.cgi?id=13841
Comment #1 by bugzilla — 2016-11-21T09:58:24Z
Simpler test case:
void foo() {
__vector(short[8]) v;
int i;
v = v * i;
}