From a1e4a5f05aa90fadaf74935e526ab96b54f7ffd8 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Thu, 7 Nov 2024 10:34:04 +1200 Subject: [PATCH] Update CHERI clang tests for minor upstream changes. --- clang/test/CodeGen/cheri/cheri-mcu-call-libcall.c | 4 ++-- clang/test/CodeGen/cheri/cheri-mcu-ccall.c | 6 +++--- clang/test/CodeGen/cheri/cheriot-variadic.c | 2 +- clang/test/CodeGenCXX/cheri/cheri-mcu-interrupts.cpp | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/clang/test/CodeGen/cheri/cheri-mcu-call-libcall.c b/clang/test/CodeGen/cheri/cheri-mcu-call-libcall.c index 2d0fda82b187..4b9de58c6023 100644 --- a/clang/test/CodeGen/cheri/cheri-mcu-call-libcall.c +++ b/clang/test/CodeGen/cheri/cheri-mcu-call-libcall.c @@ -9,12 +9,12 @@ int foo(void); // CHECK: define dso_local i32 @callFromNotLibcall() local_unnamed_addr addrspace(200) #0 { int callFromNotLibcall(void) { - // CHECK: call cherilibcallcc i32 @_Z3addii(i32 1, i32 2) #2 + // CHECK: call cherilibcallcc i32 @_Z3addii(i32 noundef 1, i32 noundef 2) #2 // CHECK: call cherilibcallcc i32 @_Z3foov() #2 return add(1, 2) + foo(); } -// CHECK: declare cherilibcallcc i32 @_Z3addii(i32, i32) local_unnamed_addr addrspace(200) #1 +// CHECK: declare cherilibcallcc i32 @_Z3addii(i32 noundef, i32 noundef) local_unnamed_addr addrspace(200) #1 // CHECK: declare cherilibcallcc i32 @_Z3foov() local_unnamed_addr addrspace(200) #1 // CHECK: attributes #0 diff --git a/clang/test/CodeGen/cheri/cheri-mcu-ccall.c b/clang/test/CodeGen/cheri/cheri-mcu-ccall.c index 43dd1899770f..a37c2c6c437f 100644 --- a/clang/test/CodeGen/cheri/cheri-mcu-ccall.c +++ b/clang/test/CodeGen/cheri/cheri-mcu-ccall.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 %s -o - "-triple" "riscv32-unknown-unknown" "-emit-llvm" "-mframe-pointer=none" "-mcmodel=small" "-target-cpu" "cheriot" "-target-feature" "+xcheri" "-target-feature" "-64bit" "-target-feature" "-relax" "-target-feature" "-xcheri-rvc" "-target-feature" "-save-restore" "-target-abi" "cheriot" "-Oz" "-Werror" "-cheri-compartment=example" | FileCheck %s +// RUN: %clang_cc1 %s -o - "-triple" "riscv32-unknown-unknown" "-emit-llvm" "-mframe-pointer=none" "-mcmodel=small" "-target-cpu" "cheriot" "-target-feature" "+xcheri" "-target-feature" "-64bit" "-target-feature" "-relax" "-target-feature" "-save-restore" "-target-abi" "cheriot" "-Oz" "-Werror" "-cheri-compartment=example" | FileCheck %s -// CHECK: define dso_local chericcallcce i32 @_Z5test2ii(i32 %a0, i32 %a1) local_unnamed_addr addrspace(200) #0 +// CHECK: define dso_local chericcallcce i32 @_Z5test2ii(i32 noundef %a0, i32 noundef %a1) local_unnamed_addr addrspace(200) #0 __attribute__((cheri_compartment("example"))) int test2(int a0, int a1) { return a0 + a1; } @@ -20,7 +20,7 @@ int testcall6() { &stack_arg); } -// CHECK: declare chericcallcc i32 @_Z11test6calleePiS_S_S_S_S_(i32 addrspace(200)*, i32 addrspace(200)*, i32 addrspace(200)*, i32 addrspace(200)*, i32 addrspace(200)*, i32 addrspace(200)*) local_unnamed_addr addrspace(200) #3 +// CHECK: declare chericcallcc i32 @_Z11test6calleePiS_S_S_S_S_(ptr addrspace(200) noundef, ptr addrspace(200) noundef, ptr addrspace(200) noundef, ptr addrspace(200) noundef, ptr addrspace(200) noundef, ptr addrspace(200) noundef) local_unnamed_addr addrspace(200) #3 // CHECK: attributes #0 = { // CHECK-SAME: "cheri-compartment"="example" diff --git a/clang/test/CodeGen/cheri/cheriot-variadic.c b/clang/test/CodeGen/cheri/cheriot-variadic.c index 35a6a7a77f21..1f6b45cfed2d 100644 --- a/clang/test/CodeGen/cheri/cheriot-variadic.c +++ b/clang/test/CodeGen/cheri/cheriot-variadic.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -o - "-triple" "riscv32-unknown-unknown" "-emit-llvm" "-mframe-pointer=none" "-mcmodel=small" "-target-cpu" "cheriot" "-target-feature" "+xcheri" "-target-feature" "-64bit" "-target-feature" "-relax" "-target-feature" "-target-feature" "-save-restore" "-target-abi" "cheriot" "-Oz" "-Werror" "-cheri-compartment=example" -std=c2x | FileCheck %s +// RUN: %clang_cc1 %s -o - "-triple" "riscv32-unknown-unknown" "-emit-llvm" "-mframe-pointer=none" "-mcmodel=small" "-target-cpu" "cheriot" "-target-feature" "+xcheri" "-target-feature" "-64bit" "-target-feature" "-relax" "-target-feature" "-save-restore" "-target-abi" "cheriot" "-Oz" "-Werror" "-cheri-compartment=example" -std=c2x | FileCheck %s typedef __builtin_va_list va_list; #define va_start(v, l) __builtin_va_start((v), l) diff --git a/clang/test/CodeGenCXX/cheri/cheri-mcu-interrupts.cpp b/clang/test/CodeGenCXX/cheri/cheri-mcu-interrupts.cpp index 2fe81b85779e..c70082a541f3 100644 --- a/clang/test/CodeGenCXX/cheri/cheri-mcu-interrupts.cpp +++ b/clang/test/CodeGenCXX/cheri/cheri-mcu-interrupts.cpp @@ -1,20 +1,20 @@ -// RUN: %clang_cc1 %s -o - "-triple" "riscv32-unknown-unknown" "-emit-llvm" "-mframe-pointer=none" "-mcmodel=small" "-target-cpu" "cheriot" "-target-feature" "+xcheri" "-target-feature" "-64bit" "-target-feature" "-relax" "-target-feature" "-xcheri-rvc" "-target-feature" "-save-restore" "-target-abi" "cheriot" "-Oz" "-Werror" "-cheri-compartment=example" | FileCheck %s +// RUN: %clang_cc1 %s -o - "-triple" "riscv32-unknown-unknown" "-emit-llvm" "-mframe-pointer=none" "-mcmodel=small" "-target-cpu" "cheriot" "-target-feature" "+xcheri" "-target-feature" "-64bit" "-target-feature" "-relax" "-target-feature" "-save-restore" "-target-abi" "cheriot" "-Oz" "-Werror" "-cheri-compartment=example" | FileCheck %s int foo(void); -// CHECK: define dso_local i32 @_Z8disabledv() local_unnamed_addr addrspace(200) #[[DIS:[0-9]]] +// CHECK: define dso_local noundef i32 @_Z8disabledv() local_unnamed_addr addrspace(200) #[[DIS:[0-9]]] [[cheri::interrupt_state(disabled)]] int disabled(void) { return foo(); } -// CHECK: define dso_local i32 @_Z7enabledv() local_unnamed_addr addrspace(200) #[[EN:[0-9]]] +// CHECK: define dso_local noundef i32 @_Z7enabledv() local_unnamed_addr addrspace(200) #[[EN:[0-9]]] [[cheri::interrupt_state(enabled)]] int enabled(void) { return foo(); } -// CHECK: define dso_local i32 @_Z7inheritv() local_unnamed_addr addrspace(200) #[[INH:[0-9]]] +// CHECK: define dso_local noundef i32 @_Z7inheritv() local_unnamed_addr addrspace(200) #[[INH:[0-9]]] [[cheri::interrupt_state(inherit)]] int inherit(void) {