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 e0ae9ef commit 7c6daf9Copy full SHA for 7c6daf9
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
@@ -33,6 +33,7 @@
33
#include "llvm/ADT/StringExtras.h"
34
#include "llvm/ADT/StringRef.h"
35
#include "llvm/ADT/TypeSwitch.h"
36
+#include "llvm/ADT/bit.h"
37
#include "llvm/Frontend/OpenMP/OMPConstants.h"
38
#include "llvm/Frontend/OpenMP/OMPDeviceConstants.h"
39
#include <cstddef>
@@ -3869,7 +3870,7 @@ LogicalResult AllocateDirOp::verify() {
3869
3870
std::optional<u_int64_t> align = this->getAlign();
3871
3872
if (align.has_value()) {
- if ((align.value() > 0) && ((align.value() & (align.value() - 1)) != 0))
3873
+ if ((align.value() > 0) && !llvm::has_single_bit(align.value()))
3874
return emitError() << "ALIGN value : " << align.value()
3875
<< " must be power of 2";
3876
}
0 commit comments