Issue 55442
Summary [riscv] Miscompile related to frame alignment w/o frame pointer + exception
Labels backend:RISC-V, miscompilation
Assignees kito-cheng
Reporter preames
    Filing this on Keto's behalf.  This got mentioned in private email, and I wanted a tracking issue.  

MultiSource/C++/frame_layout from llvm-testsuite, failed when
-march=rv64gcv -fno-omit-frame-pointer (and yes, that will broken even
no VLS vectorizer enabled!)

This is believed to be related to both exception handling, and frame alignment with RVV objects, but that has not yet been conclusively confirmed.  No reduced test case available at this time.

Here's Kito's brief writeup on his current thinking on the bug.  

I didn't have a small enough reduced case yet, but that's the
situation for this testcase:

---
try {
  sp adjust for outgoing args. # 1. Sp changed.
  func_call  # 2. Exception raised
  sp restore # Oh, not restored
} catch {
  # 3. And now we are here.
}

# 4. Prepare to return!, restore return address from stack, but...sp is wrong.
# 5. Screw up!
---

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to