JIT: IV opts relop evaluation misses combining facts to prove relops #110315
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
in-pr
There is an active PR which will close this issue when it is merged
Milestone
I collected some stats for #110222 to figure out where strength reduction bails out.
Those stats looks like:
For
CouldNotInitializeCursors
the reason is often that we fail to compute the trip count of the loop, in which case the IV use in the loop test disqualifies the loop from strength reduction. I looked at one such case,System.Reflection.Internal.EncodingHelper:DecodeUtf8
, in libraries_tests.run. There we are unable to prove that the loop bound is at least 1:It turns out this is implied by the combination of facts from two dominating compares:
However, RBO is not able to combine these two facts to prove the
1 <= V20.1
. OTOH, range check actually eliminates bounds checks based on the combination of these two facts in this method, so we can likely use assertions or range check directly in addition to RBO to prove it.The text was updated successfully, but these errors were encountered: