-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JIT does not recognize typeof(X) == o.GetType() checks as intrinsics with R2R #97134
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsRepro: !!! Actual result:
Expected result
Optimized JIT code:
Optimized R2R code:
|
Interesting, doesn't repro for me if I set |
the issue is that that |
I assume that you meant
|
The approximation of isExactType from class flags had false positives (correctness) and false negatives issues. Converting it to JIT/EE interface method fixes them both. Fixes dotnet#97134
* Convert isExactType check to JIT/EE interface call The approximation of isExactType from class flags had false positives (correctness) and false negatives issues. Converting it to JIT/EE interface method fixes them both. Fixes #97134 * Add test * Delete canInlineTypeCheck JIT/EE interface method All implementations return the same constant. Unlikely to be needed again.
Repro:
Actual result:
foo<__Canon>
is optimized to return constant for JIT, but does full type check for R2R.Expected result
foo<__Canon>
is optimized to return constant for both JIT and R2R.Optimized JIT code:
Optimized R2R code:
The text was updated successfully, but these errors were encountered: