We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c1539c commit 0663654Copy full SHA for 0663654
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
@@ -32,6 +32,7 @@
32
#include "llvm/ADT/StringExtras.h"
33
#include "llvm/ADT/StringRef.h"
34
#include "llvm/ADT/TypeSwitch.h"
35
+#include "llvm/ADT/bit.h"
36
#include "llvm/Frontend/OpenMP/OMPConstants.h"
37
#include "llvm/Frontend/OpenMP/OMPDeviceConstants.h"
38
#include <cstddef>
@@ -3518,7 +3519,7 @@ LogicalResult AllocateDirOp::verify() {
3518
3519
std::optional<u_int64_t> align = this->getAlign();
3520
3521
if (align.has_value()) {
- if ((align.value() > 0) && ((align.value() & (align.value() - 1)) != 0))
3522
+ if ((align.value() > 0) && !llvm::has_single_bit(align.value()))
3523
return emitError() << "ALIGN value : " << align.value()
3524
<< " must be power of 2";
3525
}
0 commit comments