[clang] [llvm] [clang][SPARC] Pass 16-aligned structs with the correct alignment in CC (PR #155829)

via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 22 19:54:37 PDT 2025


================
@@ -215,6 +259,17 @@ int f_variable(char *f, ...) {
   case 'm':
     s += *va_arg(ap, struct medium).a;
     break;
+
+// CHECK: %[[CUR:[^ ]+]] = load ptr, ptr %ap
+// CHECK-DAG: %[[NXT:[^ ]+]] = getelementptr inbounds i8, ptr %[[CUR]], i64 8
+// CHECK-DAG: store ptr %[[NXT]], ptr %ap
+// CHECK-DAG: %[[ADR:[^ ]+]] = load ptr, ptr %[[CUR]]
----------------
koachan wrote:

Oof, thanks for noticing that, I think I made a mistake in writing the test case ().
In any case, should be fixed now~

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


More information about the cfe-commits mailing list