Skip to content

[AArch64] Add FPCR register usages to mop4 instructions #135641

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

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

virginia-cangelosi
Copy link
Contributor

Ensure all floating mop4 instructions implicitly use FPCR

Ensure all floating mop4 instructions implicitly use FPCR
@llvmbot
Copy link
Member

llvmbot commented Apr 14, 2025

@llvm/pr-subscribers-backend-aarch64

Author: Virginia Cangelosi (virginia-cangelosi)

Changes

Ensure all floating mop4 instructions implicitly use FPCR


Full diff: https://github.com/llvm/llvm-project/pull/135641.diff

1 Files Affected:

  • (modified) llvm/lib/Target/AArch64/SMEInstrFormats.td (+6)
diff --git a/llvm/lib/Target/AArch64/SMEInstrFormats.td b/llvm/lib/Target/AArch64/SMEInstrFormats.td
index b611dddb0b045..d770aff22e9f1 100644
--- a/llvm/lib/Target/AArch64/SMEInstrFormats.td
+++ b/llvm/lib/Target/AArch64/SMEInstrFormats.td
@@ -5595,6 +5595,7 @@ class sme2_bf16_fp32_quarter_tile_outer_product<bit M, bit N, bit S, string mnem
   let Inst{1-0} = ZAda;
 
   let Constraints = "$ZAda = $_ZAda";
+  let Uses = [FPCR];
 }
 
 multiclass sme2_bfmop4as_widening<bit S, string mnemonic, string op> {
@@ -5758,6 +5759,7 @@ class sme2_fp16_quarter_tile_outer_product<bit M, bit N, bit S, string mnemonic,
   let Inst{0} = ZAda;
 
   let Constraints = "$ZAda = $_ZAda";
+  let Uses = [FPCR];
 }
 
 multiclass sme2_fmop4as_fp16_non_widening<bit S, string mnemonic, string op> {
@@ -5846,6 +5848,7 @@ class sme2_bf16_fp16_quarter_tile_outer_product<bit M, bit N, bit S, string mnem
   let Inst{0} = ZAda;
 
   let Constraints = "$ZAda = $_ZAda";
+  let Uses = [FPCR];
 }
 
 multiclass sme2_bfmop4as_non_widening<bit S, string mnemonic, string op> {
@@ -5899,6 +5902,7 @@ class sme2_fp32_quarter_tile_outer_product<bit M, bit N, bit S, string mnemonic,
   let Inst{1-0} = ZAda;
 
   let Constraints = "$ZAda = $_ZAda";
+  let Uses = [FPCR];
 }
 
 multiclass sme2_fmop4as_fp32_non_widening<bit S, string mnemonic, string op> {
@@ -5952,6 +5956,7 @@ class sme2_fp64_quarter_tile_outer_product<bit M, bit N, bit S, string mnemonic,
   let Inst{2-0} = ZAda;
 
   let Constraints = "$ZAda = $_ZAda";
+  let Uses = [FPCR];
 }
 
 multiclass sme2_fmop4as_fp64_non_widening<bit S, string mnemonic, string op> {
@@ -6005,6 +6010,7 @@ class sme2_fp16_fp32_quarter_tile_outer_product<bit M, bit N, bit S, string mnem
   let Inst{1-0} = ZAda;
 
   let Constraints = "$ZAda = $_ZAda";
+  let Uses = [FPCR];
 }
 
 multiclass sme2_fmop4as_fp16_fp32_widening<bit S, string mnemonic, string op> {

@jthackray jthackray self-requested a review April 15, 2025 08:53
Copy link
Contributor

@jthackray jthackray left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Lukacma Lukacma left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@CarolineConcatto CarolineConcatto left a comment

Choose a reason for hiding this comment

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

What about the FP8 classes for MOP4, are they updated in previous patches?
sme2_fp8_fp16_quarter_tile_outer_product
sme2_fp8_fp32_quarter_tile_outer_product

@virginia-cangelosi
Copy link
Contributor Author

Yes they will be updated in #130127

But they are still correct for now as there are let Uses = [FPMR, FPCR] in { in AArch64SMEInstrInfo.td Around each of them

@virginia-cangelosi virginia-cangelosi merged commit be7cf63 into llvm:main Apr 28, 2025
12 of 13 checks passed
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
Ensure all floating mop4 instructions implicitly use FPCR
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
Ensure all floating mop4 instructions implicitly use FPCR
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
Ensure all floating mop4 instructions implicitly use FPCR
Ankur-0429 pushed a commit to Ankur-0429/llvm-project that referenced this pull request May 9, 2025
Ensure all floating mop4 instructions implicitly use FPCR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants