[Mlir-commits] [mlir] a5d7e2a - [OpenMP][mlir] fix broken build
Aart Bik
llvmlistbot at llvm.org
Fri May 27 10:06:09 PDT 2022
Author: Aart Bik
Date: 2022-05-27T10:06:01-07:00
New Revision: a5d7e2a8ac7ec30957da288dcd3ca4d7aa946d22
URL: https://github.com/llvm/llvm-project/commit/a5d7e2a8ac7ec30957da288dcd3ca4d7aa946d22
DIFF: https://github.com/llvm/llvm-project/commit/a5d7e2a8ac7ec30957da288dcd3ca4d7aa946d22.diff
LOG: [OpenMP][mlir] fix broken build
Reviewed By: Mogball
Differential Revision: https://reviews.llvm.org/D126556
Added:
Modified:
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td b/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
index ce96f6f5c3fbb..18b7eb9457139 100644
--- a/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
+++ b/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
@@ -823,7 +823,7 @@ def AtomicReadOp : OpenMP_Op<"atomic.read", [AllTypesMatch<["x", "v"]>]> {
/// The i-th variable operand passed.
Value getVariableOperand(unsigned i) {
- assert(0 <= i < 2 && "invalid index position for an operand");
+ assert(0 <= i && i < 2 && "invalid index position for an operand");
return i == 0 ? x() : v();
}
}];
@@ -871,7 +871,7 @@ def AtomicWriteOp : OpenMP_Op<"atomic.write"> {
/// The i-th variable operand passed.
Value getVariableOperand(unsigned i) {
- assert(0 <= i < 2 && "invalid index position for an operand");
+ assert(0 <= i && i < 2 && "invalid index position for an operand");
return i == 0 ? address() : value();
}
}];
diff --git a/mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp b/mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp
index 25eb2bf5ddc44..3f0964dc1115b 100644
--- a/mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp
+++ b/mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp
@@ -63,7 +63,8 @@ struct RegionLessOpConversion : public ConvertOpToLLVMPattern<T> {
return failure();
if (originalVariableOperand.getType().isa<MemRefType>()) {
// TODO: Support memref type in variable operands
- rewriter.notifyMatchFailure(curOp, "memref is not supported yet");
+ return rewriter.notifyMatchFailure(curOp,
+ "memref is not supported yet");
} else {
convertedOperands.emplace_back(adaptor.getOperands()[idx]);
}
More information about the Mlir-commits
mailing list