Skip to content

Commit

Permalink
Fixing the operand evaluation order for NI_SRCS_UNSAFE_Add
Browse files Browse the repository at this point in the history
  • Loading branch information
tannergooding committed May 2, 2022
1 parent 982660e commit a933fec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4834,8 +4834,8 @@ GenTree* Compiler::impSRCSUnsafeIntrinsic(NamedIntrinsic intrinsic,
tmp = op2;
}

type = impGetByRefResultType(GT_ADD, /* uns */ false, &tmp, &op1);
return gtNewOperNode(GT_ADD, type, tmp, op1);
type = impGetByRefResultType(GT_ADD, /* uns */ false, &op1, &tmp);
return gtNewOperNode(GT_ADD, type, op1, tmp);
}

case NI_SRCS_UNSAFE_AddByteOffset:
Expand Down

0 comments on commit a933fec

Please sign in to comment.