Commit 9fe86ca
authored
Arm64 SVE: Optimise zero/allbits vectors the same as masks (dotnet#115566)
* Arm64 SVE: Better optimise zero/allbits vectors
Fixes dotnet#114443
* IsVectorZero() should allow for all zero vectors and false masks that have been converted to vectors.
* IsVectorAllBitsSet() should allow for all bits set vectors and true masks that have been converted to vectors.
* IsMaskZero() should all for false masks and all zero vectors that have been converted to masks.
* IsMaskAllBitsSet() should allow for true masks and all bit set vectors that have been converted to masks.
In addition:
* Fix up all the errors caused by these changes.
* Add a bunch of asmcheck tests
* Remove all jit changes
* Import constant vector 0 for createfalsemask
* fix up tests
* Only allow zero op3 contains for embedded ops
* fix up tests
* fix formatting
* Import constant vector all bits set for createtruemask
* Fix up tests
* fix type of true mask variants
* Allow common code to create the convert for CreateTrueMask*
* Fix x86 build
* unique test names in templates
* simpler lowering
* Don't remove embedded ops that may throw
* Clear embOp when clearing contained
* Import masks as gtNewVconNode
* Remove pRetType
* Add nullptr check
* Add AOT TODO
* Add codegen support for CNS_MASK
* Add const vector folding for Arm64
* Add mask patterns
* Move tests to SVE
* Add isTrueMask()
Change-Id: I456498f06d454e6ed57ce935e195b721e2c6d225
* fix tests
Change-Id: I3d74a7292e2c880fcaba215dc1fb58369e4ad141
* fix formatting
* Add EvaluateSimdPatternToMask
* import vectors not masks
* rename to EvaluateSimdMaskToPattern
* Add unreached
* formatting
* fix IsTrueMask
* remove emb op fix
* fix morphing errors
* Remove NI_Sve_CreateFalseMaskAll
* rename TrueMaskAll to ConversionTrueMask and only use as such
* remove gtNewSimdCnsVecTrueMaskPattern
* Switch gtNewSimdAllTrueMaskNode to create constant mask
* fix tests
* FEATURE_HW_INTRINSICS checks
* formatting
* fix gtFoldExprConvertVecCnsToMask call
* move gtFoldExprConvertVecCnsToMask call
* Allow for masks being input to mask nodes
* use IsFalseMask everywhere
* Add simdSize to GenTreeMskCon
* Use simdSize in GenTreeMskCon
* cndsel op3 is a vector
* use unsigned instead of unsigned char
* Fix HasDisasmCheck
* Hardcode mask simd size to 16
* formatting
* remove TODO
* Use simdBaseType for IsTrueMask arg
* Add asserts to gtFoldExprHWIntrinsic
* Simplify IsFalseMask
* inline IsTrueMask/IsFalseMask
* Use LABELEDDISPTREERANGE
* Add header to gtFoldExprConvertVecCnsToMask
* Remove FEATURE_HW_INTRINSICS around IsTrueMask/IsFalseMask
* turn off fgMorphTryUseAllMaskVariant1 parent 5951ad2 commit 9fe86ca
File tree
18 files changed
+1216
-172
lines changed- src
- coreclr/jit
- tests/JIT
- opt/SVE
18 files changed
+1216
-172
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2338 | 2338 | | |
2339 | 2339 | | |
2340 | 2340 | | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
2341 | 2385 | | |
2342 | 2386 | | |
2343 | 2387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3146 | 3146 | | |
3147 | 3147 | | |
3148 | 3148 | | |
3149 | | - | |
3150 | | - | |
| 3149 | + | |
| 3150 | + | |
3151 | 3151 | | |
3152 | 3152 | | |
3153 | 3153 | | |
| |||
3715 | 3715 | | |
3716 | 3716 | | |
3717 | 3717 | | |
| 3718 | + | |
3718 | 3719 | | |
3719 | 3720 | | |
3720 | 3721 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21959 | 21959 | | |
21960 | 21960 | | |
21961 | 21961 | | |
21962 | | - | |
21963 | | - | |
| 21962 | + | |
| 21963 | + | |
21964 | 21964 | | |
21965 | 21965 | | |
21966 | 21966 | | |
| |||
31683 | 31683 | | |
31684 | 31684 | | |
31685 | 31685 | | |
| 31686 | + | |
31686 | 31687 | | |
31687 | 31688 | | |
31688 | 31689 | | |
| |||
31715 | 31716 | | |
31716 | 31717 | | |
31717 | 31718 | | |
| 31719 | + | |
31718 | 31720 | | |
31719 | 31721 | | |
31720 | 31722 | | |
| |||
31723 | 31725 | | |
31724 | 31726 | | |
31725 | 31727 | | |
31726 | | - | |
31727 | | - | |
31728 | | - | |
31729 | | - | |
31730 | | - | |
| 31728 | + | |
| 31729 | + | |
| 31730 | + | |
31731 | 31731 | | |
31732 | 31732 | | |
31733 | 31733 | | |
| |||
31813 | 31813 | | |
31814 | 31814 | | |
31815 | 31815 | | |
| 31816 | + | |
31816 | 31817 | | |
31817 | 31818 | | |
31818 | | - | |
31819 | | - | |
31820 | | - | |
31821 | | - | |
31822 | | - | |
31823 | | - | |
31824 | | - | |
31825 | | - | |
31826 | | - | |
31827 | | - | |
31828 | | - | |
31829 | | - | |
31830 | | - | |
31831 | | - | |
31832 | | - | |
31833 | | - | |
31834 | | - | |
31835 | | - | |
31836 | | - | |
31837 | | - | |
31838 | | - | |
31839 | | - | |
31840 | | - | |
31841 | | - | |
31842 | | - | |
31843 | | - | |
31844 | | - | |
31845 | | - | |
31846 | | - | |
31847 | | - | |
31848 | | - | |
31849 | | - | |
31850 | | - | |
31851 | | - | |
31852 | | - | |
31853 | | - | |
31854 | | - | |
31855 | | - | |
31856 | | - | |
31857 | | - | |
31858 | | - | |
31859 | | - | |
31860 | | - | |
31861 | | - | |
| 31819 | + | |
31862 | 31820 | | |
| 31821 | + | |
31863 | 31822 | | |
31864 | 31823 | | |
31865 | 31824 | | |
| |||
32702 | 32661 | | |
32703 | 32662 | | |
32704 | 32663 | | |
| 32664 | + | |
| 32665 | + | |
| 32666 | + | |
| 32667 | + | |
32705 | 32668 | | |
32706 | 32669 | | |
32707 | 32670 | | |
| |||
32843 | 32806 | | |
32844 | 32807 | | |
32845 | 32808 | | |
32846 | | - | |
| 32809 | + | |
| 32810 | + | |
| 32811 | + | |
| 32812 | + | |
| 32813 | + | |
| 32814 | + | |
| 32815 | + | |
| 32816 | + | |
| 32817 | + | |
| 32818 | + | |
| 32819 | + | |
| 32820 | + | |
32847 | 32821 | | |
32848 | 32822 | | |
32849 | 32823 | | |
| |||
32857 | 32831 | | |
32858 | 32832 | | |
32859 | 32833 | | |
32860 | | - | |
| 32834 | + | |
32861 | 32835 | | |
32862 | 32836 | | |
32863 | 32837 | | |
| |||
32909 | 32883 | | |
32910 | 32884 | | |
32911 | 32885 | | |
| 32886 | + | |
| 32887 | + | |
| 32888 | + | |
| 32889 | + | |
| 32890 | + | |
| 32891 | + | |
| 32892 | + | |
| 32893 | + | |
| 32894 | + | |
| 32895 | + | |
| 32896 | + | |
| 32897 | + | |
| 32898 | + | |
| 32899 | + | |
| 32900 | + | |
| 32901 | + | |
| 32902 | + | |
| 32903 | + | |
| 32904 | + | |
| 32905 | + | |
| 32906 | + | |
| 32907 | + | |
| 32908 | + | |
| 32909 | + | |
| 32910 | + | |
| 32911 | + | |
| 32912 | + | |
| 32913 | + | |
| 32914 | + | |
| 32915 | + | |
| 32916 | + | |
| 32917 | + | |
| 32918 | + | |
| 32919 | + | |
| 32920 | + | |
| 32921 | + | |
| 32922 | + | |
| 32923 | + | |
| 32924 | + | |
| 32925 | + | |
| 32926 | + | |
| 32927 | + | |
| 32928 | + | |
| 32929 | + | |
| 32930 | + | |
| 32931 | + | |
| 32932 | + | |
| 32933 | + | |
| 32934 | + | |
| 32935 | + | |
| 32936 | + | |
| 32937 | + | |
| 32938 | + | |
| 32939 | + | |
| 32940 | + | |
| 32941 | + | |
| 32942 | + | |
| 32943 | + | |
| 32944 | + | |
| 32945 | + | |
| 32946 | + | |
| 32947 | + | |
| 32948 | + | |
| 32949 | + | |
32912 | 32950 | | |
32913 | 32951 | | |
32914 | 32952 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1802 | 1802 | | |
1803 | 1803 | | |
1804 | 1804 | | |
1805 | | - | |
1806 | | - | |
| 1805 | + | |
| 1806 | + | |
1807 | 1807 | | |
1808 | 1808 | | |
1809 | 1809 | | |
| |||
9550 | 9550 | | |
9551 | 9551 | | |
9552 | 9552 | | |
9553 | | - | |
| 9553 | + | |
| 9554 | + | |
| 9555 | + | |
| 9556 | + | |
| 9557 | + | |
| 9558 | + | |
| 9559 | + | |
| 9560 | + | |
| 9561 | + | |
| 9562 | + | |
| 9563 | + | |
| 9564 | + | |
| 9565 | + | |
9554 | 9566 | | |
9555 | 9567 | | |
9556 | | - | |
9557 | | - | |
9558 | | - | |
9559 | | - | |
9560 | | - | |
| 9568 | + | |
9561 | 9569 | | |
9562 | | - | |
| 9570 | + | |
9563 | 9571 | | |
9564 | | - | |
9565 | | - | |
9566 | | - | |
9567 | | - | |
9568 | | - | |
9569 | | - | |
9570 | | - | |
9571 | | - | |
9572 | | - | |
| 9572 | + | |
9573 | 9573 | | |
9574 | | - | |
9575 | 9574 | | |
| 9575 | + | |
9576 | 9576 | | |
9577 | 9577 | | |
9578 | 9578 | | |
9579 | | - | |
| 9579 | + | |
| 9580 | + | |
| 9581 | + | |
| 9582 | + | |
| 9583 | + | |
| 9584 | + | |
9580 | 9585 | | |
9581 | 9586 | | |
9582 | | - | |
9583 | | - | |
9584 | | - | |
9585 | | - | |
9586 | | - | |
9587 | | - | |
9588 | | - | |
| 9587 | + | |
9589 | 9588 | | |
9590 | | - | |
9591 | | - | |
9592 | | - | |
9593 | | - | |
9594 | | - | |
9595 | | - | |
9596 | | - | |
9597 | | - | |
| 9589 | + | |
9598 | 9590 | | |
9599 | | - | |
9600 | 9591 | | |
| 9592 | + | |
9601 | 9593 | | |
9602 | 9594 | | |
9603 | 9595 | | |
| |||
0 commit comments