[clang] [mlir] [CIR] Honor the Direct coercion offset in x86_64 callconv lowering (PR #220724)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 2 13:50:04 PDT 2026


================
@@ -330,6 +337,19 @@ emitCoercionToMemory(mlir::OpBuilder &builder, mlir::Location loc,
                           ? srcTy
                           : dstTy;
 
+  // Sizes are compared two ways on purpose: relative size in
+  // coercionByteSize terms, which is how slotTy was picked, and capacity in
+  // getTypeSize terms, which is what the alloca is given.
+  [[maybe_unused]] mlir::Type coercedTy = slotTy == srcTy ? dstTy : srcTy;
----------------
erichkeane wrote:

```suggestion
  [[maybe_unused]] mlir::Type coercedTy = ((slotTy == srcTy) ? dstTy : srcTy);
```

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


More information about the cfe-commits mailing list