[Issue 5688] Poor optimization of (long & 1)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 3 11:52:22 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5688
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla at digitalmars.com
--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> 2011-03-03 11:49:26 PST ---
Interestingly, if the code is written as:
bool foo(long v)
{
return (v & 1) == 1;
}
the code generated is:
mov EAX,4[ESP]
mov EDX,8[ESP]
and EAX,1
xor EDX,EDX
ret 8
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list