Array indices reuse preventing array simplification #6419
Labels
Core: HLIL
Issue involves High Level IL
Effort: Medium
Issue should take < 1 month
Impact: Medium
Issue is impactful with a bad, or no, workaround
Bug Description:
It appears if the array index is reused in another block (or perhaps even the same block) that the array access is not shown (i.e.
array[idx]
). This is because the current array simplification occurs on a simple expression, and to get that expression (i.e.&array + idx
) we must have folded in the index, a reuse of the array index would likely prevent that fold from occurring.Expected Behavior:
There are a few solutions:
Screenshots/Video Recording:
Working:

Broken:

As you can see there is no reuse of the array index (the highlighted token) in the working sample, but there is in the broken sample.
Binary
array_simpl.zip
The text was updated successfully, but these errors were encountered: