[flang-commits] [compiler-rt] [clang-tools-extra] [flang] [llvm] [clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

via flang-commits flang-commits at lists.llvm.org
Mon Nov 13 11:44:22 PST 2023


================
@@ -334,11 +334,12 @@ CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
     // This attribute requires an integer argument which is a constant power of
     // two between 1 and 4096 inclusive.
     int AlignValue = ArgVal.getSExtValue();
-    if (AlignValue < CodeAlignAttr::getMinValue() ||
-        AlignValue > CodeAlignAttr::getMaxValue() || !ArgVal.isPowerOf2()) {
+    static int MaximumAlignment = 4096;
----------------
smanna12 wrote:

I see! Thanks @erichkeane for clarification. Fixed now with commit https://github.com/llvm/llvm-project/pull/70762/commits/aa85ed1ede892c7da3d5c2dee5886dd0e2ad0cb7

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


More information about the flang-commits mailing list