-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…40871) * Add regression test for #40607 * Add Runtime_40607.tt * Add more extensive tests for loads in Runtime_40607.tt Runtime_40607.il * Enable back failing test in System.Private.Xml.dll * Fold *(typ*)&lclVar tree when: 1) it is *definitely load* and types of both indirection and local variable have the same signedness (e.g. bool and byte) 2) otherwise, fold the tree and mark the local node with GTF_VAR_FOLDED_IND and call fgDoNormalizeOnStore() on such nodes' parents in post-order morph.
- Loading branch information
Showing
9 changed files
with
1,025 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
src/tests/JIT/Regression/JitBlue/Runtime_40607/Runtime_40607.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
using System; | ||
using System.Runtime.CompilerServices; | ||
|
||
namespace Runtime_40607 | ||
{ | ||
class Program | ||
{ | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
static bool WillBeInlined(out bool shouldBeFalse) | ||
{ | ||
shouldBeFalse = false; | ||
return true; | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
[SkipLocalsInit] | ||
static int DependsOnUnInitValue() | ||
{ | ||
int retVal = 1; | ||
bool shouldBeFalse; | ||
|
||
while (WillBeInlined(out shouldBeFalse)) | ||
{ | ||
if (shouldBeFalse) | ||
{ | ||
retVal = 0; | ||
} | ||
break; | ||
} | ||
|
||
return retVal; | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
static unsafe int PoisonStackWith(uint fillValue) | ||
{ | ||
int retVal = 1; | ||
bool shouldBeFalse; | ||
|
||
*(uint*)&shouldBeFalse = fillValue; | ||
|
||
while (WillBeInlined(out shouldBeFalse)) | ||
{ | ||
if (shouldBeFalse) | ||
{ | ||
retVal = 0; | ||
} | ||
break; | ||
} | ||
|
||
return retVal; | ||
} | ||
|
||
static int Main(string[] args) | ||
{ | ||
PoisonStackWith(0xdeadbeef); | ||
|
||
const int expected = 1; | ||
int actual = DependsOnUnInitValue(); | ||
|
||
if (expected != actual) | ||
{ | ||
return 0; | ||
} | ||
|
||
return 100; | ||
} | ||
} | ||
} |
Oops, something went wrong.