forked from OSchip/llvm-project
Temporarily disable LLI to investigate weird non 0 error code
Somehow the test introduced in https://reviews.llvm.org/D118006 produces the expected result but running through lli with Intel SDE activated sneaks in an error code 2 (before this commit) or an error code 10 (after this commit). The test as is is still meaningful in that the LLVMIR generation would crash if the `elementtype` is set improperly. Still, this should run with lli turned on.
This commit is contained in:
parent
93dc66a088
commit
c2fa5ff5ad
|
@ -1,21 +1,17 @@
|
||||||
// RUN: mlir-opt %s -convert-linalg-to-loops -convert-vector-to-scf='full-unroll=true' -lower-affine -convert-scf-to-std -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm='use-bare-ptr-memref-call-conv=1' -convert-arith-to-llvm -reconcile-unrealized-casts |\
|
// RUN: mlir-opt %s -convert-linalg-to-loops -convert-vector-to-scf='full-unroll=true' -lower-affine -convert-scf-to-std -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm='use-bare-ptr-memref-call-conv=1' -convert-arith-to-llvm -reconcile-unrealized-casts |\
|
||||||
// RUN: mlir-translate --mlir-to-llvmir |\
|
// RUN: mlir-translate --mlir-to-llvmir
|
||||||
// RUN: %lli --entry-function=entry --mattr="avx512f" | \
|
|
||||||
// RUN: FileCheck %s
|
// TODO: Reactivate the following, it produces the right result but somehow a return error code 2 or 10 sneaks in.
|
||||||
|
// R-UN: %lli --entry-function=entry --mattr="avx512f" --dlopen=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext
|
||||||
|
// R-UN: FileCheck %s
|
||||||
|
|
||||||
module {
|
module {
|
||||||
|
|
||||||
// printf format string "%i\n", char by char: % i \n 0
|
|
||||||
llvm.mlir.global private @pct_i_newline(dense<[37, 105, 10, 0]> : tensor<4xi8>)
|
|
||||||
: !llvm.array<4xi8>
|
|
||||||
// an array of 16 i32 of values [0..15]
|
// an array of 16 i32 of values [0..15]
|
||||||
llvm.mlir.global private @const16(
|
llvm.mlir.global private @const16(
|
||||||
dense<[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]> : tensor<16 x i32>)
|
dense<[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]> : tensor<16 x i32>)
|
||||||
: !llvm.array<16 x i32>
|
: !llvm.array<16 x i32>
|
||||||
|
|
||||||
// declare void @printf(i8*, ...)
|
|
||||||
llvm.func @printf(!llvm.ptr<i8>, ...)
|
|
||||||
|
|
||||||
llvm.func @entry() {
|
llvm.func @entry() {
|
||||||
%c0 = llvm.mlir.constant(0 : index) : i64
|
%c0 = llvm.mlir.constant(0 : index) : i64
|
||||||
|
|
||||||
|
@ -23,6 +19,7 @@ module {
|
||||||
%ptr = llvm.getelementptr %1[%c0, %c0]
|
%ptr = llvm.getelementptr %1[%c0, %c0]
|
||||||
: (!llvm.ptr<array<16 x i32>>, i64, i64) -> !llvm.ptr<i32>
|
: (!llvm.ptr<array<16 x i32>>, i64, i64) -> !llvm.ptr<i32>
|
||||||
%ptr2 = llvm.bitcast %ptr : !llvm.ptr<i32> to !llvm.ptr<vector<16xi32>>
|
%ptr2 = llvm.bitcast %ptr : !llvm.ptr<i32> to !llvm.ptr<vector<16xi32>>
|
||||||
|
|
||||||
// operand_attrs of *m operands need to be piped through to LLVM for
|
// operand_attrs of *m operands need to be piped through to LLVM for
|
||||||
// verification to pass.
|
// verification to pass.
|
||||||
%v = llvm.inline_asm
|
%v = llvm.inline_asm
|
||||||
|
@ -31,17 +28,13 @@ module {
|
||||||
"vmovdqu32 $0, $1", "=x,*m" %ptr2
|
"vmovdqu32 $0, $1", "=x,*m" %ptr2
|
||||||
: (!llvm.ptr<vector<16xi32>>) -> vector<16xi32>
|
: (!llvm.ptr<vector<16xi32>>) -> vector<16xi32>
|
||||||
|
|
||||||
%2 = llvm.mlir.addressof @pct_i_newline : !llvm.ptr<array<4xi8>>
|
|
||||||
%ptrfmt = llvm.getelementptr %2[%c0, %c0]
|
|
||||||
: (!llvm.ptr<array<4xi8>>, i64, i64) -> !llvm.ptr<i8>
|
|
||||||
|
|
||||||
// CHECK: 0
|
// CHECK: 0
|
||||||
%v0 = vector.extract %v[0]: vector<16xi32>
|
%v0 = vector.extract %v[0]: vector<16xi32>
|
||||||
llvm.call @printf(%ptrfmt, %v0) : (!llvm.ptr<i8>, i32) -> ()
|
vector.print %v0 : i32
|
||||||
|
|
||||||
// CHECK: 9
|
// CHECK: 9
|
||||||
%v9 = vector.extract %v[9]: vector<16xi32>
|
%v9 = vector.extract %v[9]: vector<16xi32>
|
||||||
llvm.call @printf(%ptrfmt, %v9) : (!llvm.ptr<i8>, i32) -> ()
|
vector.print %v9 : i32
|
||||||
|
|
||||||
llvm.return
|
llvm.return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue