[llvm] [RISCV] Add a test showing that scalable offsets are not handled. (PR #164480)
Petr Penzin via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 31 11:26:23 PDT 2025
================
@@ -0,0 +1,94 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
+# RUN: llc %s -mtriple=riscv64 -mattr=+v \
+# RUN: -run-pass=prologepilog,cfi-instr-inserter \
+# RUN: -riscv-enable-cfi-instr-inserter=true \
+# RUN: -o - | FileCheck %s
+# XFAIL: *
+#
+# In this test prolog will be inserted in bb.3. We need to save the scalable vector register v1.
+# In bb.3 the new rule for computing CFA will be (sp + 16 + 1 * vlenb) which we encode using cfi_escape. Also, $v1 will be saved at (cfa - 1 * vlenb), which we also encode using cfi_escape.
+# Since the only way to get to bb.2 is from bb.3, the same cfi's should be emitted at beginning of bb.2
+#
+# Currently CFIInstrInserter can't handle escape, so we end up with wrong CFI.
+# NOTE: if llc was compiled with NDEBUG, this will just crash. Otherwise, the output will be as in CHECK lines.
----------------
ppenzin wrote:
Would that be a problem? Do people usually run tests in debug mode?
https://github.com/llvm/llvm-project/pull/164480
More information about the llvm-commits
mailing list