Skip to content

[RISCV][Scheduler] Split UnsupportedSchedZfa by other fp extensions #140186

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

Conversation

el-ev
Copy link
Member

@el-ev el-ev commented May 16, 2025

Originally posted by @wangpc-pp and @el-ev in #140003 (comment)

Probably UnsupportedSchedZfaWithD/UnsupportedSchedZfaWithZfh are also needed to be defined.

Yeah, I tend to do that. Zfa is special because it is orthogonal to other floating-point extensions.

@llvmbot
Copy link
Member

llvmbot commented May 16, 2025

@llvm/pr-subscribers-backend-risc-v

Author: Iris Shi (el-ev)

Changes

Originally posted by @wangpc-pp and @el-ev in #140003 (comment)

> Probably UnsupportedSchedZfaWithD/UnsupportedSchedZfaWithZfh are also needed to be defined.

> Yeah, I tend to do that. Zfa is special because it is orthogonal to other floating-point extensions.


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

1 Files Affected:

  • (modified) llvm/lib/Target/RISCV/RISCVSchedule.td (+19-6)
diff --git a/llvm/lib/Target/RISCV/RISCVSchedule.td b/llvm/lib/Target/RISCV/RISCVSchedule.td
index f23325b1d8dc2..4d49ad4d6b317 100644
--- a/llvm/lib/Target/RISCV/RISCVSchedule.td
+++ b/llvm/lib/Target/RISCV/RISCVSchedule.td
@@ -454,18 +454,31 @@ def : ReadAdvance<ReadFRoundF128, 0>;
 }
 }
 
-multiclass UnsupportedSchedZfa : UnsupportedSchedZfaWithQ {
+multiclass UnsupportedSchedZfaWithD : UnsupportedSchedZfaWithQ {
 let Unsupported = true in {
-def : WriteRes<WriteFRoundF16, []>;
-def : WriteRes<WriteFRoundF32, []>;
 def : WriteRes<WriteFRoundF64, []>;
-def : WriteRes<WriteFLI16, []>;
-def : WriteRes<WriteFLI32, []>;
 def : WriteRes<WriteFLI64, []>;
 
-def : ReadAdvance<ReadFRoundF32, 0>;
 def : ReadAdvance<ReadFRoundF64, 0>;
+}
+}
+
+multiclass UnsupportedSchedZfaWithZfh {
+let Unsupported = true in {
+def : WriteRes<WriteFRoundF16, []>;
+def : WriteRes<WriteFLI16, []>;
+
 def : ReadAdvance<ReadFRoundF16, 0>;
+}
+}
+
+multiclass UnsupportedSchedZfa : UnsupportedSchedZfaWithD,
+                                 UnsupportedSchedZfaWithZfh {
+let Unsupported = true in {
+def : WriteRes<WriteFRoundF32, []>;
+def : WriteRes<WriteFLI32, []>;
+
+def : ReadAdvance<ReadFRoundF32, 0>;
 } // Unsupported = true
 }
 

Copy link
Contributor

@wangpc-pp wangpc-pp left a comment

Choose a reason for hiding this comment

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

LGTM.

@el-ev el-ev merged commit 1c2c02c into main May 16, 2025
13 checks passed
@el-ev el-ev deleted the users/el-ev/05-16-_riscv_scheduler_split_unsupportedschedzfa_by_other_fp_extensions branch May 16, 2025 07:30
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.

3 participants