================
@@ -54,6 +54,29 @@ long double f_longdouble(long a, struct align16_longdouble
b) {
return b.x;
}
+// CHECK-LABEL: define{{.*}} signext i32 @f_float_aligned(float noundef %a,
i64 %0, i64 %b.coerce0, i64 %b.coerce1)
+int f_float_aligned(float a, struct align16_int b) {
+ return b.x;
+}
+
+// CHECK-LABEL: define{{.*}} signext i32 @f_float_pair_aligned(float noundef
%a, float noundef %b, i64 %c.coerce0, i64 %c.coerce1)
+int f_float_pair_aligned(float a, float b, struct align16_int c) {
+ return c.x;
+}
+
+// CHECK-LABEL: define{{.*}} i64 @f_char_int128_aligned(i8 noundef signext %x,
i64 %0, i128 noundef %v, i64 %q.coerce0, i64 %q.coerce1)
+struct aligned16_struct { long a, b; } __attribute__((aligned(16)));
+long f_char_int128_aligned(char x, __int128 v, struct aligned16_struct q) {
+ return q.a;
+}
+
+// FIXME: alignment on typedefs should be taken into account, but isn't.
----------------
efriedma-quic wrote:
The gcc-style `aligned` attribute on typedefs is a mess; it isn't part of the
canonical type, so it doesn't integrate into the type system properly. This
isn't fundamental to the notion of an alignment qualifier; the Microsoft
`__unaligned` is properly integrated. But it's the current state, and I doubt
anyone will try to address it anytime soon.
(Note that this is unrelated to the `aligned` attribute on structs or fields,
which works differently.)
https://github.com/llvm/llvm-project/pull/213739
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits