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
{{ message }}
Repository navigation
cmd/compile: unnecessary bounds checking using result of intrinsic function #58334
Bounds checking because the index variable is signed.
While the result of LeadingZeros64 is signed, the compiler should know that the possible range is [0, 64] and deduce that n (and therefore i) will always be positive. (Even better would be using the result of LeadingZeros64 directly since the the n == 0 case reduces the range to [0, 63].)
Activity
cuonglm commentedon Feb 5, 2023
Seems duplicated of #40084.
ericlagergren commentedon Feb 5, 2023
@cuonglm yes, I think you're right. Actually, it looks like there are a handful of duplicates.
dr2chase commentedon Feb 6, 2023
Duplicate of #40084.