Implement SVE2 ShiftLeftAndInsert#115776
Conversation
src/coreclr/jit/hwintrinsicarm64.cpp
Outdated
| immUpperBound = 7; | ||
| break; | ||
|
|
||
| case NI_Sve2_ShiftLeftAndInsert: |
There was a problem hiding this comment.
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 |
* Implement SVE2 ShiftLeftAndInsert * Remove explicit immediate bounds setting
@a74nh @kunalspathak
Contributes to #115479