You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5824 Reporter:@chambart Status: closed (set by @xavierleroy on 2015-12-11T18:08:24Z) Resolution: fixed Priority: normal Severity: feature Fixed in version: 4.01.0+dev Category: back end (clambda to assembly)
Bug description
When right shifting a value, the rightmost bit can be ignored:
Well spotted. Patch applied in trunk, revision 13096. Note that the checks "n > 0" in lsr_int and asr_int are probably unnecessary, since the code generated by Plsrint and Pasrint always does an "or 1" afterwards, restoring the correct tag bit even if n = 0. But n = 0 never happens in well-written code, so we can be conservative.
Original bug ID: 5824
Reporter: @chambart
Status: closed (set by @xavierleroy on 2015-12-11T18:08:24Z)
Resolution: fixed
Priority: normal
Severity: feature
Fixed in version: 4.01.0+dev
Category: back end (clambda to assembly)
Bug description
When right shifting a value, the rightmost bit can be ignored:
let f a =
(a lsl 3) lsr 2
is compiled as:
(or (>>u (+ (<< (+ a/1009 -1) 3) 1) 2) 1))
but could be:
(or (>>u (<< (+ a/1009 -1) 3) 2) 1))
File attachments
The text was updated successfully, but these errors were encountered: