Open neon-sunset opened 1 day ago
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.
The range of u
is not known and has to be always checked I presume? Although, it can be hoisted from the loop. Overflow check can be, probably, fixed with help of IV cc @jakobbotsch
The range of
u
is not known and has to be always checked I presume? Although, it can be hoisted from the loop. Overflow check can be, probably, fixed with help of IV cc @jakobbotsch
Assertion prop would probably be better suited for something like this. It should be able to know that 0 <= j < 10000
inside the loop based on the comparisons made, and thus that the overflow is impossible.
Or, I suppose, range check can do it as well...
Description
Given simple program
It appears that the loop body on ARM64 under NAOT compiles to
Meanwhile the loop body of equivalent code in C is compiled by Clang -O3 to the following instead:
Note - on x86_64 .NET does not emit any guards:
Question - could this be improved on ARM64? Particularly around the fact that the range of
j
is known. Thanks!Configuration
Regression?
Likely not