Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat System.Runtime.CompilerServices.Unsafe as intrinsic (#68739)
* Treat System.Runtime.CompilerServices.Unsafe as intrinsic * Remove duplicated logic from Get_CORINFO_SIG_INFO * Don't create a multiply node if the size is 1 * Remove unnecessary impBashVarAddrsToI calls over gtNewIconNode * Use `#ifdef TARGET_64BIT` rather than `#if (REGSIZE_BYTES == 8)` * Don't unnecessarily call `genActualType(TYP_U_IMPL)`, just use `TYP_I_IMPL` directly * Only insert casts for `TYP_INT` to `TYP_I_IMPL` or `TYP_U_IMPL` on 64-bit * Have Unsafe.SkipInit create a `GT_NO_OP` node * Have Unsafe.Subtract and Unsafe.SubtractByteOffset be intrinsic * Adding a couple `CLANG_FORMAT_COMMENT_ANCHOR;` to comments that precede an `#ifdef` * Applying formatting patch * Revert "Have Unsafe.Subtract and Unsafe.SubtractByteOffset be intrinsic" This reverts commit 2301adc. * Fixing the operand evaluation order for NI_SRCS_UNSAFE_Add * Fixing the operand evaluation order for NI_SRCS_UNSAFE_ByteOffset * Implement NI_SRCS_UNSAFE_SubtractByteOffset * Fix the build failure * Ensure impImplicitIorI4Cast is called on op2 for NI_SRCS_UNSAFE_Add * Don't declare a `tmp` in NI_SRCS_UNSAFE_Add to make the logic clearer * Have NI_SRCS_UNSAFE_SkipInit return gtNewNothingNode * Handle side effects for NI_SRCS_UNSAFE_SkipInit * Revert "Implement NI_SRCS_UNSAFE_SubtractByteOffset" This reverts commit 7166b2e. * Manually simplify some of the NI_SRCS_* import logic * Ensure NI_SRCS_SkipInit returns the unused node when its side-effecting * Remove unnecessary comment anchors * Applying formatting patch * Try to workaround the JIT issue by spilling op1/op2 for Unsafe.Add * Apply formatting patch * Revert "Try to workaround the JIT issue by spilling op1/op2 for Unsafe.Add" * Have Unsafe.Subtract and Unsafe.SubtractByteOffset be intrinsic This reverts commit 982660e.
- Loading branch information