Jump to page: 1 2
Thread overview
[Issue 15206] ICE on optimized build, tym = x1d Internal error: backend\cgxmm.c 547
Oct 15, 2015
Vladimir Panteleev
Jan 12, 2018
Walter Bright
Mar 28, 2018
Walter Bright
Mar 29, 2018
Walter Bright
Apr 03, 2018
John Colvin
[Issue 15206] [REG2.077] ICE on optimized build, tym = x1d Internal error: backend\cgxmm.c 547
Apr 04, 2018
Seb
Jul 17, 2018
Stingertough
October 15, 2015
https://issues.dlang.org/show_bug.cgi?id=15206

Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow@gmail.com

--- Comment #1 from Vladimir Panteleev <thecybershadow@gmail.com> ---
A reproducible test case is needed, reduced or not.

--
January 09, 2018
https://issues.dlang.org/show_bug.cgi?id=15206

briancschott@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code, industry
                 CC|                            |briancschott@gmail.com
                 OS|Windows                     |All

--- Comment #2 from briancschott@gmail.com ---
Here's a test case minimized from a failed build of some data processing code at EMSI. This is partially a 2.078.0 regression, but I wasn't sure about filing a new issue since it seems to be a duplicate of this bug.

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

void main()
{
}

struct Line
{
    double slope;
    double intercept;
}

Line nLineProjection(double[] historicData)
{
    Line projLine;
    projLine.intercept = historicData[$-1] + projLine.slope;
    return projLine;
}

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

$ dmd -O test.d
tym = x1d
Internal error: dmd/backend/cgxmm.c 684
$ dmd --version
DMD64 D Compiler v2.078.0
Copyright (c) 1999-2017 by The D Language Foundation written by Walter Bright

--
January 09, 2018
https://issues.dlang.org/show_bug.cgi?id=15206

hsteoh@quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh@quickfur.ath.cx
           Severity|normal                      |critical

--- Comment #3 from hsteoh@quickfur.ath.cx ---
All ICEs should be critical.

--
January 10, 2018
https://issues.dlang.org/show_bug.cgi?id=15206

--- Comment #4 from briancschott@gmail.com ---
It seems that the problem is in the allocreg function called from loaddata.

I added some debugging printfs before and after calls to `allocreg` and I see the following:

before: tym = 0x1d, forregs = 0x020000, reg = BP|SI|DI|R10|R12|R15|XMM0|XMM1|XMM3|XMM4|XMM5|XMM6|XMM7|PSW|NOREG|RMload

after: tym = 0x1d, forregs = 0x020000, reg = AX|SP

It seems that the `forregs` variable (The `pretregs` parameter to allocreg) is not getting modified properly. It still has the value 0x20000, which matches the XMMREGS mask even though `allocreg` has correctly removed all the XMM registers from the list of valid registers in the `reg` variable. Because this `forregs` variable is not masked out by XMMREGS, there is a call to `xmmload` even though `xmmload` doesn't support `tym` values of 0x1d.

--
January 12, 2018
https://issues.dlang.org/show_bug.cgi?id=15206

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |SIMD
                 CC|                            |bugzilla@digitalmars.com

--
March 28, 2018
https://issues.dlang.org/show_bug.cgi?id=15206

--- Comment #5 from Walter Bright <bugzilla@digitalmars.com> ---
https://github.com/dlang/dmd/pull/8034

--
March 29, 2018
https://issues.dlang.org/show_bug.cgi?id=15206

--- Comment #6 from Walter Bright <bugzilla@digitalmars.com> ---
This is frustrating. I cannot reproduce this issue.

--
April 03, 2018
https://issues.dlang.org/show_bug.cgi?id=15206

John Colvin <john.loughran.colvin@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |john.loughran.colvin@gmail.
                   |                            |com

--- Comment #7 from John Colvin <john.loughran.colvin@gmail.com> ---
I found a different piece of code that triggers the same error:

% cat test.d:
alias A = Complex!double;

struct Complex(T)
{
    double re, im;

    Complex!double baz()
    {
        return Complex!double(re).blah;
    }

    ref Complex!double blah()
    {
        im = re;
        return this;
    }
}

% dmd -c -inline -O -m64 test.d
tym = x1d
Internal error: dmd/backend/cgxmm.c 684

Walter, I can produce the error for both this and the original example on both macOS and linux (haven't tried windows). -m32 avoids the bug.

--
April 04, 2018
https://issues.dlang.org/show_bug.cgi?id=15206

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greensunny12@gmail.com
            Summary|ICE on optimized build, tym |[REG2.077] ICE on optimized
                   |= x1d Internal error:       |build, tym = x1d Internal
                   |backend\cgxmm.c 547         |error: backend\cgxmm.c 547
           Severity|critical                    |regression

--- Comment #8 from Seb <greensunny12@gmail.com> ---
Yep, can reproduce the test case from John too  e.g. https://run.dlang.io/is/REkj3X

BTW digger says that this PR https://github.com/dlang/dmd/pull/7175 introduced
this.
so I'm re-labelling this as a regression.

And also I can confirm that https://github.com/dlang/dmd/pull/8034 fixes this.

--
July 17, 2018
https://issues.dlang.org/show_bug.cgi?id=15206

Stingertough <wolfsplat@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wolfsplat@gmail.com

--
« First   ‹ Prev
1 2