[Issue 11417] New: rotate with immediate not recognized by optimizer
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 1 19:16:23 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11417
Summary: rotate with immediate not recognized by optimizer
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: code at dawg.eu
--- Comment #0 from Martin Nowak <code at dawg.eu> 2013-11-01 19:16:22 PDT ---
cat > bug.d << CODE
uint rol(uint n)(in uint x)
{
return x << n | x >> 32 - n;
}
uint ror(uint n)(in uint x)
{
return x >> n | x << 32 - n;
}
alias rol8 = rol!8;
alias ror8 = ror!8;
CODE
dmd -O -release -inline bug
obj2asm bug.o
----
shl EAX,8
shr EDI,018h
or EAX,EDI
shr EAX,8
shl EDI,018h
or EAX,EDI
----
While Issue 6829 which uses an runtime shift works the instruction with an
immediate shift isn't recognized by the compiler.
--
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