summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2019-02-12 13:45:47 +0100
committerJan Kotas <jkotas@microsoft.com>2019-02-12 09:10:10 -0800
commit7a1a920a6d8cfc24ad5a3b30a0482d2cb783b57f (patch)
tree6304ef2bedb82addb592997a2daaefe971ca98cd
parent09963dc2ee182e7e62212efbb205edd9c387961d (diff)
downloadcoreclr-7a1a920a6d8cfc24ad5a3b30a0482d2cb783b57f.tar.gz
coreclr-7a1a920a6d8cfc24ad5a3b30a0482d2cb783b57f.tar.bz2
coreclr-7a1a920a6d8cfc24ad5a3b30a0482d2cb783b57f.zip
Ifdef out code that triggers UTC bug (dotnet/corert#7003)
This results in bad codegen on AMD64. I filed a bug internally; hopefully we can get a fix soon. Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
-rw-r--r--src/System.Private.CoreLib/shared/System/Array.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Array.cs b/src/System.Private.CoreLib/shared/System/Array.cs
index f77186e583..2de97dd689 100644
--- a/src/System.Private.CoreLib/shared/System/Array.cs
+++ b/src/System.Private.CoreLib/shared/System/Array.cs
@@ -1022,6 +1022,8 @@ namespace System
ThrowHelper.ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count();
}
+ // Hits a code generation bug on ProjectN
+#if !PROJECTN
if (typeof(T) == typeof(byte))
{
int result = SpanHelpers.IndexOf(
@@ -1041,6 +1043,7 @@ namespace System
return (result >= 0 ? startIndex : 0) + result;
}
+#endif
#if CORECLR
return EqualityComparer<T>.Default.IndexOf(array, value, startIndex, count);
@@ -1207,6 +1210,8 @@ namespace System
ThrowHelper.ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count();
}
+ // Hits a code generation bug on ProjectN
+#if !PROJECTN
if (typeof(T) == typeof(byte))
{
int endIndex = startIndex - count + 1;
@@ -1228,6 +1233,7 @@ namespace System
return (result >= 0 ? endIndex : 0) + result;
}
+#endif
#if CORECLR
return EqualityComparer<T>.Default.LastIndexOf(array, value, startIndex, count);