[clang] [Clang][AArch64] Fixed incorrect _BitInt alignment (PR #90602)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 7 07:05:20 PDT 2024


================
@@ -518,6 +518,16 @@ class TargetInfo : public TransferrableTargetInfo,
   /// getInt128Align() - Returns the alignment of Int128.
   unsigned getInt128Align() const { return Int128Align; }
 
+  /// getBitIntAlign/Width - Return aligned size of '_BitInt' and
+  /// 'unsigned _BitInt' for this target, in bits.
+  unsigned getBitIntWidth(unsigned NumBits) const {
+    return llvm::alignTo(NumBits, getBitIntAlign(NumBits));
+  }
+  virtual unsigned getBitIntAlign(unsigned NumBits) const {
----------------
Lukacma wrote:

I am not sure I understand how this idea would work. Could you please elaborate on what do you mean ?

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


More information about the cfe-commits mailing list