Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix numbering of exposed LCL_VARs #79772

Merged
merged 4 commits into from
Jan 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Succeed the test on platforms without threads
No threading => no races.
  • Loading branch information
SingleAccretion committed Jan 4, 2023
commit 6588ac5a252f2e65bdba057b78258650e649c8ad
19 changes: 13 additions & 6 deletions src/tests/JIT/opt/ValueNumbering/ExposedLocalsNumbering.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,23 @@ public static int Main()
const int RetryCount = 100;
const int UnsafeIndex = 1;

new Thread(_ =>
try
{
while (!s_finished)
new Thread(_ =>
{
if (s_mutateIndex)
while (!s_finished)
{
*s_pIndex = UnsafeIndex;
if (s_mutateIndex)
{
*s_pIndex = UnsafeIndex;
}
}
}
}).Start();
}).Start();
}
catch (PlatformNotSupportedException)
{
return 100;
}

int[] array = new int[UnsafeIndex + 1];
array[UnsafeIndex] = 1;
Expand Down