From a8ecfcd5d8fef56fe4d2053d6b4db05143ce4439 Mon Sep 17 00:00:00 2001 From: Petr Vesely Date: Fri, 26 Apr 2024 11:19:41 +0100 Subject: [PATCH] [llvm] Fix tests based on registered targets --- .../CheriBoundAllocas/pg_lzcompress-stack-bounds-crash.ll | 2 +- .../CheriBoundAllocas/stack-bounds-pass-load-store.ll | 2 +- llvm/test/Transforms/CheriBoundAllocas/stack-bounds-pass.ll | 2 +- llvm/test/tools/llvm-objdump/Mips/lit.local.cfg | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 llvm/test/tools/llvm-objdump/Mips/lit.local.cfg diff --git a/llvm/test/Transforms/CheriBoundAllocas/pg_lzcompress-stack-bounds-crash.ll b/llvm/test/Transforms/CheriBoundAllocas/pg_lzcompress-stack-bounds-crash.ll index 453b53456e09..29a1aed454b5 100644 --- a/llvm/test/Transforms/CheriBoundAllocas/pg_lzcompress-stack-bounds-crash.ll +++ b/llvm/test/Transforms/CheriBoundAllocas/pg_lzcompress-stack-bounds-crash.ll @@ -1,6 +1,6 @@ ; RUN: %cheri_purecap_opt -cheri-bound-allocas %s -o - -S -debug-only="cheri-bound-allocas" 2>&1 | %cheri_FileCheck %s -check-prefix DBG ; RUN: %riscv64_cheri_purecap_opt -cheri-bound-allocas %s -o - -S -debug-only="cheri-bound-allocas" 2>&1 | %cheri_FileCheck %s -check-prefix DBG -; REQUIRES: asserts +; REQUIRES: asserts,mips-registered-target,riscv-registered-target ; This crash was found compiling postgres (due to a missing depth limitation in CheriPurecapABI.cpp) target datalayout = "E-m:e-pf200:128:128:128:64-i8:8:32-i16:16:32-i64:64-n32:64-S128-A200-P200-G200" diff --git a/llvm/test/Transforms/CheriBoundAllocas/stack-bounds-pass-load-store.ll b/llvm/test/Transforms/CheriBoundAllocas/stack-bounds-pass-load-store.ll index 55cb165d59c4..71fd99920862 100644 --- a/llvm/test/Transforms/CheriBoundAllocas/stack-bounds-pass-load-store.ll +++ b/llvm/test/Transforms/CheriBoundAllocas/stack-bounds-pass-load-store.ll @@ -3,7 +3,7 @@ ; is a single trivially rematerizable instruction so it can freely move it around to avoid stack spills. ; we were moving the allocation of the register that is only used later to the beginning -; REQUIRES: asserts +; REQUIRES: asserts,mips-registered-target,riscv-registered-target ; RUN: %cheri_purecap_opt -cheri-bound-allocas %s -o - -S -cheri-stack-bounds=if-needed -debug-only=cheri-bound-allocas 2>%t.dbg | FileCheck %s ; RUN: FileCheck %s -input-file=%t.dbg --check-prefixes=DBG,DBG-TYPED ; RUN: %cheri_purecap_opt -opaque-pointers=1 -instsimplify -cheri-bound-allocas %s -o - -S -cheri-stack-bounds=if-needed -debug-only=cheri-bound-allocas 2>%t.dbg | FileCheck %s --check-prefix=OPAQUE diff --git a/llvm/test/Transforms/CheriBoundAllocas/stack-bounds-pass.ll b/llvm/test/Transforms/CheriBoundAllocas/stack-bounds-pass.ll index efae253910f9..c902c8d4e601 100644 --- a/llvm/test/Transforms/CheriBoundAllocas/stack-bounds-pass.ll +++ b/llvm/test/Transforms/CheriBoundAllocas/stack-bounds-pass.ll @@ -3,7 +3,7 @@ ; is a single trivially rematerizable instruction so it can freely move it around to avoid stack spills. ; we were moving the allocation of the register that is only used later to the beginning -; REQUIRES: asserts +; REQUIRES: asserts,mips-registered-target,riscv-registered-target ; RUN: %cheri_purecap_opt -opaque-pointers=0 -cheri-bound-allocas %s -o - -S | FileCheck %s -check-prefix DEFAULT ; RUN: %cheri_purecap_opt -opaque-pointers=0 -cheri-bound-allocas %s -o - -S -cheri-stack-bounds-single-intrinsic-threshold=0 -cheri-stack-bounds=if-needed | FileCheck %s -check-prefix IF-NEEDED-SINGLE ; RUN: %cheri_purecap_opt -opaque-pointers=0 -cheri-bound-allocas %s -o - -S -cheri-stack-bounds-single-intrinsic-threshold=10 -cheri-stack-bounds=if-needed | FileCheck %s -check-prefix IF-NEEDED-PER-USE diff --git a/llvm/test/tools/llvm-objdump/Mips/lit.local.cfg b/llvm/test/tools/llvm-objdump/Mips/lit.local.cfg new file mode 100644 index 000000000000..7d12f7a9c564 --- /dev/null +++ b/llvm/test/tools/llvm-objdump/Mips/lit.local.cfg @@ -0,0 +1,2 @@ +if not 'Mips' in config.root.targets: + config.unsupported = True