-
Notifications
You must be signed in to change notification settings - Fork 5.3k
JIT: Fix EvalHWIntrinsicFunBinary for ARM MultiplyByScalar
#94413
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
Changes from 1 commit
63fdc8c
2170ec2
134204d
2483e6e
74b2688
2d2d2a9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System.Runtime.CompilerServices; | ||
| using System.Numerics; | ||
| using Xunit; | ||
|
|
||
| public static class Runtime_93876 | ||
| { | ||
| [Fact] | ||
| public static void Problem() | ||
| { | ||
| Vector4 v = Mul(0, 1); | ||
| Assert.Equal(Vector4.One, v); | ||
| } | ||
|
|
||
| [MethodImpl(MethodImplOptions.NoInlining)] | ||
| private static Vector4 Mul(float a, float b) => Vector4.Multiply(a + b, Vector4.One); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <Optimize>True</Optimize> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <CLRTestEnvironmentVariable Include="DOTNET_JitStressModeNames" Value="STRESS_MAKE_CSE STRESS_SPLIT_TREES_REMOVE_COMMAS" /> | ||
|
||
| <Compile Include="$(MSBuildProjectName).cs" /> | ||
| </ItemGroup> | ||
| </Project> | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the type of
a + bhere that causes the issue? Does it becomeTYP_DOUBLEor something or is the issue that it'sTYP_FLOATand the other operand isTYP_SIMD16?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gtNewSimdBinOpNodecreates the following IR on ARM64:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think
MultiplyByScalarshouldn't be handled by this path. E.g.Vector64.Multiply(Vector64<float>.One, x)will produce<x, 0>instead of<x, x>because of that. So this needs a bit more work.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a change that handles
MultiplyByScalarseparately, can you take another look?