Skip to content

Conversation

a74nh
Copy link
Contributor

@a74nh a74nh commented Jul 14, 2025

Fixes #108234

SveLoadNonFaultingMaskedUnOpTest.template is a mixture of SveLoadNonFaultingUnOpTest.template and
SveLoadVectorMaskedTest.template

Fixes dotnet#108234

SveLoadNonFaultingMaskedUnOpTest.template is a mixture of
SveLoadNonFaultingUnOpTest.template and
SveLoadVectorMaskedTest.template
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jul 14, 2025
@a74nh
Copy link
Contributor Author

a74nh commented Jul 14, 2025

@amanasifkhalid @dotnet/arm64-contrib

@a74nh a74nh marked this pull request as ready for review July 14, 2025 14:46
@amanasifkhalid amanasifkhalid added the breaking-change Issue or PR that represents a breaking API or functional change over a prerelease. label Jul 14, 2025
@dotnet-policy-service dotnet-policy-service bot added the needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet label Jul 14, 2025
Copy link
Contributor

Added needs-breaking-change-doc-created label because this PR has the breaking-change label.

When you commit this breaking change:

  1. Create and link to this PR and the issue a matching issue in the dotnet/docs repo using the breaking change documentation template, then remove this needs-breaking-change-doc-created label.
  2. Ask a committer to mail the .NET Breaking Change Notification DL.

Tagging @dotnet/compat for awareness of the breaking change.

@amanasifkhalid
Copy link
Contributor

I'm guessing this counts as a breaking change, since we're diverging from .NET 9's API surface -- not sure if there's something else we need to do to suppress ApiCompat in CI

@a74nh a74nh mentioned this pull request Jul 14, 2025
16 tasks
@a74nh
Copy link
Contributor Author

a74nh commented Jul 14, 2025

I'm guessing this counts as a breaking change, since we're diverging from .NET 9's API surface -- not sure if there's something else we need to do to suppress ApiCompat in CI

I forgot to add the apicompact change. Seems to have fixed it now

Copy link
Contributor

@amanasifkhalid amanasifkhalid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I looked at a few other breaking SVE changes, and since SVE support was experimental in .NET 9, I think we're fine to skip the usual documentation. @gewarren should we track this renaming like dotnet/dotnet-api-docs#11427 does? The technical reason for this change might warrant an explanation to early SVE adopters.

Copy link
Contributor

@amanasifkhalid amanasifkhalid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@a74nh looks like there's some asserts to sort out. From SPMI:

ISSUE: <ASSERT> #119969 /Users/runner/work/1/s/src/coreclr/jit/gentree.h (6080) - Assertion failed 'actualIndex < m_operandCount' in 'JIT.HardwareIntrinsics.Arm._Sve.LoadNonFaultingUnaryOpTest__Sve_LoadVectorInt16NonFaultingSignExtendToUInt32_uint:ConditionalSelectScenario_FalseValue(System.Numerics.Vector`1[uint],ptr,System.Numerics.Vector`1[uint]):this' during 'Importation' (IL size 60; hash 0xbe66dabb; MinOpts)

@a74nh
Copy link
Contributor Author

a74nh commented Jul 14, 2025

@a74nh looks like there's some asserts to sort out. From SPMI:

ISSUE: <ASSERT> #119969 /Users/runner/work/1/s/src/coreclr/jit/gentree.h (6080) - Assertion failed 'actualIndex < m_operandCount' in 'JIT.HardwareIntrinsics.Arm._Sve.LoadNonFaultingUnaryOpTest__Sve_LoadVectorInt16NonFaultingSignExtendToUInt32_uint:ConditionalSelectScenario_FalseValue(System.Numerics.Vector`1[uint],ptr,System.Numerics.Vector`1[uint]):this' during 'Importation' (IL size 60; hash 0xbe66dabb; MinOpts)

I wonder if this is spmi running the existing versions of the tests. Which mean it's constructing an import graph which is no longer valid for this version of the jit (ie LoadVectorInt16NonFaultingSignExtendToUInt32 only has one arg instead of two).

Will check...

@a74nh
Copy link
Contributor Author

a74nh commented Jul 14, 2025

Yes, it's trying to import an API call that doesn't exist anymore:

Using jit(/home/alahay01/dotnet/runtime_sve/artifacts/tests/coreclr/linux.arm64.Checked/Tests/Core_Root/libclrjit.so) with input (/home/alahay01/dotnet/runtime_sve/artifacts/spmi/mch/5c7eb9f1-a9cb-4a35-aea6-ae93d1f54c56.linux.arm64/libraries.pmi.linux.arm64.checked.mch)
 indexCount=1 (11997)
