@@ -61,12 +61,21 @@ static LogicalResult lowerToLLVMDialect(ModuleOp module) {
61
61
}
62
62
63
63
TEST (MLIRExecutionEngine, SKIP_WITHOUT_JIT(AddInteger)) {
64
+ #ifdef __s390__
65
+ std::string moduleStr = R"mlir(
66
+ func.func @foo(%arg0 : i32 {llvm.signext}) -> (i32 {llvm.signext}) attributes { llvm.emit_c_interface } {
67
+ %res = arith.addi %arg0, %arg0 : i32
68
+ return %res : i32
69
+ }
70
+ )mlir" ;
71
+ #else
64
72
std::string moduleStr = R"mlir(
65
73
func.func @foo(%arg0 : i32) -> i32 attributes { llvm.emit_c_interface } {
66
74
%res = arith.addi %arg0, %arg0 : i32
67
75
return %res : i32
68
76
}
69
77
)mlir" ;
78
+ #endif
70
79
DialectRegistry registry;
71
80
registerAllDialects (registry);
72
81
registerBuiltinDialectTranslation (registry);
@@ -259,6 +268,16 @@ TEST(NativeMemRefJit, MAYBE_JITCallback) {
259
268
for (float &elt : *a)
260
269
elt = count++;
261
270
271
+ #ifdef __s390__
272
+ std::string moduleStr = R"mlir(
273
+ func.func private @callback(%arg0: memref<?x?xf32>, %coefficient: i32 {llvm.signext}) attributes { llvm.emit_c_interface }
274
+ func.func @caller_for_callback(%arg0: memref<?x?xf32>, %coefficient: i32 {llvm.signext}) attributes { llvm.emit_c_interface } {
275
+ %unranked = memref.cast %arg0: memref<?x?xf32> to memref<*xf32>
276
+ call @callback(%arg0, %coefficient) : (memref<?x?xf32>, i32) -> ()
277
+ return
278
+ }
279
+ )mlir" ;
280
+ #else
262
281
std::string moduleStr = R"mlir(
263
282
func.func private @callback(%arg0: memref<?x?xf32>, %coefficient: i32) attributes { llvm.emit_c_interface }
264
283
func.func @caller_for_callback(%arg0: memref<?x?xf32>, %coefficient: i32) attributes { llvm.emit_c_interface } {
@@ -267,6 +286,8 @@ TEST(NativeMemRefJit, MAYBE_JITCallback) {
267
286
return
268
287
}
269
288
)mlir" ;
289
+ #endif
290
+
270
291
DialectRegistry registry;
271
292
registerAllDialects (registry);
272
293
registerBuiltinDialectTranslation (registry);
0 commit comments