This PR adds the builtin simproc `USize.reduceToNat` which reduces the `USize.toNat` operation on literals less than `UInt32.size` (i.e., `4294967296`).
7 lines
178 B
Text
7 lines
178 B
Text
variable (x : USize)
|
|
|
|
/- USize.toNat -/
|
|
|
|
#check_simp USize.toNat 4294967296 !~>
|
|
#check_simp USize.toNat 4294967295 ~> 4294967295
|
|
#check_simp USize.toNat (x &&& 1) ~> x.toNat % 2
|