/ go Public
cmd/compile: teach prove about range of results of math/bits.*Zeros #40084
Issues related to the Go compiler and/or runtime.
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
x != 0, we know that
bits.TrailingZeros64will return a result in the range 0-63. We can use that information to remove the code that fixes up shifts that are not in range.
Right now it generates:
(And even worse without the uint cast.)
We could get rid of the CMPQ/SBBQ/ANDQ I think. Add
&63to the end of the shift line to see what it could be...
@zdjones @rasky @josharian
The text was updated successfully, but these errors were encountered: