Bug 10715 – negated bit test (bt) not recognized by optimizer
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-07-25T16:00:00Z
Last change time
2015-06-09T05:11:35Z
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2013-07-25T16:00:35Z
bool bt(in uint[] ary, size_t bitnum)
{
return !!(ary[bitnum >> 5] & 1 << (bitnum & 31)); // uses bt
}
bool neg_bt(in uint[] ary, size_t bitnum)
{
return !(ary[bitnum >> 5] & 1 << (bitnum & 31)); // does not use bt
}
The bit test pattern recognition was added with https://github.com/D-Programming-Language/dmd/pull/1509. It does not work for negated bit tests though.