Bug 21037 – AVX code sometimes fails to set VEX prefix
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2020-07-11T10:32:19Z
Last change time
2020-07-11T19:29:34Z
Keywords
wrong-code
Assigned to
No Owner
Creator
Walter Bright
Comments
Comment #0 by bugzilla — 2020-07-11T10:32:19Z
Suddenly this started failing in the test suite. The failing code is extracted from runnable/testxmm.d:
------------------------------------
import core.simd;
import core.stdc.string;
import core.stdc.stdio;
version (D_AVX)
{
void foo_byte32(byte t, byte s)
{
byte32 f = s; (***)
auto p = cast(byte*)&f;
foreach (i; 0 .. 32)
{
printf("[%d]: %d\n", i, p[i]);
assert(p[i] == s);
}
}
void main()
{
foo_byte32(5, -10);
}
}
The (***) is where the problem is, the MOVDQA instruction generated should be VMOVDQA.
Comment #1 by dlang-bot — 2020-07-11T19:29:34Z
dlang/dmd pull request #11406 "fix Issue 21037 - AVX code sometimes fails to set VEX prefix" was merged into master:
- 9f6bd4504a85ef86b84f41a36e8759c8cec02bb7 by Walter Bright:
fix Issue 21037 - AVX code sometimes fails to set VEX prefix
https://github.com/dlang/dmd/pull/11406