← Back to index
|
Original Bugzilla link
Bug 23437 – [CODEGEN][SIMD] Wrong codegen when inlining __simd(XMM.SQRTSS, a)
Status
NEW
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2022-10-25T21:47:49Z
Last change time
2024-12-13T19:25:11Z
Keywords
backend, SIMD, wrong-code
Assigned to
No Owner
Creator
ponce
Moved to GitHub: dmd#18131 →
Comments
Comment #0
by aliloko — 2022-10-25T21:47:49Z
Please consider the following program: ------------ main.d --------------- import std.stdio; import core.simd; version(D_SIMD){} else static assert(false); float4 _mm_sqrt_ss(float4 a) { return cast(float4) __simd(XMM.SQRTSS, a); } void main(string[] args) { float4 A = [4.0f, 4.0f, 4.0f, 4.0f]; float4 B = _mm_sqrt_ss(A); writeln(B); // Displays [2, 4, 4, 4] but [2, 0, 0, 0] with -inline } ------------------------------------ Built with: DMD -m64 main.d Output is : [2, 4, 4, 4] Built with: DMD -m64 -inline main.d Output is : [2, 0, 0, 0]
Comment #1
by aliloko — 2022-10-25T21:48:21Z
Compile: DMD32 D Compiler v2.100.2-dirty Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved written by Walter Bright
Comment #2
by aliloko — 2022-10-27T12:40:27Z
Same with DMD 2.101.0-beta1
Comment #3
by aliloko — 2023-12-17T15:05:59Z
Still happen in DMD64 D Compiler v2.106.0-dirty
Comment #4
by robert.schadek — 2024-12-13T19:25:11Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/dmd/issues/18131
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB