Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Resolving the remaining HWIntrinsics issues blocking PMI for S.P.CoreLib #19247

Merged
merged 1 commit into from
Aug 2, 2018
Merged

Conversation

tannergooding
Copy link
Member

@tannergooding
Copy link
Member Author

CC. @AndyAyersMS, @CarolEidt, @fiigii, @eerhardt

@@ -212,7 +212,7 @@ HARDWARE_INTRINSIC(SSE2_Or, "Or",
HARDWARE_INTRINSIC(SSE2_PackSignedSaturate, "PackSignedSaturate", SSE2, -1, 16, 2, {INS_invalid, INS_invalid, INS_packsswb, INS_invalid, INS_packssdw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg)
HARDWARE_INTRINSIC(SSE2_PackUnsignedSaturate, "PackUnsignedSaturate", SSE2, -1, 16, 2, {INS_invalid, INS_invalid, INS_packuswb, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg)
HARDWARE_INTRINSIC(SSE2_SetScalarVector128, "SetScalarVector128", SSE2, -1, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movsdsse2}, HW_Category_Helper, HW_Flag_NoContainment|HW_Flag_MultiIns|HW_Flag_NoRMWSemantics)
HARDWARE_INTRINSIC(SSE2_SetZeroVector128, "SetZeroVector128", SSE2, -1, 16, 0, {INS_pxor, INS_pxor, INS_pxor, INS_pxor, INS_pxor, INS_pxor, INS_pxor, INS_pxor, INS_invalid, INS_xorpd}, HW_Category_Helper, HW_Flag_NoContainment)
HARDWARE_INTRINSIC(SSE2_SetZeroVector128, "SetZeroVector128", SSE2, -1, 16, 0, {INS_pxor, INS_pxor, INS_pxor, INS_pxor, INS_pxor, INS_pxor, INS_pxor, INS_pxor, INS_xorps, INS_xorpd}, HW_Category_Helper, HW_Flag_OneTypeGeneric|HW_Flag_NoContainment)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is generic and needs the HW_Flag_OneTypeGeneric flag.

Since it is generic, and we have not yet determined how we want to expose SetZeroVector128 (explode it with a modified name, expose it on Sse, or just handle new Vector128<T>() properly), I've ensured that TYP_FLOAT is handled to unblock PMI and so that we no longer assert for this code path.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how we want to expose SetZeroVector128

Since we have changed all ISA classes to the inheriti hierarchy, "expose it on Sse" would be the best solution.

@@ -440,7 +440,7 @@ HARDWARE_INTRINSIC(AVX2_Min, "Min",
HARDWARE_INTRINSIC(AVX2_MoveMask, "MoveMask", AVX2, -1, 32, 1, {INS_pmovmskb, INS_pmovmskb, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg)
HARDWARE_INTRINSIC(AVX2_Multiply, "Multiply", AVX2, -1, 32, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_pmuldq, INS_pmuludq, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative)
HARDWARE_INTRINSIC(AVX2_Or, "Or", AVX2, -1, 32, 2, {INS_por, INS_por, INS_por, INS_por, INS_por, INS_por, INS_por, INS_por, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative)
HARDWARE_INTRINSIC(AVX2_Permute2x128, "Permute2x128", AVX2, -1, 32, 3, {INS_vperm2i128, INS_vperm2i128, INS_vperm2i128, INS_vperm2i128, INS_vperm2i128, INS_vperm2i128, INS_vperm2i128, INS_vperm2i128, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_OneTypeGeneric|HW_Flag_FullRangeIMM)
HARDWARE_INTRINSIC(AVX2_Permute2x128, "Permute2x128", AVX2, -1, 32, 3, {INS_vperm2i128, INS_vperm2i128, INS_vperm2i128, INS_vperm2i128, INS_vperm2i128, INS_vperm2i128, INS_vperm2i128, INS_vperm2i128, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_FullRangeIMM)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlike AVX_Permute2x128, this one is not generic and is exploded. It explicitly supports the 8 integer types.

@tannergooding
Copy link
Member Author

@AndyAyersMS, running pmi against S.P.CoreLib completed successfully, for me, with this change:

> dotnet.exe D:\repos\jitutils\bin\jit-diff.dll diff --base --base_root D:\repos\coreclr --pmi
Using --output D:\repos\coreclr\bin\diffs
Using --base D:\repos\coreclr\bin\Product\Windows_NT.x64.Checked
Using --arch x64
Using --core_root D:\repos\coreclr\bin\tests\Windows_NT.x64.Checked\Tests\Core_Root

Warning: it is best practice to use a Release build for --core_root, --crossgen, and --test_root.

No assemblies specified; defaulting to corelib
Beginning PMI Diffs for System.Private.CoreLib.dll
| Finished 1/1 Base 0/0 Diff [75.1 sec]
Completed PMI Diffs for System.Private.CoreLib.dll in 75.16s
Diffs (if any) can be viewed by comparing: D:\repos\coreclr\bin\diffs\dasmset_6\base D:\repos\coreclr\bin\diffs\dasmset_6\diff

Copy link

@CarolEidt CarolEidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks... Hope to get a PMI job into CI in the not too distant future.

@tannergooding tannergooding merged commit aff7dff into dotnet:master Aug 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JIT: assert compiling System.Runtime.Intrinsics.X86.Avx:TestC via PMI
4 participants