Jit startup took 0.856548ms
****** START compiling System.Runtime.Intrinsics.Arm.Sve:LoadVectorByteNonFaultingZeroExtendToInt16(ptr):System.Numerics.Vector`1[short] (MethodHash=3b590ee3)
Generating code for Unix arm64
OPTIONS: compCodeOpt = BLENDED_CODE
OPTIONS: compDbgCode = false
OPTIONS: compDbgInfo = true
OPTIONS: compDbgEnC  = false
OPTIONS: compProcedureSplitting   = false
OPTIONS: compProcedureSplittingEH = false
OPTIONS: optimizer should use profile data
IL to import:
IL_0000  02                ldarg.0
IL_0001  28 11 64 00 06    call         0x6006411
IL_0006  2a                ret
 Found Vector<short>
Notify VM instruction set (VectorT128) must be supported.
1 return registers for return type simd16 System.Numerics.Vector`1[short]
  [00..16) reg d0
Parameter V00 ABI info: [00..08) reg x0

lvaGrabTemp returning 1 (V01 tmp0) (a long lifetime temp) called for OutgoingArgSpace.

Local V01 should not be enregistered because: it is address exposed
; Initial local variable assignments
;
;  V00 arg0             long
;  V01 OutArgs        struct <0> do-not-enreg[XS] addr-exposed "OutgoingArgSpace" <Empty>
*************** In compInitDebuggingInfo() for System.Runtime.Intrinsics.Arm.Sve:LoadVectorByteNonFaultingZeroExtendToInt16(ptr):System.Numerics.Vector`1[short]
getVars() returned cVars = 0, extendOthers = true
info.compVarScopesCount = 1
    	VarNum 	LVNum 	      Name 	Beg 	End
 0: 	00h 	00h 	  V00 arg0 	000h   	007h
info.compStmtOffsetsCount    = 0
info.compStmtOffsetsImplicit = 0005h ( STACK_EMPTY CALL_SITE )
*************** In fgFindBasicBlocks() for System.Runtime.Intrinsics.Arm.Sve:LoadVectorByteNonFaultingZeroExtendToInt16(ptr):System.Numerics.Vector`1[short]
Jump targets:
  none
New Basic Block BB01 [0000] created.
BB01 [0000] [000..007)
IL Code Size,Instr    7,   3, Basic Block count   1, Local Variable Num,Ref count   2,  1 for method System.Runtime.Intrinsics.Arm.Sve:LoadVectorByteNonFaultingZeroExtendToInt16(ptr):System.Numerics.Vector`1[short]
OPTIONS: opts.MinOpts() == false
Basic block list for 'System.Runtime.Intrinsics.Arm.Sve:LoadVectorByteNonFaultingZeroExtendToInt16(ptr):System.Numerics.Vector`1[short]'

---------------------------------------------------------------------------------------------------------------------------------------------------------------------
BBnum BBid ref try hnd preds           weight   [IL range]   [jump]                            [EH region]        [flags]
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
BB01 [0000]  1                             1    [000..007)                           (return)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------

*************** Starting PHASE Pre-import

*************** Finishing PHASE Pre-import
Trees after Pre-import

---------------------------------------------------------------------------------------------------------------------------------------------------------------------
BBnum BBid ref try hnd preds           weight   [IL range]   [jump]                            [EH region]        [flags]
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
BB01 [0000]  1                             1    [000..007)                           (return)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------ BB01 [0000] [000..007) (return), preds={} succs={}

-------------------------------------------------------------------------------------------------------------------
*************** In fgDebugCheckBBlist

*************** Starting PHASE Profile incorporation
BBOPT set, but no profile data available (hr=80004001)

*************** Finishing PHASE Profile incorporation [no changes]

*************** Starting PHASE Canonicalize entry

*************** Finishing PHASE Canonicalize entry [no changes]

*************** Starting PHASE Importation

impImportBlockPending for BB01

Importing BB01 (PC=000) of 'System.Runtime.Intrinsics.Arm.Sve:LoadVectorByteNonFaultingZeroExtendToInt16(ptr):System.Numerics.Vector`1[short]'
    [ 0]   0 (0x000) ldarg.0
    [ 1]   1 (0x001) call 06006411
 (Implicit Tail call: prefixFlags |= PREFIX_TAILCALL_IMPLICIT)
In Compiler::impImportCall: opcode is call, kind=0, callRetType is struct, structSize is 16
Named Intrinsic System.Runtime.Intrinsics.Arm.Sve.LoadVectorByteNonFaultingZeroExtendToInt16: Notify VM instruction set (Sve) must be supported.
Recognized
 Found Vector<short>
 Found Vector<short>
ISSUE: <ASSERT> #11997 /home/alahay01/dotnet/runtime_sve/src/coreclr/jit/gentree.h (6080) - Assertion failed 'actualIndex < m_operandCount' in 'System.Runtime.Intrinsics.Arm.Sve:LoadVectorByteNonFaultingZeroExtendToInt16(ptr):System.Numerics.Vector`1[short]' during 'Importation' (IL size 7; hash 0x3b590ee3; FullOpts)

