-
Notifications
You must be signed in to change notification settings - Fork 15.5k
[RISCV] Add a test for multiple save locations of a callee-saved register #164479
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
|
@llvm/pr-subscribers-backend-risc-v Author: Mikhail Gudim (mgudim) ChangesTechnically, it is possible that the a callee-saved register is saved in different locations. CFIInstrInserter should handle this, but currently it does not. Full diff: https://github.com/llvm/llvm-project/pull/164479.diff 1 Files Affected:
diff --git a/llvm/test/CodeGen/RISCV/cfi-multiple-locations.mir b/llvm/test/CodeGen/RISCV/cfi-multiple-locations.mir
new file mode 100644
index 0000000000000..075536e10bce6
--- /dev/null
+++ b/llvm/test/CodeGen/RISCV/cfi-multiple-locations.mir
@@ -0,0 +1,35 @@
+# RUN: llc %s -mtriple=riscv64 \
+# RUN: -run-pass=cfi-instr-inserter \
+# RUN: -riscv-enable-cfi-instr-inserter=true
+# XFAIL: *
+
+# Technically, it is possible that the a callee-saved register is saved in different locations.
+# CFIInstrInserter should handle this, but currently it does not.
+---
+name: multiple_locations
+tracksRegLiveness: true
+body: |
+ bb.0.entry:
+ liveins: $x10, $x9, $x2
+ BEQ $x10, $x0, %bb.3
+ PseudoBR %bb.2
+
+ bb.1:
+ liveins: $x10, $x9, $x2
+ $x5 = COPY $x9
+ CFI_INSTRUCTION register $x9, $x5
+ $x9 = COPY $x5
+ CFI_INSTRUCTION register $x9, $x9
+ PseudoBR %bb.3
+
+ bb.2:
+ liveins: $x10, $x9, $x2
+ SD $x9, $x2, 0 :: (store (s64))
+ CFI_INSTRUCTION offset $x9, 0
+ $x9 = LD $x2, 0 :: (load (s64))
+ CFI_INSTRUCTION register $x9, $x9
+ PseudoBR %bb.3
+
+ bb.3:
+ PseudoRET
+...
|
|
Please put |
Technically, it is possible that the a callee-saved register is saved in different locations. CFIInstrInserter should handle this, but currently it does not.
30d10a9 to
4f5d8e0
Compare
|
Can you not use "CSR" in the title? CSR has a specific RISC-V meaning, as well as not actually differentiating between "caller-saved register" and "callee-saved register". |
|
I believe this test is causing test errors because it generates a .s file with no RUN lines causing problems when trying to run tests: Other tests that I can see using llc write the output to stdout and then pipe it to FileCheck, neither of which this test does. If you do not care about the actual output file, can we maybe send the output to |
It's hard to solve this immediately, as evidently you're not cleaning up the source directory before builds. This test should no longer be being run at all, but evidently the |
Technically, it is possible that the a callee-saved register is saved in different locations. CFIInstrInserter should handle this, but currently it does not.