-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
[RISCV] Mark vmvNr.v as implicitly using vtype #118414
base: main
Are you sure you want to change the base?
Conversation
This was pointed out in llvm#118283 (comment). We cannot move these between vtype definitions as they depend on SEW and require vill to be clear.
@llvm/pr-subscribers-backend-risc-v Author: Luke Lau (lukel97) ChangesThis was pointed out in #118283 (comment). We cannot move these between vtype definitions as they depend on SEW and require vill to be clear. Full diff: https://github.com/llvm/llvm-project/pull/118414.diff 1 Files Affected:
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoV.td b/llvm/lib/Target/RISCV/RISCVInstrInfoV.td
index 8e0c4826ac00de..6506b6746b1517 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoV.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoV.td
@@ -1726,7 +1726,7 @@ foreach n = [1, 2, 4, 8] in {
def VMV#n#R_V : RVInstV<0b100111, !add(n, -1), OPIVI, (outs vrc:$vd),
(ins vrc:$vs2), "vmv" # n # "r.v", "$vd, $vs2">,
VMVRSched<n> {
- let Uses = [];
+ let Uses = [VTYPE];
let vm = 1;
}
}
|
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.
LGTM
I had to update the llvm-mca tests, I'm not sure why adding a use affects the number of cycles. cc @mshockwave |
LGTM as well, the mca change is at least reasonable if we're modeling a new runtime dependency which wasn't previously being modeled. |
Looking at the test. There are vsetvlis interleaved with vmv. So I assume llvm-mca is now waiting for the preceding vsetvli before it can start a vmv. |
This was pointed out in #118283 (comment). We cannot move these between vtype definitions as they depend on SEW and require vill to be clear.