Bug 21469 – ICE core.simd when implementing _mm_set1_epi16

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2020-12-11T06:32:14Z
Last change time
2020-12-23T12:47:04Z
Keywords
backend, pull, SIMD
Assigned to
No Owner
Creator
ponce
See also
https://issues.dlang.org/show_bug.cgi?id=21470

Comments

Comment #0 by aliloko — 2020-12-11T06:32:14Z
An ICE seen in DMD 2.094.2 but also exist back in DMD 2.088.1 HOW TO REPRODUCE --- test.d ---- import core.simd; int4 _mm_set1_epi16 (short a) { return cast(int4)(short8(a)); } --------------- Build it with: $ dmd test.d -m64 -g OUTPUT With DMD 2.094: ------------------ output --------------------- tym = x6 ------------------------------------------------ DMD then fails with error code -1073741795 DMD 2.088 output has a bit more info: ------------------ output --------------------- tym = x6 --- ERROR: This is a compiler bug. Please report it via https://issues.dlang.org/enter_bug.cgi with, preferably, a reduced, reproducible example and the information below. DustMite (https://github.com/CyberShadow/DustMite/wiki) can help with the reduction. --- DMD v2.088.1-dirty predefs DigitalMars Windows CRuntime_Microsoft CppRuntime_Microsoft LittleEndian D_Version2 all D_SIMD D_InlineAsm_X86_64 X86_64 Win64 D_LP64 assert D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat binary c:\d\dmd_2.088.1\windows\bin\dmd.exe version v2.088.1-dirty config c:\d\dmd_2.088.1\windows\bin\sc.ini DFLAGS -Ic:\d\dmd_2.088.1\windows\bin\..\..\src\phobos -Ic:\d\dmd_2.088.1\windows\bin\..\..\src\druntime\import -L/OPT:NOICF --- object.Error@(0): Illegal Instruction ---------------- 0x0066ABC6 0x0067E6B1 -----------------------------------------------
Comment #1 by aliloko — 2020-12-11T06:38:17Z
Note that I workaround such bugs in intel-intrinsics package so the compiler implementer is free to not fix this!
Comment #2 by aliloko — 2020-12-11T07:17:32Z
Comment #3 by dlang-bot — 2020-12-23T08:56:34Z
@WalterBright created dlang/dmd pull request #12048 "fix Issue 21469 - ICE core.simd when implementing _mm_set1_epi16" fixing this issue: - fix Issue 21469 - ICE core.simd when implementing _mm_set1_epi16 https://github.com/dlang/dmd/pull/12048
Comment #4 by bugzilla — 2020-12-23T09:27:21Z
*** Issue 21470 has been marked as a duplicate of this issue. ***
Comment #5 by dlang-bot — 2020-12-23T12:47:04Z
dlang/dmd pull request #12048 "fix Issue 21469 - ICE core.simd when implementing _mm_set1_epi16" was merged into master: - 80ae19e1c450712ea96fd250c416b9b9c2b66782 by Walter Bright: fix Issue 21469 - ICE core.simd when implementing _mm_set1_epi16 https://github.com/dlang/dmd/pull/12048