summaryrefslogtreecommitdiff
path: root/tests/src/JIT
AgeCommit message (Collapse)AuthorFilesLines
2019-05-02System.GC.AllocateUninitializedArray (#24096)Vladimir Sadov1-1/+1
* Do not expand to allocation_quantum in SOH when GC_ALLOC_ZEROING_OPTIONAL * short-circuit short arrays to use `new T[size]` * Clean syncblock of large-aligned objects on ARM32 * specialize single-dimensional path AllocateSzArray * Unit tests * Some PR feedback. Made AllocateUninitializedArray not be trimmed away. * PR feedback on gchelpers - replaced use of multiple bool parameters with flags enum - merged some methods with nearly identical implementation - switched callers to use AllocateSzArray vs. AllocateArrayEx where appropriate. * PR feedback. Removed X86 specific array/string allocation helpers.
2019-05-02Changes from code reviewBrian Sullivan3-16/+10
2019-05-02Add a repro test.Sergey Andreenko2-0/+83
2019-05-02When QuickJit is enabled, disable it for methods that contain loops by ↵Koundinya Veluri2-0/+135
default (#24252) When QuickJit is enabled, disable it for methods that contain loops by default Fixes https://github.com/dotnet/coreclr/issues/19751 by default when QuickJit is enabled - Added config variable TC_QuickJitForLoops. When disabled (the default), the JIT identifies loops and explicit tail calls and switches to tier 1 JIT. - This would prevent the possibility of spending too long in QuickJit code, but may decrease startup time a bit when QuickJit is enabled - Removed TC_StartupTier_OptimizeCode, as now that there is TC_QuickJit, I didn't see a good use for it - Removed references to "StartupTier" in config variables because we had previously decided not to call it that. - When QuickJit is disabled, avoid creating native code slots for methods in non-R2R'ed modules, as tiering would be disabled for those anyway - Marked TC_QuickJit config var as external
2019-05-02Adding more coverage for the AES hwintrinsic tests. (#24335)Tanner Gooding9-54/+1108
* Updating the AES tests to cover all current scenarios * Regenerating the AES HWIntrinsic tests from the updated templates. * Fixing a couple of typos in the Aes*OpTest.templates * Modifying CodeGen::inst_RV_TT_IV to no longer assert when memIndir is nullptr
2019-05-01Add two additional HVA tests:Brian Sullivan6-0/+2328
VectorMgdMgdStatic.cs - Tests where we are passing and using a HVA that is stored in a static VectorMgdMgdArray.cs - Tests where we are passing and using a HVA that is stored in an array
2019-04-29Resolves an assert around Sse41.ConvertToVector128Int* and ↵Tanner Gooding24-0/+672
Avx2.ConvertToVector256Int* (#24289) * Adding tests for the overloads of Sse41.ConvertToVector128Int* and Avx2.ConvertToVector256Int* that take a pointer * Fixing the handling of Sse41.ConvertToVector128* and Avx2.ConvertToVector256*
2019-04-29Merge pull request #24282 from erozenfeld/Fix24253Eugene Rozenfeld2-0/+90
Fix for a jit liveness bug.
2019-04-27Merge pull request #24261 from sandreenko/fixRegressionCoreFXx86Sergey Andreenko2-0/+69
Fix optAssertionProp_Update.
2019-04-26Fix for a jit liveness bug.Eugene Rozenfeld2-0/+90
`fgRemoveDeadStore` has special logic for removing dead assignments whose rhs was of type `TYP_STRUCT`: https://github.com/dotnet/coreclr/blob/311b5e2fe413c6c74a2a3680ab54d8a978651472/src/jit/liveness.cpp#L2264-L2274 That logic was applied to "normal" assignments (i.e., direct children of `GT_STMT`) but not to "internal" assignments (e.g., children of `GT_COMMA`). The test case has an internal assignment and, because this logic wasn't applied, we ended up with a standalone `GT_IND` of type `TYP_STRUCT` that the register allocator can't handle. This change apples the missing logic to "internal" assignments. Fixes #24253.
2019-04-25Add a repro test.Sergey Andreenko2-0/+69
2019-04-24Disable _il_dbgu_fld under GCStress against #24173Bruce Forstall1-1/+4
2019-04-22Merge pull request #24174 from BruceForstall/Fix24172Bruce Forstall1-1/+2
Disable _il_relthread-race test under GCStress
2019-04-22Disable _il_relthread-race test under GCStressBruce Forstall1-1/+2
It takes too long, and times out in CI. Fixes #24172
2019-04-22Fix Arm64 UpperVector save/restore (#24043)Carol Eidt2-0/+138
* Fix Arm64 UpperVector save/restore Change the general handling of end-of-block restores so that we always have a RefPosition on which to allocate the register needed on Arm64. Fix #23885
2019-04-20Merge pull request #24131 from sandreenko/addAReproTestSergey Andreenko2-0/+67
Add a repro test for #24114.
2019-04-19Pulling in CoreFX changes and fixing up Sse2.StoreLow to be Sse2.StoreScalar ↵Tanner Gooding2-34/+34
(#24123) * Update dependencies from https://github.com/dotnet/corefx build 20190419.5 - Microsoft.NETCore.Platforms - 3.0.0-preview5.19219.5 - Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview5.19219.5 * Removing the Sse2.StoreLow(long/ulong*, ...) methods that have been replaced * Moving the Sse2.StoreLow(long/ulong*, ...) tests to be Sse2.StoreScalar tests * Fixing some existing usages of Sse2.StoreLow(long/ulong*, ...)
2019-04-19Add a repro test.Sergey Andreenko2-0/+67
2019-04-19Fix project metadata in test (#24119)Fadi Hanna1-1/+18
* Fix project metadata in test
2019-04-18Fix RVA field placement order (#24047)Fadi Hanna2-0/+179
* Static RVA fields should be placed sequentially after the qsort operation to not break Managed C++ binaries in R2R * Add regression test
2019-04-17JIT: ignore pinning of non-gc types (#24010)Andy Ayers3-0/+78
We may see pin modifiers on locals that are not gc types. Ignore these modifiers. Closes #23950. Also added a missing copyright header on an unrelated test.
2019-04-17Restrict morph add rearrangement. (#23984)Eugene Rozenfeld2-0/+200
Morph has transformations ((x + const) + y) => ((x + y) + const) and ((x + const1) + (y + const2)) => ((x + y) + (const1 + const2)) If x or y is a GC pointer and one of the int operands may be negative, this may result in a byref temp that points outside of the ref object. If the code is in a non-interruptible region and a GC happens, the byref won't be updated. This change disallows the transformations if one of the non-const operands is a GC pointer. Fixes #23792.
2019-04-17Add lvIsImplicitByRef information to lvaSetStruct (#19223)Jarret Shook1-10/+0
Before implicit byrefs were tracked by setting lvIsParam and lvIsTemp. This change explicitly adds a flag for implicitByRef instead of overloading. In addition, it fixes the decision to copy an implicitByRef for arm64 varargs. Temporarily bump weight on byref params to match old behavior and avoid codegen diffs. Re-enabled various tests and parts of tests. Closes #20046 Closes #19860
2019-04-17Update the types consumers of Index and Range (#24036)Tarek Mahmoud Sayed2-78/+0
* Update the types consumers of Index and Range The C# compiler now can automatically support the indexers with Index and Range parameters on any type meet the conditions: - The type exposes Length or Count property which returning integer. - The type has indexer of integer parameter. - The type has a Slice method which takes 2 integers The change here is to remove the methods and indexers of the types which we previously added it as the compiler will automatically provide those. * Remove the JIT failing test
2019-04-16Merge pull request #24037 from BruceForstall/ReduceStackRequirementBruce Forstall1-1/+1
Reduce stack requirements of test
2019-04-16Reduce stack requirements of testBruce Forstall1-1/+1
Fixes #24021
2019-04-16Arm64 vector ABI (#23675)Carol Eidt1-4/+0
* Support for Arm64 Vector ABI Extend HFA support to support vectors as well as floating point types. This requires that the JIT recognize vector types even during crossgen, so that the ABI is supported consistently. Also, fix and re-enable the disabled Arm64 Simd tests. Fix #16022
2019-04-15Fix test for 64-bit platformsBruce Forstall1-1/+1
Object type in structs apparently must be 8 byte aligned. Fixes #23986
2019-04-13Fix ARM's genPutArgStk codegen (#23867)mikedn2-0/+75
* Fix ARM's genPutArgStk codegen When the OBJ node wraps a LCL_VAR node the code uses the type information (struct size, GC layout) from LclVarDsc. This is not always correct because the OBJ may actually have a different struct type due to type reinterpretation (e.g. Unsafe.As<X, Y>). * Fix genPutArgStk comment
2019-04-12Fix x86 stack probing (#23881)Bruce Forstall7-0/+353
* Fix x86 stack probing On x86, structs are passed by value on the stack. We copy structs to the stack in various ways, but one way is to first subtract the size of the struct and then use a "rep movsb" instruction. If the struct we are passing is sufficiently large, this can cause us to miss the stack guard page. So, introduce stack probes for these struct copies. It turns out the stack pointer after prolog probing can be sitting near the very end of the guard page (one `STACK_ALIGN` slot before the end, which allows a "call" instruction which pushes its return address to touch the guard page with the return address push). We don't want to probe with every argument push, though. So change the prolog probing to insert an "extra" touch at the final SP location if the previous touch was "too far" away, leaving at least some buffer zone for un-probed SP adjustments. I chose this to be the size of the largest SIMD register, which also can get copied to the argument stack with a "SUB;MOV" sequence. Added several test case variations showing different large stack probe situations. Fixes #23796 * Increase the argument size probe buffer * Formatting
2019-04-12[master] Update dependencies from dotnet/corefx (#23893)dotnet-maestro[bot]72-1662/+1662
* Update dependencies from https://github.com/dotnet/corefx build 20190411.2 - Microsoft.NETCore.Platforms - 3.0.0-preview5.19211.2 - Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview5.19211.2 * Update dependencies from https://github.com/dotnet/corefx build 20190411.22 - Microsoft.NETCore.Platforms - 3.0.0-preview5.19211.22 - Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview5.19211.22 * Removing renamed HWIntrinsic APIs from S.P.Corelib * Updating the hwintrinsiclistxarch to match the new intrinsic API names * Updating the HWIntrinsic generated tests to use the new API names
2019-04-12Don't Free UpperVector (#23889)Carol Eidt2-0/+103
* Don't Free UpperVector UpperVector regs are freed at their time of use, and shouldn't be freed when the last RefPosition is encountered. Also, we need to specify all 3 operands for vinsertf128 Fix #23861 Fix #23904 Fix #23804
2019-04-12JIT: update byref null check logic to handle field chains (#23850)Andy Ayers2-0/+75
The jit was not properly accumulating offsets when figuring out if a byref should be null checked. Use a non-null MorphAddressContext as indication that GT_FIELD and GT_IND nodes are actually part of an ongoing address computation. During field morphing propagate the current address context to the child node, instead of starting a new one. Fixes #23791.
2019-04-11JIT: fix assert when there are mixed types in Enum.HasFlags optimization ↵Andy Ayers2-2/+24
(#23902) In some cases the pre-boxed nodes may differ in type. Bail if they don't have the same stack type, then compute the result using the stack type. Extended the hasflags test with a case that shows this issue. Closes #23847
2019-04-08Merge pull request #23739 from briansull/struct-cseBrian Sullivan2-0/+230
Block the hoisting of TYP_STRUCT rvalues in loop hoisting
2019-04-08Block the hoisting of TYP_STRUCT rvalues in loop hoistingBrian Sullivan2-0/+230
Added test case GitHub_23739.cs
2019-04-05WIP Fix ARM32/ARM64 large frame stack probingBruce Forstall6-0/+587
2019-04-04Improve Upper Vector Save/Restore (#23344)Carol Eidt2-0/+132
Improve Upper Vector Save/Restore In order to avoid saving and restore the upper half of large vectors around every call even if they are not used, separately model the upper half of large vector lclVars, and track whether the large vector lclVar is partially-spilled, in which case its upper half resides in its upper half Interval's location. Fix #18144
2019-04-03Fix interop test cases to pass doubles for native varargs. (#23690)Andy Ayers4-98/+98
Remove these tests from the windows exclude list. Also move one other exclude entry from its own section into the general exclude list. Closes #22974
2019-04-02Updating the HWIntrinsic x86 codegen to handle indir nodes. (#23629)Tanner Gooding338-0/+40560
* Updating the SimpleBinOpTest.template to cover some additional containment scenarios * Regenerating the x86 HWIntrinsic tests from their templates * Updating the HWIntrinsic x86 codegen to handle indir nodes.
2019-04-02Fix spill check for struct lclVars (#23570)Carol Eidt2-0/+67
* Fix spill check for struct lclVars With the 1st class struct changes, the `SPILL_APPEND` check for the case of an assignment to a lclVar needs to handle block ops as well as lclVar lhs. Fix #23545
2019-03-29Fix HW intrinsic containment bugs (#23558)Carol Eidt2-0/+68
* Fix HW intrinsic containment bugs For the Fma case (#23430), fix the handling of contained 3-operand HW intrinsic nodes. For the Bmi case (#23534), fix a bad assert placement, and re-enable the Bmi tests. Fix #23530 Fix #23534 * Add guard for Fma test
2019-03-28Fix for issue #23441Brian Sullivan2-0/+244
Added test case GitHub_23411
2019-03-28Struct & SIMD improvements (#22255)Carol Eidt6-0/+280
* [WIP] Struct & SIMD improvements - Enable CSE of struct values when handle is available (and add code to get the handle of HW SIMD types) - Don't require block nodes for SIMD assignments - Don't set `GTF_GLOB_REF` on `GT_OBJ` if it is local - Set `lvRegStruct` on promoted SIMD fields - Add tests for #19910 (fixed with this PR) and #3539 & #19438 (fixed with #21314) - Additional cleanup Fix #19910
2019-03-27Fixing the codegen for x64 intrinsics to use EA_8BYTE where needed. (#23461)Tanner Gooding3-0/+252
2019-03-26Handle addressing modes for HW intrinsics (#22944)Carol Eidt2-0/+159
* Handle addressing modes for HW intrinsics Also, eliminate some places where the code size estimates were over-estimating. Contribute to #19550 Fix #19521
2019-03-25Mark test GitHub_18582 as optimization sensitive (#23434)Andy Ayers1-0/+1
Jitstress on OSX will turn on cloning stress in `Test` and cause stack overflows cloning the large `GT_LIST` subtree of the call. See issue #23346.
2019-03-20Expand Vector128 testing to 5 elementsBrian Sullivan1-41/+228
2019-03-20Merge branch 'master' into hva-testsBrian Sullivan2-0/+260
2019-03-20Add repro case for jit stack overflow failure (#23346)Andy Ayers2-0/+260
Repro case for #18582 and #23309.