-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release/9.0] Ensure that constant folding of bitwise operations for …
…float/double are bitwise (#106830) * Ensure that constant folding of bitwise operations for float/double are bitwise * Ensure that the new header only methods are marked `inline` to avoid duplicate definitions * Apply formatting patch --------- Co-authored-by: Tanner Gooding <[email protected]> Co-authored-by: Jeff Schwartz <[email protected]>
- Loading branch information
1 parent
5ec43e0
commit 0ee150e
Showing
3 changed files
with
136 additions
and
26 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
43 changes: 43 additions & 0 deletions
43
src/tests/JIT/Regression/JitBlue/Runtime_106610/Runtime_106610.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,43 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Runtime.CompilerServices; | ||
using System.Numerics; | ||
using System.Runtime.Intrinsics; | ||
using System.Runtime.Intrinsics.X86; | ||
using Xunit; | ||
|
||
// Generated by Fuzzlyn v2.2 on 2024-08-17 17:40:06 | ||
// Run on X86 Windows | ||
// Seed: 1343518557351353159-vectort,vector128,vector256,vector512,x86aes,x86avx,x86avx2,x86avx512bw,x86avx512bwvl,x86avx512cd,x86avx512cdvl,x86avx512dq,x86avx512dqvl,x86avx512f,x86avx512fvl,x86avx512vbmi,x86avx512vbmivl,x86bmi1,x86bmi2,x86fma,x86lzcnt,x86pclmulqdq,x86popcnt,x86sse,x86sse2,x86sse3,x86sse41,x86sse42,x86ssse3,x86x86base | ||
// Reduced from 171.2 KiB to 0.6 KiB in 00:06:37 | ||
// Debug: Outputs <4292870144, 0, 0, 0, 0, 0, 0, 0> | ||
// Release: Outputs <0, 0, 0, 0, 0, 0, 0, 0> | ||
|
||
public class C1 | ||
{ | ||
public Vector256<float> F5; | ||
|
||
public C1(Vector256<float> f5) | ||
{ | ||
F5 = f5; | ||
} | ||
} | ||
|
||
public class Runtime_106610 | ||
{ | ||
[Fact] | ||
public static void TestEntryPoint() | ||
{ | ||
if (Avx512DQ.VL.IsSupported) | ||
{ | ||
var vr4 = Vector256.Create<float>(0); | ||
var vr5 = Vector256.CreateScalar(1f); | ||
var vr6 = Vector256.CreateScalar(-10f); | ||
var vr7 = Avx.Or(vr5, vr6); | ||
C1 vr8 = new C1(Avx512DQ.VL.Range(vr4, vr7, 0)); | ||
Assert.Equal(Vector256.CreateScalar<uint>(4292870144), vr8.F5.AsUInt32()); | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/tests/JIT/Regression/JitBlue/Runtime_106610/Runtime_106610.csproj
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,8 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
</Project> |