Bug 21527 – Unnecessary store to memory in SIMD code
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-01-06T10:57:36Z
Last change time
2021-01-06T11:52:53Z
Keywords
backend, performance, pull, SIMD
Assigned to
No Owner
Creator
Walter Bright
Comments
Comment #0 by bugzilla — 2021-01-06T10:57:36Z
The following code:
float f(float a, float b) {
float c = a + b;
float d = c - b;
return d;
}
unnecessarily stores c into memory when it could be left in an XMM register. Compile with -m32 -O.
Comment #1 by dlang-bot — 2021-01-06T11:01:16Z
@WalterBright created dlang/dmd pull request #12103 "fix Issue 21527 - Unnecessary store to memory in SIMD code" fixing this issue:
- fix Issue 21527 - Unnecessary store to memory in SIMD code
https://github.com/dlang/dmd/pull/12103
Comment #2 by dlang-bot — 2021-01-06T11:52:53Z
dlang/dmd pull request #12103 "fix Issue 21527 - Unnecessary store to memory in SIMD code" was merged into master:
- 4de894dcd8022925132674643c47d2108443765f by Walter Bright:
fix Issue 21527 - Unnecessary store to memory in SIMD code
https://github.com/dlang/dmd/pull/12103