Commit ad52afd
Enable AVX512 Additional 16 SIMD Registers (#79544)
* Change regMask_enum and regMaskTP to unsigned __int64_t on AMD64.
This allows for more registers to be encoded in the register allocator.
* Add upper 16 SIMD registers to allocator.
Commit includes refactoring code to use `const instrDesc *` instead of `instruction`
so information about when EVEX is needed (due to high SIMD registers) is
available to the emitter.
* Limit high SIMD reg to compatible intrinsics lsra build.
* Limit high SIMD reg to compatible intrinsics lsra build.
* Limit high SIMD reg to compatible intrinsics and gentree nodes.
Commit constrains certain hw intrinsics and gentree nodes to use
lower SIMD registers even if upper SIMD registers are available due
to limitations of EVEX encoding for certain instructions.
For example, SSE `Reciprocal` lowers to `rcpps` which does not have an
EVEX encoding form, hence, we cannot allow that hw intrincis node to use
a high SIMD register.
These intrinsics are marked with `HW_Flag_NoEvexSemantics`. Other such
intructions related to masking (typically marked with
`HW_Flag_ReturnsPerElementMask`) also have similar issues (though they
can be replaced with the EVEX k registers and associated masking when
implemented).
In addition, the callee/calleer save registers have also been adjusted
to properly handle the presence and absence of AVX512 upper simd
registers at runtime.
* Fix for X86 throughput.
* Add upper simd stress test to the AVX512 testing pipeline.
* Formatting.
* Fix wrong-sized attr for simd mov instruction.
* Fix non-AMD64 LSRA stress mask.
* Update src/coreclr/jit/compiler.h
Co-authored-by: Bruce Forstall <[email protected]>
* Update src/coreclr/jit/compiler.cpp
Co-authored-by: Bruce Forstall <[email protected]>
* Update src/coreclr/jit/gentree.cpp
Co-authored-by: Bruce Forstall <[email protected]>
* Update src/coreclr/jit/hwintrinsic.h
Co-authored-by: Bruce Forstall <[email protected]>
* Update src/coreclr/jit/target.h
Co-authored-by: Bruce Forstall <[email protected]>
* Update src/coreclr/jit/emitxarch.cpp
Co-authored-by: Bruce Forstall <[email protected]>
* Remove unneeded vars
* Address PR comments.
* Allow `emitinl.h` access to the `rbm` variables.
* Replace RBM_LOWSIMD with `BuildEvexIncompatibleMask`.
* Move AVX512 dependent `targetamd.h` vars into compiler object.
* Fixing some edge cases for `targetamd.h` variables.
* Fix a merge/rebase bug.
* Update src/coreclr/jit/compiler.h
Co-authored-by: Bruce Forstall <[email protected]>
* Update src/coreclr/jit/lsra.cpp
Co-authored-by: Bruce Forstall <[email protected]>
* Update src/coreclr/jit/compiler.h
Co-authored-by: Bruce Forstall <[email protected]>
* Fix nits.
* Trying VM changes.
* VM hack.
* VM hack.
* Revert "VM hack."
This reverts commit 91cf3db.
* Adjust ACTUAL_REG_COUNT based on availability of AVX512.
* Use inline accessor functions instead of macros
Convert from macros to accessor functions for
RBM_ALLFLOAT, RBM_FLT_CALLEE_TRASH, CNT_CALLEE_TRASH_FLOAT.
Convert LSRA use of ACTUAL_REG_COUNT to AVAILABLE_REG_COUNT,
and create an accessor for that value for AMD64 as well.
* Clearifying comments.
---------
Co-authored-by: Bruce Forstall <[email protected]>
Co-authored-by: Kunal Pathak <[email protected]>1 parent 1166bba commit ad52afd
File tree
26 files changed
+1098
-525
lines changed- eng/pipelines/common/templates/runtimes
- src
- coreclr
- jit
- vm
- tests/Common
26 files changed
+1098
-525
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
| 535 | + | |
535 | 536 | | |
536 | 537 | | |
537 | 538 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
38 | 49 | | |
39 | 50 | | |
40 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3535 | 3535 | | |
3536 | 3536 | | |
3537 | 3537 | | |
3538 | | - | |
| 3538 | + | |
3539 | 3539 | | |
3540 | 3540 | | |
3541 | 3541 | | |
| |||
8358 | 8358 | | |
8359 | 8359 | | |
8360 | 8360 | | |
8361 | | - | |
| 8361 | + | |
8362 | 8362 | | |
8363 | 8363 | | |
8364 | 8364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3329 | 3329 | | |
3330 | 3330 | | |
3331 | 3331 | | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
| 3342 | + | |
| 3343 | + | |
| 3344 | + | |
| 3345 | + | |
| 3346 | + | |
| 3347 | + | |
| 3348 | + | |
| 3349 | + | |
3332 | 3350 | | |
3333 | 3351 | | |
3334 | 3352 | | |
| |||
3532 | 3550 | | |
3533 | 3551 | | |
3534 | 3552 | | |
| 3553 | + | |
| 3554 | + | |
| 3555 | + | |
| 3556 | + | |
| 3557 | + | |
| 3558 | + | |
| 3559 | + | |
| 3560 | + | |
| 3561 | + | |
| 3562 | + | |
| 3563 | + | |
| 3564 | + | |
| 3565 | + | |
| 3566 | + | |
| 3567 | + | |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
| 3572 | + | |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
| 3576 | + | |
| 3577 | + | |
| 3578 | + | |
| 3579 | + | |
| 3580 | + | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
3535 | 3584 | | |
3536 | 3585 | | |
3537 | 3586 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10453 | 10453 | | |
10454 | 10454 | | |
10455 | 10455 | | |
| 10456 | + | |
| 10457 | + | |
10456 | 10458 | | |
10457 | 10459 | | |
10458 | 10460 | | |
| |||
10727 | 10729 | | |
10728 | 10730 | | |
10729 | 10731 | | |
| 10732 | + | |
| 10733 | + | |
| 10734 | + | |
| 10735 | + | |
| 10736 | + | |
| 10737 | + | |
| 10738 | + | |
| 10739 | + | |
| 10740 | + | |
| 10741 | + | |
| 10742 | + | |
| 10743 | + | |
| 10744 | + | |
| 10745 | + | |
| 10746 | + | |
| 10747 | + | |
| 10748 | + | |
| 10749 | + | |
| 10750 | + | |
| 10751 | + | |
| 10752 | + | |
| 10753 | + | |
| 10754 | + | |
| 10755 | + | |
| 10756 | + | |
| 10757 | + | |
| 10758 | + | |
| 10759 | + | |
| 10760 | + | |
| 10761 | + | |
| 10762 | + | |
| 10763 | + | |
| 10764 | + | |
| 10765 | + | |
| 10766 | + | |
| 10767 | + | |
| 10768 | + | |
| 10769 | + | |
| 10770 | + | |
| 10771 | + | |
| 10772 | + | |
| 10773 | + | |
10730 | 10774 | | |
10731 | 10775 | | |
10732 | 10776 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
123 | 134 | | |
124 | 135 | | |
125 | 136 | | |
| |||
3226 | 3237 | | |
3227 | 3238 | | |
3228 | 3239 | | |
3229 | | - | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
3230 | 3247 | | |
3231 | 3248 | | |
3232 | 3249 | | |
3233 | 3250 | | |
| 3251 | + | |
| 3252 | + | |
3234 | 3253 | | |
3235 | 3254 | | |
3236 | 3255 | | |
| |||
3400 | 3419 | | |
3401 | 3420 | | |
3402 | 3421 | | |
| 3422 | + | |
3403 | 3423 | | |
3404 | 3424 | | |
3405 | 3425 | | |
| |||
3472 | 3492 | | |
3473 | 3493 | | |
3474 | 3494 | | |
| 3495 | + | |
3475 | 3496 | | |
3476 | 3497 | | |
3477 | 3498 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1138 | 1138 | | |
1139 | 1139 | | |
1140 | 1140 | | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1141 | 1163 | | |
1142 | 1164 | | |
1143 | 1165 | | |
| |||
1968 | 1990 | | |
1969 | 1991 | | |
1970 | 1992 | | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
1971 | 1998 | | |
1972 | 1999 | | |
1973 | 2000 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | 214 | | |
216 | 215 | | |
217 | | - | |
218 | | - | |
219 | 216 | | |
220 | 217 | | |
221 | 218 | | |
| |||
0 commit comments