File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1010
1111#include " mlir/IR/OpImplementation.h"
1212#include " llvm/ADT/TypeSwitch.h"
13+ #include " mlir/Dialect/SYCL/IR/SYCLOpsTypes.h"
1314
1415bool mlir::sycl::SYCLCastOp::areCastCompatible (::mlir::TypeRange Inputs,
1516 ::mlir::TypeRange Outputs) {
@@ -46,10 +47,11 @@ bool mlir::sycl::SYCLCastOp::areCastCompatible(::mlir::TypeRange Inputs,
4647}
4748
4849mlir::LogicalResult mlir::sycl::SYCLConstructorOp::verify () {
49- if (!getOperand (0 ).getType ().dyn_cast <mlir::MemRefType>())
50- return emitOpError (
51- " The first argument of a sycl::constructor op has to be a MemRef" );
52- return success ();
50+ if (getOperand (0 ).getType ().dyn_cast <mlir::MemRefType>() && isSYCLType (getOperand (0 ).getType ().cast <mlir::MemRefType>().getElementType ()))
51+ return success ();
52+
53+ return emitOpError (
54+ " The first argument of a sycl::constructor op has to be a MemRef to a SYCL type" );
5355}
5456
5557mlir::LogicalResult mlir::sycl::SYCLAccessorSubscriptOp::verify () {
You can’t perform that action at this time.
0 commit comments