Skip to content

Commit

Permalink
Fix an assert with Unsafe.Subtract
Browse files Browse the repository at this point in the history
Found in dotnet#99011.
  • Loading branch information
MichalPetryka committed Feb 27, 2024
1 parent d06ebfe commit a1684da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coreclr/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9241,7 +9241,7 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac, bool* optA
noway_assert(op1);
if (op1->IsCnsIntOrI())
{
noway_assert(varTypeIsIntOrI(tree));
noway_assert(varTypeIsIntegralOrI(tree));

// The type of the new GT_NEG node cannot just be op2->TypeGet().
// Otherwise we may sign-extend incorrectly in cases where the GT_NEG
Expand Down

0 comments on commit a1684da

Please sign in to comment.