[llvm] [VPlan] Use pragma pack(1) for VPIRFlags on AIX. (PR #184687)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 10:52:07 PST 2026
================
@@ -668,6 +668,16 @@ class VPSingleDefRecipe : public VPRecipeBase, public VPRecipeValue {
};
/// Class to record and manage LLVM IR flags.
+#if defined(_AIX) && (!defined(__GNUC__) || defined(__clang__))
+// Except for GCC; by default, AIX compilers store bit-fields in 4-byte words
+// and give the `pack` pragma push semantics.
+#define BEGIN_ONE_BYTE_PACK() _Pragma("pack(1)")
+#define END_ONE_BYTE_PACK() _Pragma("pack(pop)")
+#else
+#define BEGIN_ONE_BYTE_PACK()
+#define END_ONE_BYTE_PACK()
+#endif
----------------
fhahn wrote:
Thanks, updated to use LLVM_PACKED_START/END, now no longer AIX specific
https://github.com/llvm/llvm-project/pull/184687
More information about the llvm-commits
mailing list