[release/6.0-rc1] JIT: don't clone loops where init or limit is a cast local (#57690)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Thu, 19 Aug 2021 14:20:47 +0000 (07:20 -0700)
committerGitHub <noreply@github.com>
Thu, 19 Aug 2021 14:20:47 +0000 (07:20 -0700)
commit3d5987f465e81c6055c08db20ded2b9db28ab2c2
treefa9270ca2d8308a187e33be4b5fcbb8f7ed8cdca
parent3d39a3771be62692da95eee12b826530a61e3ca7
[release/6.0-rc1] JIT: don't clone loops where init or limit is a cast local (#57690)

* JIT: don't clone loops where init or limit is a cast local

The loop cloner assumes all computations it introduces are compatible
with TYP_INT, so don't allow cloning when the initial or final value
are variables with incompatible types.

Fixes #57535.

* Apply suggestions from code review

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Co-authored-by: Andy Ayers <andya@microsoft.com>
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
src/coreclr/jit/loopcloning.cpp
src/tests/JIT/Regression/JitBlue/Runtime_57535/Runtime_57535.cs [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_57535/Runtime_57535.csproj [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_57535/Runtime_57535_1.cs [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_57535/Runtime_57535_1.csproj [new file with mode: 0644]