[clang] [mlir] [CIR] Honor the Direct coercion offset in x86_64 callconv lowering (PR #220724)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 8 09:46:34 PDT 2026
================
@@ -147,6 +148,36 @@ float takeFloatEmptyFirst(FloatEmptyFirst v) { return v.a; }
// CIR: cir.func {{.*}}@_Z19takeFloatEmptyFirst15FloatEmptyFirst(%arg0: !cir.double {{.*}}) -> (!cir.float
// LLVM: define dso_local noundef float @_Z19takeFloatEmptyFirst15FloatEmptyFirst(double %{{[^,]+}})
+// Here the empty member owns eightbyte 0 rather than eightbyte 1, so NoClass
+// cannot just be dropped: the coercion has to start at byte 8.
+long takeHiWord(HiWord v) { return v.hi; }
+
+// CIR: cir.func {{.*}}@_Z10takeHiWord6HiWord(%arg0: !s64i {{.*}}) -> (!s64i
+// LLVM: define dso_local noundef i64 @_Z10takeHiWord6HiWord(i64 %{{[^,]+}})
+// LLVM: %{{.+}} = getelementptr{{( inbounds)?}} i8, ptr %{{.+}}, i64 8
+// LLVM: store i64 %{{.+}}, ptr %{{.+}}, align 8
----------------
andykaylor wrote:
The checks here should connect the argument to the store. This has too many wildcardas.
https://github.com/llvm/llvm-project/pull/220724
More information about the cfe-commits
mailing list