Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update helperexpansion.cpp
  • Loading branch information
EgorBo authored Jan 20, 2024
commit e39a62bd78857c91003295be30d709017cf5e7c3
2 changes: 1 addition & 1 deletion src/coreclr/jit/helperexpansion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2004,7 +2004,7 @@ bool Compiler::fgLateCastExpansionForCall(BasicBlock** pBlock, Statement* stmt,
return false;
}

if ((castResult == TypeCompareState::MustNot) && isInstanceOf)
if ((castResult == TypeCompareState::MustNot) && !isInstanceOf)
{
// Don't expand castclass if likelyclass always fails the type check
// it's going to throw an exception anyway.
Expand Down