JIT: Field access of struct is not hoisted when bounds check is not eliminated #113107
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
https://godbolt.org/z/nr6zPYveW
First the case where bounds check was elided and codegen in the loop is perfect (loads are hoisted):
Now when bounds check is not elided like here:
we repeatedly load
buildData.RightCostsAccum
andbuildData.Value
inside the loop:As a workarround you can manually load the fields outside the loop.
When the fields of the struct are passed in individual registers this is not an issue.
The text was updated successfully, but these errors were encountered: