If they are range-checked, it would be a good addition to the optimizer to remove them. My guess is that it is range-checked.


$/n is of course always within range if n is positive integer >= 1.

But what about in the general indexing/slicing case? In that case it would be useful if we could reuse value range propagation (VRP) in DMD, to figure out which other expressions that don't need range checking.

Reply via email to