www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21672] New: [REG][ICE][SIMD] crash whild compiling

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

          Issue ID: 21672
           Summary: [REG][ICE][SIMD] crash whild compiling _mm_loadu_si16
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: aliloko gmail.com



This fails with DMD 2.096-b1 and -O in x86_64

------------- repro.d ------------------

import core.simd;

int4 _mm_loadu_si16(const(void)* mem_addr) pure  trusted
{
    int r = *cast(short*)(mem_addr);
    short8 result = [0, 0, 0, 0, 0, 0, 0, 0];
    result.ptr[0] = cast(short)r;
    return cast(int4)result;
}

----------------------------------------

Works in 2.095.1 though.




tym = 0x6
dmd failed with exit code -1073741795.


In Godbolt: https://d.godbolt.org/z/vx1j3r

--
Mar 01 2021