[llvm] [DataLayout] Add byte specification (PR #106536)

Alexander Richardson via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 11:21:39 PDT 2024


================
@@ -807,7 +855,7 @@ Align DataLayout::getAlignment(Type *Ty, bool abi_or_pref) const {
     // approximation of reality, and if the user wanted something less
     // less conservative, they should have specified it explicitly in the data
     // layout.
-    return Align(PowerOf2Ceil(BitWidth / 8));
+    return Align(PowerOf2Ceil(getTypeStoreSize(Ty).getFixedValue()));
----------------
arichardson wrote:

I think this is actually a change? Isn't the store size for fp80 128 bits (or maybe 96)? That is not the same as the type size?

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


More information about the llvm-commits mailing list