-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[Clang][SME] Refactor checkArmStreamingBuiltin. #145941
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 |
---|---|---|
|
@@ -264,22 +264,22 @@ let SVETargetGuard = "sve,bf16", SMETargetGuard = "sme,bf16" in { | |
def SVLD1RQ_BF : SInst<"svld1rq[_{2}]", "dPc", "b", MergeNone, "aarch64_sve_ld1rq", [VerifyRuntimeMode]>; | ||
} | ||
|
||
multiclass StructLoad<string name, string proto, string i> { | ||
def : SInst<name, proto, "csilUcUsUiUlhfdm", MergeNone, i, [IsStructLoad, VerifyRuntimeMode]>; | ||
multiclass StructLoad<string name, string proto, string i, list<FlagType> f = []> { | ||
def : SInst<name, proto, "csilUcUsUiUlhfdm", MergeNone, i, !listconcat(f, [IsStructLoad])>; | ||
let SVETargetGuard = "sve,bf16", SMETargetGuard = "sme,bf16" in { | ||
def: SInst<name, proto, "b", MergeNone, i, [IsStructLoad, VerifyRuntimeMode]>; | ||
def: SInst<name, proto, "b", MergeNone, i, !listconcat(f, [IsStructLoad])>; | ||
} | ||
} | ||
|
||
// Load N-element structure into N vectors (scalar base) | ||
defm SVLD2 : StructLoad<"svld2[_{2}]", "2Pc", "aarch64_sve_ld2_sret">; | ||
defm SVLD3 : StructLoad<"svld3[_{2}]", "3Pc", "aarch64_sve_ld3_sret">; | ||
defm SVLD4 : StructLoad<"svld4[_{2}]", "4Pc", "aarch64_sve_ld4_sret">; | ||
defm SVLD2 : StructLoad<"svld2[_{2}]", "2Pc", "aarch64_sve_ld2_sret", [VerifyRuntimeMode]>; | ||
defm SVLD3 : StructLoad<"svld3[_{2}]", "3Pc", "aarch64_sve_ld3_sret", [VerifyRuntimeMode]>; | ||
defm SVLD4 : StructLoad<"svld4[_{2}]", "4Pc", "aarch64_sve_ld4_sret", [VerifyRuntimeMode]>; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've probably missed them, but I can't find any streaming or non-streaming guards for these instructions which are passing the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SVEEmitter automatically prefixes |
||
|
||
// Load N-element structure into N vectors (scalar base, VL displacement) | ||
defm SVLD2_VNUM : StructLoad<"svld2_vnum[_{2}]", "2Pcl", "aarch64_sve_ld2_sret">; | ||
defm SVLD3_VNUM : StructLoad<"svld3_vnum[_{2}]", "3Pcl", "aarch64_sve_ld3_sret">; | ||
defm SVLD4_VNUM : StructLoad<"svld4_vnum[_{2}]", "4Pcl", "aarch64_sve_ld4_sret">; | ||
defm SVLD2_VNUM : StructLoad<"svld2_vnum[_{2}]", "2Pcl", "aarch64_sve_ld2_sret", [VerifyRuntimeMode]>; | ||
defm SVLD3_VNUM : StructLoad<"svld3_vnum[_{2}]", "3Pcl", "aarch64_sve_ld3_sret", [VerifyRuntimeMode]>; | ||
defm SVLD4_VNUM : StructLoad<"svld4_vnum[_{2}]", "4Pcl", "aarch64_sve_ld4_sret", [VerifyRuntimeMode]>; | ||
|
||
// Load one octoword and replicate (scalar base) | ||
let SVETargetGuard = "sve,f64mm", SMETargetGuard = InvalidMode in { | ||
|
@@ -434,21 +434,21 @@ def SVST1H_SCATTER_INDEX_S : MInst<"svst1h_scatter[_{2}base]_index[_{d}]", "v | |
def SVST1W_SCATTER_INDEX_S : MInst<"svst1w_scatter[_{2}base]_index[_{d}]", "vPuld", "lUl", [IsScatterStore], MemEltTyInt32, "aarch64_sve_st1_scatter_scalar_offset">; | ||
} // let SVETargetGuard = "sve" | ||
|
||
multiclass StructStore<string name, string proto, string i> { | ||
def : SInst<name, proto, "csilUcUsUiUlhfdm", MergeNone, i, [IsStructStore, VerifyRuntimeMode]>; | ||
multiclass StructStore<string name, string proto, string i, list<FlagType> f = []> { | ||
def : SInst<name, proto, "csilUcUsUiUlhfdm", MergeNone, i, !listconcat(f, [IsStructStore])>; | ||
let SVETargetGuard = "sve,bf16", SMETargetGuard = "sme,bf16" in { | ||
def: SInst<name, proto, "b", MergeNone, i, [IsStructStore, VerifyRuntimeMode]>; | ||
def: SInst<name, proto, "b", MergeNone, i, !listconcat(f, [IsStructStore])>; | ||
} | ||
} | ||
// Store N vectors into N-element structure (scalar base) | ||
defm SVST2 : StructStore<"svst2[_{d}]", "vPp2", "aarch64_sve_st2">; | ||
defm SVST3 : StructStore<"svst3[_{d}]", "vPp3", "aarch64_sve_st3">; | ||
defm SVST4 : StructStore<"svst4[_{d}]", "vPp4", "aarch64_sve_st4">; | ||
defm SVST2 : StructStore<"svst2[_{d}]", "vPp2", "aarch64_sve_st2", [VerifyRuntimeMode]>; | ||
defm SVST3 : StructStore<"svst3[_{d}]", "vPp3", "aarch64_sve_st3", [VerifyRuntimeMode]>; | ||
defm SVST4 : StructStore<"svst4[_{d}]", "vPp4", "aarch64_sve_st4", [VerifyRuntimeMode]>; | ||
|
||
// Store N vectors into N-element structure (scalar base, VL displacement) | ||
defm SVST2_VNUM : StructStore<"svst2_vnum[_{d}]", "vPpl2", "aarch64_sve_st2">; | ||
defm SVST3_VNUM : StructStore<"svst3_vnum[_{d}]", "vPpl3", "aarch64_sve_st3">; | ||
defm SVST4_VNUM : StructStore<"svst4_vnum[_{d}]", "vPpl4", "aarch64_sve_st4">; | ||
defm SVST2_VNUM : StructStore<"svst2_vnum[_{d}]", "vPpl2", "aarch64_sve_st2", [VerifyRuntimeMode]>; | ||
defm SVST3_VNUM : StructStore<"svst3_vnum[_{d}]", "vPpl3", "aarch64_sve_st3", [VerifyRuntimeMode]>; | ||
defm SVST4_VNUM : StructStore<"svst4_vnum[_{d}]", "vPpl4", "aarch64_sve_st4", [VerifyRuntimeMode]>; | ||
|
||
// Store one vector, with no truncation, non-temporal (scalar base) | ||
def SVSTNT1 : MInst<"svstnt1[_{d}]", "vPpd", "csilUcUsUiUlhfdm", [IsStore, VerifyRuntimeMode], MemEltTyDefault, "aarch64_sve_stnt1">; | ||
|
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.
Why do these need the runtime mode verified, and not the
ld2q
? (those are valid withFEAT_SME2p1
, although currently their target guard saysSMETargetGuard = InvalidMode
)I guess that is what you meant with:
?
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.
Exactly. I created #147362 to add the necessary guards to enable the sme2p1 builtins.