[clang] [CIR] Move records through memory in x86_64 call lowering (PR #231663)
Adam Smith via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 14 13:47:54 PDT 2026
================
@@ -88,7 +88,6 @@ cir.func @takes_dim3(%arg0: !rec_Dim3)
}
// CHECK: cir.func{{.*}} @takes_dim3(%[[D0:.*]]: !s64i, %[[D1:.*]]: !s32i)
-// CHECK: cir.alloca "coerce" {{.*}} : !cir.ptr<{{.*}}, target_address_space(5)>
----------------
adams381 wrote:
Yes, that alloca is gone. We used to store the fields into one slot, load the coerced struct back out, store it into a second slot, and then load the record from there. Now the fields go into a single slot and the body reads the record through a cast of it. The test never checked that load/store pair, which is why nothing else changed. I added checks for the cast and for there being no record load after it.
https://github.com/llvm/llvm-project/pull/231663
More information about the cfe-commits
mailing list