[llvm] [RISCV][GISel] Reverse the operands the buildStore created in legalizeVAStart. (PR #73989)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 07:39:58 PST 2023


================
@@ -0,0 +1,41 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=riscv32 -run-pass=legalizer %s -o - | FileCheck --check-prefix=RV32 %s
+
+--- |
+  declare void @llvm.va_start(ptr) #0
+
+  define void @test_va_start(ptr %0, ptr %1, ptr %2, ptr %3, ptr %4, ptr %5, ptr %6, ptr %7, ...) {
+    %va = alloca ptr
+    call void @llvm.va_start(ptr %va)
+    ret void
+  }
+
+  attributes #0 = { nocallback nofree nosync nounwind willreturn }
+
+...
+---
+name:            test_va_start
+tracksRegLiveness: true
+fixedStack:
+  - { id: 0, size: 4, alignment: 16, isImmutable: true }
----------------
michaelmaitland wrote:

What is the reason that alignment is 16 here but 4 in the stack below?

https://github.com/llvm/llvm-project/pull/73989


More information about the llvm-commits mailing list