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); }
Comment #1 by yebblies — 2012-02-26T08:38:31Z
Comment #2 by github-bugzilla — 2012-05-19T13:19:08Z
Comment #3 by bugzilla — 2012-05-19T13:20:04Z
This is working for 2.060.
Comment #4 by yebblies — 2012-07-11T00:01:51Z