[Issue 23077] New: codegen cannot generage XMM load/store for optimized operation that uses byte/short/...

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 2 02:41:17 UTC 2022


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

          Issue ID: 23077
           Summary: codegen cannot generage XMM load/store for optimized
                    operation that uses byte/short/...
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: contact at lsferreira.net

The following code produces an Illegal instruction (core dumped) on the
compiler:

float bug(float x) {
    short i = *cast(short*)&x;
    ++i;
    return *cast(float*)&i;
}

The codegen try to generate optimized calls with XMM opcodes but fail to do it.
This might happen to other types too.

--


More information about the Digitalmars-d-bugs mailing list