Bug 7594 – xmm ops use actual addition/subtraction when evaluating real+imaginary
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-26T08:24:00Z
Last change time
2015-06-09T05:11:55Z
Keywords
pull, wrong-code
Assigned to
yebblies
Creator
yebblies
Comments
Comment #0 by yebblies — 2012-02-26T08:24:24Z
Code generation for real+imaginary,imaginary+real,real-imaginary and imaginary-real is done by xmmorth, which implements it the same as real+real, resulting in very wrong code.
float f() { return 1.f; }
ifloat i() { return 1.fi; }
void main()
{
assert(f() + i() == 1.f + 1.fi);
}