From d0a1b4c32a3c9d33cf92a9a9f9f38f8619c92c76 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 | 1 + 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 | 1 + llvm/test/CodeGen/BPF/reloc-btf-2.ll | 1 + llvm/test/CodeGen/BPF/reloc-btf.ll | 1 + llvm/test/CodeGen/BPF/reloc.ll | 1 + llvm/test/CodeGen/BPF/struct_ret1.ll | 1 + llvm/test/CodeGen/BPF/struct_ret2.ll | 1 + llvm/test/CodeGen/BPF/vararg1.ll | 5 +++-- 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, 22 insertions(+), 3 deletions(-) diff --git a/llvm/test/CodeGen/BPF/BTF/binary-format.ll b/llvm/test/CodeGen/BPF/BTF/binary-format.ll index d5b4b4786c16cb..71fc204e2d5c39 100644 --- a/llvm/test/CodeGen/BPF/BTF/binary-format.ll +++ b/llvm/test/CodeGen/BPF/BTF/binary-format.ll @@ -1,3 +1,4 @@ +; 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 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 08218f452d061d..ed1962d2a62137 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: too many args diff --git a/llvm/test/CodeGen/BPF/many_args2.ll b/llvm/test/CodeGen/BPF/many_args2.ll index a69886c2b20819..ab047ac8ca8aba 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: too many args diff --git a/llvm/test/CodeGen/BPF/objdump_static_var.ll b/llvm/test/CodeGen/BPF/objdump_static_var.ll index 8763dfeca827ad..68d2877d6e25bc 100644 --- a/llvm/test/CodeGen/BPF/objdump_static_var.ll +++ b/llvm/test/CodeGen/BPF/objdump_static_var.ll @@ -1,3 +1,4 @@ +; 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 diff --git a/llvm/test/CodeGen/BPF/reloc-btf-2.ll b/llvm/test/CodeGen/BPF/reloc-btf-2.ll index 3f1c4da4635196..950dceabc60e94 100644 --- a/llvm/test/CodeGen/BPF/reloc-btf-2.ll +++ b/llvm/test/CodeGen/BPF/reloc-btf-2.ll @@ -1,3 +1,4 @@ +; 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 diff --git a/llvm/test/CodeGen/BPF/reloc-btf.ll b/llvm/test/CodeGen/BPF/reloc-btf.ll index aa929257e03999..871b56d7fa9276 100644 --- a/llvm/test/CodeGen/BPF/reloc-btf.ll +++ b/llvm/test/CodeGen/BPF/reloc-btf.ll @@ -1,3 +1,4 @@ +; XFAIL: * ; RUN: llc -march=bpfel -filetype=obj < %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-RELOC %s ; Function Attrs: norecurse nounwind readnone diff --git a/llvm/test/CodeGen/BPF/reloc.ll b/llvm/test/CodeGen/BPF/reloc.ll index 123de485174653..2aa4b3e59f7a54 100644 --- a/llvm/test/CodeGen/BPF/reloc.ll +++ b/llvm/test/CodeGen/BPF/reloc.ll @@ -1,3 +1,4 @@ +; 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 } diff --git a/llvm/test/CodeGen/BPF/struct_ret1.ll b/llvm/test/CodeGen/BPF/struct_ret1.ll index 9a43cc8fc0c90a..3d7a2f273eba4a 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: only integer returns 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 4a22db65e6928d..d60a9623aee515 100644 --- a/llvm/test/CodeGen/BPF/vararg1.ll +++ b/llvm/test/CodeGen/BPF/vararg1.ll @@ -1,5 +1,6 @@ -; RUN: not llc -march=bpf < %s 2> %t1 -; RUN: FileCheck %s < %t1 +; DISABLE: not llc -march=bpf < %s 2| FileCheck %s +; RUN: false +; XFAIL: * ; CHECK: with VarArgs ; Function Attrs: nounwind readnone uwtable 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 b91c2617c50772..e700730a328486 100644 --- a/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp +++ b/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp @@ -602,7 +602,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;