[PATCH] D103474: [PowerPC][AIX] Fix static_assert while bootstrapping.

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 1 10:57:17 PDT 2021


sfertile created this revision.
sfertile added reviewers: hubert.reinterpretcast, nemanjai, jasonliu.
sfertile added a project: PowerPC.
Herald added subscribers: dexonsmith, shchenz.
sfertile requested review of this revision.
Herald added a project: LLVM.

A recent patch https://reviews.llvm.org/rGe0921655b1ff8d4ba7c14be59252fe05b705920e changed clangs AIX bitfield handling to uses 4-byte bitfield containers, matching XLs behavior. This change triggers static assert failures when bootsrapping. Update the macros we check to enable bitfield packing on AIX to in check for `__clang__` which is defined by both xlclang and clang.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103474

Files:
  llvm/include/llvm/CodeGen/SelectionDAGNodes.h
  llvm/include/llvm/IR/BasicBlock.h


Index: llvm/include/llvm/IR/BasicBlock.h
===================================================================
--- llvm/include/llvm/IR/BasicBlock.h
+++ llvm/include/llvm/IR/BasicBlock.h
@@ -513,7 +513,7 @@
   void validateInstrOrdering() const;
 
 private:
-#if defined(_AIX) && (!defined(__GNUC__) || defined(__ibmxl__))
+#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_TWO_BYTE_PACK() _Pragma("pack(2)")
Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
===================================================================
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -462,7 +462,7 @@
   // SubclassData.  These are designed to fit within a uint16_t so they pack
   // with NodeType.
 
-#if defined(_AIX) && (!defined(__GNUC__) || defined(__ibmxl__))
+#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_TWO_BYTE_PACK() _Pragma("pack(2)")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103474.349022.patch
Type: text/x-patch
Size: 1210 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210601/519b6ff1/attachment.bin>


More information about the llvm-commits mailing list