-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Move CHECK_IR before morph global #127352
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 all commits
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1191,6 +1191,43 @@ var_types Compiler::impNormStructType(CORINFO_CLASS_HANDLE structHnd, var_types* | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (structSizeMightRepresentSIMDType(originalSize)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const char* namespaceName = nullptr; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const char* className = info.compCompHnd->getClassNameFromMetadata(structHnd, &namespaceName); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (isNumericsNamespace(namespaceName) && (strcmp(className, "Vector`1") == 0)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISA.RemoveInstructionSet(InstructionSet_VectorT128); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISA.RemoveInstructionSet(InstructionSet_VectorT256); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISA.RemoveInstructionSet(InstructionSet_VectorT512); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAReported.RemoveInstructionSet(InstructionSet_VectorT128); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAReported.RemoveInstructionSet(InstructionSet_VectorT256); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAReported.RemoveInstructionSet(InstructionSet_VectorT512); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAExactly.RemoveInstructionSet(InstructionSet_VectorT128); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAExactly.RemoveInstructionSet(InstructionSet_VectorT256); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAExactly.RemoveInstructionSet(InstructionSet_VectorT512); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| switch (originalSize) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case 16: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISA.AddInstructionSet(InstructionSet_VectorT128); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAReported.AddInstructionSet(InstructionSet_VectorT128); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAExactly.AddInstructionSet(InstructionSet_VectorT128); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case 32: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISA.AddInstructionSet(InstructionSet_VectorT256); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAReported.AddInstructionSet(InstructionSet_VectorT256); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAExactly.AddInstructionSet(InstructionSet_VectorT256); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case 64: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISA.AddInstructionSet(InstructionSet_VectorT512); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAReported.AddInstructionSet(InstructionSet_VectorT512); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAExactly.AddInstructionSet(InstructionSet_VectorT512); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+1199
to
+1227
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISA.RemoveInstructionSet(InstructionSet_VectorT128); | |
| opts.compSupportsISA.RemoveInstructionSet(InstructionSet_VectorT256); | |
| opts.compSupportsISA.RemoveInstructionSet(InstructionSet_VectorT512); | |
| opts.compSupportsISAReported.RemoveInstructionSet(InstructionSet_VectorT128); | |
| opts.compSupportsISAReported.RemoveInstructionSet(InstructionSet_VectorT256); | |
| opts.compSupportsISAReported.RemoveInstructionSet(InstructionSet_VectorT512); | |
| opts.compSupportsISAExactly.RemoveInstructionSet(InstructionSet_VectorT128); | |
| opts.compSupportsISAExactly.RemoveInstructionSet(InstructionSet_VectorT256); | |
| opts.compSupportsISAExactly.RemoveInstructionSet(InstructionSet_VectorT512); | |
| switch (originalSize) | |
| { | |
| case 16: | |
| opts.compSupportsISA.AddInstructionSet(InstructionSet_VectorT128); | |
| opts.compSupportsISAReported.AddInstructionSet(InstructionSet_VectorT128); | |
| opts.compSupportsISAExactly.AddInstructionSet(InstructionSet_VectorT128); | |
| break; | |
| case 32: | |
| opts.compSupportsISA.AddInstructionSet(InstructionSet_VectorT256); | |
| opts.compSupportsISAReported.AddInstructionSet(InstructionSet_VectorT256); | |
| opts.compSupportsISAExactly.AddInstructionSet(InstructionSet_VectorT256); | |
| break; | |
| case 64: | |
| opts.compSupportsISA.AddInstructionSet(InstructionSet_VectorT512); | |
| opts.compSupportsISAReported.AddInstructionSet(InstructionSet_VectorT512); | |
| opts.compSupportsISAExactly.AddInstructionSet(InstructionSet_VectorT512); | |
| break; | |
| const bool isValidVectorTSize = (originalSize == 16) || (originalSize == 32) || (originalSize == 64); | |
| assert(isValidVectorTSize); | |
| if (isValidVectorTSize) | |
| { | |
| opts.compSupportsISA.RemoveInstructionSet(InstructionSet_VectorT128); | |
| opts.compSupportsISA.RemoveInstructionSet(InstructionSet_VectorT256); | |
| opts.compSupportsISA.RemoveInstructionSet(InstructionSet_VectorT512); | |
| opts.compSupportsISAReported.RemoveInstructionSet(InstructionSet_VectorT128); | |
| opts.compSupportsISAReported.RemoveInstructionSet(InstructionSet_VectorT256); | |
| opts.compSupportsISAReported.RemoveInstructionSet(InstructionSet_VectorT512); | |
| opts.compSupportsISAExactly.RemoveInstructionSet(InstructionSet_VectorT128); | |
| opts.compSupportsISAExactly.RemoveInstructionSet(InstructionSet_VectorT256); | |
| opts.compSupportsISAExactly.RemoveInstructionSet(InstructionSet_VectorT512); | |
| switch (originalSize) | |
| { | |
| case 16: | |
| opts.compSupportsISA.AddInstructionSet(InstructionSet_VectorT128); | |
| opts.compSupportsISAReported.AddInstructionSet(InstructionSet_VectorT128); | |
| opts.compSupportsISAExactly.AddInstructionSet(InstructionSet_VectorT128); | |
| break; | |
| case 32: | |
| opts.compSupportsISA.AddInstructionSet(InstructionSet_VectorT256); | |
| opts.compSupportsISAReported.AddInstructionSet(InstructionSet_VectorT256); | |
| opts.compSupportsISAExactly.AddInstructionSet(InstructionSet_VectorT256); | |
| break; | |
| case 64: | |
| opts.compSupportsISA.AddInstructionSet(InstructionSet_VectorT512); | |
| opts.compSupportsISAReported.AddInstructionSet(InstructionSet_VectorT512); | |
| opts.compSupportsISAExactly.AddInstructionSet(InstructionSet_VectorT512); | |
| break; | |
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -10835,6 +10835,46 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint32_t size = getVectorTByteLength(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (isVectorT) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CORINFO_CLASS_HANDLE const vectorClass = info.compCompHnd->getMethodClass(method); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint32_t const classSize = info.compCompHnd->getClassSize(vectorClass); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISA.RemoveInstructionSet(InstructionSet_VectorT128); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISA.RemoveInstructionSet(InstructionSet_VectorT256); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISA.RemoveInstructionSet(InstructionSet_VectorT512); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAReported.RemoveInstructionSet(InstructionSet_VectorT128); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAReported.RemoveInstructionSet(InstructionSet_VectorT256); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAReported.RemoveInstructionSet(InstructionSet_VectorT512); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAExactly.RemoveInstructionSet(InstructionSet_VectorT128); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAExactly.RemoveInstructionSet(InstructionSet_VectorT256); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAExactly.RemoveInstructionSet(InstructionSet_VectorT512); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| switch (classSize) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case 16: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISA.AddInstructionSet(InstructionSet_VectorT128); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAReported.AddInstructionSet(InstructionSet_VectorT128); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAExactly.AddInstructionSet(InstructionSet_VectorT128); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| size = 16; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+10854
to
+10860
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case 32: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISA.AddInstructionSet(InstructionSet_VectorT256); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAReported.AddInstructionSet(InstructionSet_VectorT256); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAExactly.AddInstructionSet(InstructionSet_VectorT256); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| size = 32; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case 64: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISA.AddInstructionSet(InstructionSet_VectorT512); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAReported.AddInstructionSet(InstructionSet_VectorT512); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISAExactly.AddInstructionSet(InstructionSet_VectorT512); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+10844
to
+10873
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opts.compSupportsISA.RemoveInstructionSet(InstructionSet_VectorT128); | |
| opts.compSupportsISA.RemoveInstructionSet(InstructionSet_VectorT256); | |
| opts.compSupportsISA.RemoveInstructionSet(InstructionSet_VectorT512); | |
| opts.compSupportsISAReported.RemoveInstructionSet(InstructionSet_VectorT128); | |
| opts.compSupportsISAReported.RemoveInstructionSet(InstructionSet_VectorT256); | |
| opts.compSupportsISAReported.RemoveInstructionSet(InstructionSet_VectorT512); | |
| opts.compSupportsISAExactly.RemoveInstructionSet(InstructionSet_VectorT128); | |
| opts.compSupportsISAExactly.RemoveInstructionSet(InstructionSet_VectorT256); | |
| opts.compSupportsISAExactly.RemoveInstructionSet(InstructionSet_VectorT512); | |
| switch (classSize) | |
| { | |
| case 16: | |
| opts.compSupportsISA.AddInstructionSet(InstructionSet_VectorT128); | |
| opts.compSupportsISAReported.AddInstructionSet(InstructionSet_VectorT128); | |
| opts.compSupportsISAExactly.AddInstructionSet(InstructionSet_VectorT128); | |
| size = 16; | |
| break; | |
| case 32: | |
| opts.compSupportsISA.AddInstructionSet(InstructionSet_VectorT256); | |
| opts.compSupportsISAReported.AddInstructionSet(InstructionSet_VectorT256); | |
| opts.compSupportsISAExactly.AddInstructionSet(InstructionSet_VectorT256); | |
| size = 32; | |
| break; | |
| case 64: | |
| opts.compSupportsISA.AddInstructionSet(InstructionSet_VectorT512); | |
| opts.compSupportsISAReported.AddInstructionSet(InstructionSet_VectorT512); | |
| opts.compSupportsISAExactly.AddInstructionSet(InstructionSet_VectorT512); | |
| switch (classSize) | |
| { | |
| case 16: | |
| size = 16; | |
| break; | |
| case 32: | |
| size = 32; | |
| break; | |
| case 64: |
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.
Avoid mutating opts.compSupportsISAReported / opts.compSupportsISAExactly in impNormStructType. These sets are used to track which ISAs were actually reported to the VM (see compExactlyDependsOn); manually adding VectorT* here can prevent notifyInstructionSetUsage from running later and can corrupt dependency tracking. If you need Vector sizing to follow the struct size, prefer deriving a local size value (or adjusting only compSupportsISA during option setup) and leave *Reported/*Exactly to compExactlyDependsOn.