From bb306b8ad79bc1ef6c2e7e165a196db869e1dc2c Mon Sep 17 00:00:00 2001 From: Dmitri Makarov Date: Mon, 8 Feb 2021 13:58:53 +0100 Subject: [PATCH] [SOL] Disable llvm tests incompatible with Solana BPF backend (#3) --- llvm/test/CodeGen/BPF/BTF/binary-format.ll | 5 +++-- llvm/test/CodeGen/BPF/byval.ll | 1 + llvm/test/CodeGen/BPF/many_args1.ll | 1 + llvm/test/CodeGen/BPF/many_args2.ll | 1 + llvm/test/CodeGen/BPF/objdump_static_var.ll | 5 +++-- llvm/test/CodeGen/BPF/reloc-btf-2.ll | 5 +++-- llvm/test/CodeGen/BPF/reloc-btf.ll | 3 ++- llvm/test/CodeGen/BPF/reloc.ll | 3 ++- llvm/test/CodeGen/BPF/struct_ret1.ll | 1 + llvm/test/CodeGen/BPF/struct_ret2.ll | 1 + llvm/test/CodeGen/BPF/vararg1.ll | 7 ++++--- llvm/test/CodeGen/BPF/warn-call.ll | 1 + llvm/test/CodeGen/BPF/warn-stack.ll | 1 + llvm/unittests/Analysis/TargetLibraryInfoTest.cpp | 8 +++++++- 14 files changed, 31 insertions(+), 12 deletions(-) diff --git a/llvm/test/CodeGen/BPF/BTF/binary-format.ll b/llvm/test/CodeGen/BPF/BTF/binary-format.ll index 3b1be1af43ec58..71fc204e2d5c39 100644 --- a/llvm/test/CodeGen/BPF/BTF/binary-format.ll +++ b/llvm/test/CodeGen/BPF/BTF/binary-format.ll @@ -1,5 +1,6 @@ -; RUN: llc -mtriple=bpfel -filetype=obj -o - %s | llvm-readelf -x ".BTF" -x ".BTF.ext" - | FileCheck -check-prefixes=CHECK,CHECK-EL %s -; RUN: llc -mtriple=bpfeb -filetype=obj -o - %s | llvm-readelf -x ".BTF" -x ".BTF.ext" - | FileCheck -check-prefixes=CHECK,CHECK-EB %s +; XFAIL: * +; RUN: llc -march=bpfel -filetype=obj -o - %s | llvm-readelf -x ".BTF" -x ".BTF.ext" - | FileCheck -check-prefixes=CHECK,CHECK-EL %s +; RUN: llc -march=bpfeb -filetype=obj -o - %s | llvm-readelf -x ".BTF" -x ".BTF.ext" - | FileCheck -check-prefixes=CHECK,CHECK-EB %s ; Source code: ; int f(int a) { return a; } diff --git a/llvm/test/CodeGen/BPF/byval.ll b/llvm/test/CodeGen/BPF/byval.ll index b7ff89fd3013aa..d652bfaeb5b9d1 100644 --- a/llvm/test/CodeGen/BPF/byval.ll +++ b/llvm/test/CodeGen/BPF/byval.ll @@ -1,3 +1,4 @@ +; XFAIL: * ; RUN: not llc -march=bpf < %s 2> %t1 ; RUN: FileCheck %s < %t1 ; CHECK: by value not supported diff --git a/llvm/test/CodeGen/BPF/many_args1.ll b/llvm/test/CodeGen/BPF/many_args1.ll index e5e782673c507e..103012b6835be8 100644 --- a/llvm/test/CodeGen/BPF/many_args1.ll +++ b/llvm/test/CodeGen/BPF/many_args1.ll @@ -1,3 +1,4 @@ +; XFAIL: * ; RUN: not llc -march=bpf < %s 2> %t1 ; RUN: FileCheck %s < %t1 ; CHECK: error: :0:0: in function foo i32 (i32, i32, i32): {{t10|0x[0-f]+}}: i64 = GlobalAddress 0 too many arguments diff --git a/llvm/test/CodeGen/BPF/many_args2.ll b/llvm/test/CodeGen/BPF/many_args2.ll index c5d6349dd6e1a7..ddf4f30fb1a1a6 100644 --- a/llvm/test/CodeGen/BPF/many_args2.ll +++ b/llvm/test/CodeGen/BPF/many_args2.ll @@ -1,3 +1,4 @@ +; XFAIL: * ; RUN: not llc -march=bpf < %s 2> %t1 ; RUN: FileCheck %s < %t1 ; CHECK: error: :0:0: in function bar i32 (i32, i32, i32, i32, i32, i32): stack arguments are not supported diff --git a/llvm/test/CodeGen/BPF/objdump_static_var.ll b/llvm/test/CodeGen/BPF/objdump_static_var.ll index a91074ebddd467..68d2877d6e25bc 100644 --- a/llvm/test/CodeGen/BPF/objdump_static_var.ll +++ b/llvm/test/CodeGen/BPF/objdump_static_var.ll @@ -1,5 +1,6 @@ -; RUN: llc -mtriple=bpfel -filetype=obj -o - %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK %s -; RUN: llc -mtriple=bpfeb -filetype=obj -o - %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK %s +; XFAIL: * +; RUN: llc -march=bpfel -filetype=obj -o - %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK %s +; RUN: llc -march=bpfeb -filetype=obj -o - %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK %s ; src: ; static volatile long a = 2; diff --git a/llvm/test/CodeGen/BPF/reloc-btf-2.ll b/llvm/test/CodeGen/BPF/reloc-btf-2.ll index 7398257e43a91a..950dceabc60e94 100644 --- a/llvm/test/CodeGen/BPF/reloc-btf-2.ll +++ b/llvm/test/CodeGen/BPF/reloc-btf-2.ll @@ -1,5 +1,6 @@ -; RUN: llc -mtriple=bpfel -filetype=obj < %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-RELOC %s -; RUN: llc -mtriple=bpfeb -filetype=obj < %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-RELOC %s +; XFAIL: * +; RUN: llc -march=bpfel -filetype=obj < %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-RELOC %s +; RUN: llc -march=bpfeb -filetype=obj < %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-RELOC %s ; source code: ; int g __attribute__((section("ids"))) = 4; diff --git a/llvm/test/CodeGen/BPF/reloc-btf.ll b/llvm/test/CodeGen/BPF/reloc-btf.ll index b9f6e3af6d72cf..871b56d7fa9276 100644 --- a/llvm/test/CodeGen/BPF/reloc-btf.ll +++ b/llvm/test/CodeGen/BPF/reloc-btf.ll @@ -1,4 +1,5 @@ -; RUN: llc -mtriple=bpfel -filetype=obj < %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-RELOC %s +; XFAIL: * +; RUN: llc -march=bpfel -filetype=obj < %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-RELOC %s ; Function Attrs: norecurse nounwind readnone define dso_local i32 @test() local_unnamed_addr #0 !dbg !7 { diff --git a/llvm/test/CodeGen/BPF/reloc.ll b/llvm/test/CodeGen/BPF/reloc.ll index be485506917715..2aa4b3e59f7a54 100644 --- a/llvm/test/CodeGen/BPF/reloc.ll +++ b/llvm/test/CodeGen/BPF/reloc.ll @@ -1,4 +1,5 @@ -; RUN: llc -mtriple=bpfel -filetype=obj < %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-RELOC %s +; XFAIL: * +; RUN: llc -march=bpfel -filetype=obj < %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-RELOC %s %struct.bpf_context = type { i64, i64, i64, i64, i64, i64, i64 } %struct.sk_buff = type { i64, i64, i64, i64, i64, i64, i64 } diff --git a/llvm/test/CodeGen/BPF/struct_ret1.ll b/llvm/test/CodeGen/BPF/struct_ret1.ll index 387e466db42357..2ef95f702fc357 100644 --- a/llvm/test/CodeGen/BPF/struct_ret1.ll +++ b/llvm/test/CodeGen/BPF/struct_ret1.ll @@ -1,3 +1,4 @@ +; XFAIL: * ; RUN: not llc -march=bpf < %s 2> %t1 ; RUN: FileCheck %s < %t1 ; CHECK: error: :0:0: in function bar { i64, i32 } (i32, i32, i32, i32, i32): aggregate returns are not supported diff --git a/llvm/test/CodeGen/BPF/struct_ret2.ll b/llvm/test/CodeGen/BPF/struct_ret2.ll index 90461205f7cf25..cbca6e10c6c676 100644 --- a/llvm/test/CodeGen/BPF/struct_ret2.ll +++ b/llvm/test/CodeGen/BPF/struct_ret2.ll @@ -1,3 +1,4 @@ +; XFAIL: * ; RUN: not llc -march=bpf < %s 2> %t1 ; RUN: FileCheck %s < %t1 ; CHECK: only small returns diff --git a/llvm/test/CodeGen/BPF/vararg1.ll b/llvm/test/CodeGen/BPF/vararg1.ll index 2b5ed16ddf135f..d60a9623aee515 100644 --- a/llvm/test/CodeGen/BPF/vararg1.ll +++ b/llvm/test/CodeGen/BPF/vararg1.ll @@ -1,6 +1,7 @@ -; RUN: not llc -march=bpf < %s 2> %t1 -; RUN: FileCheck %s < %t1 -; CHECK: error: :0:0: in function foo void (i32, ...): variadic functions are not supported +; DISABLE: not llc -march=bpf < %s 2| FileCheck %s +; RUN: false +; XFAIL: * +; CHECK: with VarArgs ; Function Attrs: nounwind readnone uwtable define void @foo(i32 %a, ...) #0 { diff --git a/llvm/test/CodeGen/BPF/warn-call.ll b/llvm/test/CodeGen/BPF/warn-call.ll index fbfaead98f13d9..9ab52f80c3f840 100644 --- a/llvm/test/CodeGen/BPF/warn-call.ll +++ b/llvm/test/CodeGen/BPF/warn-call.ll @@ -1,3 +1,4 @@ +; XFAIL: * ; RUN: not llc -march=bpfel < %s 2>&1 >/dev/null | FileCheck %s ; CHECK: error: warn_call.c diff --git a/llvm/test/CodeGen/BPF/warn-stack.ll b/llvm/test/CodeGen/BPF/warn-stack.ll index 807e196b926d98..9a361fbfa03d0e 100644 --- a/llvm/test/CodeGen/BPF/warn-stack.ll +++ b/llvm/test/CodeGen/BPF/warn-stack.ll @@ -1,3 +1,4 @@ +; XFAIL: * ; RUN: not llc -march=bpfel < %s 2>&1 >/dev/null | FileCheck %s ;; CHECK-NOT: nowarn diff --git a/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp b/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp index 34b06fe480f364..42f73b9cb84a4d 100644 --- a/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp +++ b/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp @@ -611,7 +611,13 @@ TEST_F(TargetLibraryInfoTest, ValidProto) { // These functions are OpenMP Offloading allocation / free routines "declare i8* @__kmpc_alloc_shared(i64)\n" - "declare void @__kmpc_free_shared(i8*, i64)\n"); + "declare void @__kmpc_free_shared(i8*, i64)\n" + + // rust memory management + "declare i8* @__rust_alloc(i64, i64, i8*)\n" + "declare void @__rust_dealloc(i8*, i64, i64)\n" + "declare i8* @__rust_realloc(i8*, i64, i64, i64, i64, i8*)\n" + ); for (unsigned FI = 0; FI != LibFunc::NumLibFuncs; ++FI) { LibFunc LF = (LibFunc)FI;