[Issue 19443] core.simd generates incorrect code
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jan 7 15:12:26 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=19443
ponce <aliloko at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |aliloko at gmail.com
Resolution|WORKSFORME |---
--- Comment #4 from ponce <aliloko at gmail.com> ---
Unfortunately it isn't resolved.
Consider this test case, built with DMD from 7 jan 2021 at commit
4f18b2798ad8fa337b8b71e4d2dd0d983adf9868 (with digger)
void main()
{
float4 a = [1.0f, 2.0f, 3.0f, 4.0f];
float4 b = [5.0f, 6.0f, 7.0f, 8.0f];
float4 r = cast(float4) __simd(XMM.MOVHLPS, a, b);
float[4] correct = [7.0f, 8.0f, 3.0f, 4.0f];
assert(r.array == correct); // FAIL, produces [5, 6, 3, 4] instead
}
and indeed Godbolt can show how it generated MOVLPS instead of MOVHLPS:
https://d.godbolt.org/z/43n5KP
--
More information about the Digitalmars-d-bugs
mailing list