-
Notifications
You must be signed in to change notification settings - Fork 5k
Implement SVE2 ShiftLeftAndInsert #115776
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
Implement SVE2 ShiftLeftAndInsert #115776
Conversation
src/coreclr/jit/hwintrinsicarm64.cpp
Outdated
@@ -552,6 +552,11 @@ void HWIntrinsicInfo::lookupImmBounds( | |||
immUpperBound = 7; | |||
break; | |||
|
|||
case NI_Sve2_ShiftLeftAndInsert: |
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.
you shouldn't need this because that should be already calculated as part of line 411 above under HW_Category_ShiftLeftByImmediate
can you share sample disassembly for 3 scenarios?
|
1 generates the following instruction:
2 and 3 both generate a runtime exception (3 specifically when that variable value is out of range):
I can't see the exact code being generated for this, because the intrinsic isn't being generated inline anymore. The function contains a call to the intrinsic which I'm guessing contains the jump to throw. 3 generates this instruction when the variable is in range:
The rest of the C# for reference (I dumped these by adding them to the test suite):
|
can you try this? [MethodImpl(MethodImplOptions.NoInlining)]
public static Vector<int> Dump_Test_2()
{
return Sve2.ShiftLeftAndInsert(u, v, 35);
}
[MethodImpl(MethodImplOptions.NoInlining)]
public static Vector<int> Dump_Test_3(int a)
{
return Sve2.ShiftLeftAndInsert(u, v, a);
} |
The top one is a function that just branches straight to The second one has this:
and this really big function is called for
|
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.
LGTM
* Implement SVE2 ShiftLeftAndInsert * Remove explicit immediate bounds setting
@a74nh @kunalspathak
Contributes to #115479