[Mlir-commits] [mlir] [MLIR] [OpenMP] Initial support for OMP ALLOCATE directive op. (PR #147900)

Krzysztof Parzyszek llvmlistbot at llvm.org
Thu Jul 10 11:12:32 PDT 2025


================
@@ -3865,6 +3865,20 @@ LogicalResult ScanOp::verify() {
                    "reduction modifier");
 }
 
+/// Verifies align clause in allocate directive
+
+LogicalResult AllocateDirOp::verify() {
+  std::optional<u_int64_t> align = this->getAlign();
+
+  if (align.has_value()) {
+    if ((align.value() > 0) && ((align.value() & (align.value() - 1)) != 0))
----------------
kparzysz wrote:

#include "llvm/ADT/bit.h"

`if (llvm::has_single_bit(align.value()))`

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


More information about the Mlir-commits mailing list