ERROR: Exception thrown: DebugBreak or AV Exception 123
ERROR: Method 11997 of size 7 failed to load and compile correctly (/home/alahay01/dotnet/runtime_sve/artifacts/tests/coreclr/linux.arm64.Checked/Tests/Core_Root/libclrjit.so).
Loaded 1  Jitted 1  FailedCompile 1 Excluded 0 Missing 0
Total time: 31.607246ms

LoadVectorByteNonFaultingZeroExtendToInt16(ptr) isn't a valid API.

I don't think there is anything we can do here? I ideally don't want to add support in the jit for this only then to remove it after spmi has been regenerated.

@amanasifkhalid
Copy link
Contributor

amanasifkhalid commented Jul 14, 2025

I ideally don't want to add support in the jit for this only then to remove it after spmi has been regenerated.

Right, thanks for taking a look. I think you'll want to bump the JIT-EE GUID so we can kick off a new collection once this is merged.

@amanasifkhalid
Copy link
Contributor

I think you'll want to bump the JIT-EE GUID so we can kick off a new collection once this is merged.

@dotnet/jit-contrib FYI

@a74nh
Copy link
Contributor Author

a74nh commented Jul 14, 2025

I think you'll want to bump the JIT-EE GUID so we can kick off a new collection once this is merged.

Right, makes sense. Updated.

@a74nh
Copy link
Contributor Author

a74nh commented Jul 15, 2025

Build errors are all "send to helix" issues.

@jakobbotsch
Copy link
Member

Failures in "send to helix" normally means that tests are failing.

I do see build failures that look related to the PR when looking at Build Analysis:

image

@a74nh
Copy link
Contributor Author

a74nh commented Jul 15, 2025

Failures in "send to helix" normally means that tests are failing.

Ok, understood.

I do see build failures that look related to the PR when looking at Build Analysis:

image

And fixed.

Copy link
Contributor

@amanasifkhalid amanasifkhalid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@amanasifkhalid
Copy link
Contributor

/ba-g android-x64 CoreCLR build stuck

@amanasifkhalid amanasifkhalid merged commit ea4a781 into dotnet:main Jul 15, 2025
146 of 150 checks passed
@a74nh a74nh deleted the ffmask_github branch July 15, 2025 15:13
@gewarren
Copy link
Contributor

I looked at a few other breaking SVE changes, and since SVE support was experimental in .NET 9, I think we're fine to skip the usual documentation. @gewarren should we track this renaming like dotnet/dotnet-api-docs#11427 does? The technical reason for this change might warrant an explanation to early SVE adopters.

@amanasifkhalid This is not a rename, but an additional parameter, correct? If so, to me it doesn't need to be tracked like 11427. But we have documented preview-to-preview breaking changes in the past, which is sort of similar to an experimental feature since previews aren't supported for production (I think). So maybe it should just be documented as a regular breaking change by filling out https://github.com/dotnet/docs/issues > .NET breaking change?

@a74nh
Copy link
Contributor Author

a74nh commented Jul 17, 2025

I looked at a few other breaking SVE changes, and since SVE support was experimental in .NET 9, I think we're fine to skip the usual documentation. @gewarren should we track this renaming like dotnet/dotnet-api-docs#11427 does? The technical reason for this change might warrant an explanation to early SVE adopters.

@amanasifkhalid This is not a rename, but an additional parameter, correct? If so, to me it doesn't need to be tracked like 11427. But we have documented preview-to-preview breaking changes in the past, which is sort of similar to an experimental feature since previews aren't supported for production (I think). So maybe it should just be documented as a regular breaking change by filling out https://github.com/dotnet/docs/issues > .NET breaking change?

#108234 was raised before this PR to track getting approval by the libraries team. I'm not sure if that counts, or if you're asking for something else.

@amanasifkhalid
Copy link
Contributor

This is not a rename, but an additional parameter, correct?

That's correct.

#108234 was raised before this PR to track getting approval by the libraries team. I'm not sure if that counts, or if you're asking for something else.

Typically, the PR author of a breaking change opens an issue in dotnet/docs describing the breaking change to ensure it is documented upon product release. It's something we definitely have to do when features we've previously supported are affected. SVE support was experimental (and thus subject to change) in .NET 9, but I think we ought to document this, considering it's one of few changes (AFAIK) to the SVE API surface between .NET 9 and 10. @a74nh would you be able to open the breaking change issue?

@a74nh
Copy link
Contributor Author

a74nh commented Jul 17, 2025

@a74nh would you be able to open the breaking change issue?

Done: dotnet/docs#47439

@github-actions github-actions bot locked and limited conversation to collaborators Aug 17, 2025
@ericstj ericstj removed the needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet label Oct 2, 2025
@ericstj
Copy link
Member

ericstj commented Oct 2, 2025

Removing needs-breaking-change-doc-created label as this PR already has a documentation issue: dotnet/docs#47439

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Runtime.Intrinsics breaking-change Issue or PR that represents a breaking API or functional change over a prerelease. community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[API Proposal]: ARM64 SVE: LoadVectorNonFaulting APIs require a mask due to FFR

5 participants