From b8082f8319be849e2b79514f5c7118add9164f46 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Tue, 26 Aug 2025 21:58:34 +0800 Subject: [PATCH] [CHERI] Rename chericcallcce to chericcallee --- clang/test/CodeGen/cheri/cheri-ccall-attrs.c | 4 +- clang/test/CodeGen/cheri/cheri-mcu-ccall.c | 2 +- .../test/CodeGen/cheri/cheri-mcu-interrupts.c | 6 +- clang/test/CodeGen/cheri/cheriot-struct-ret.c | 170 +++++++++--------- llvm/include/llvm/AsmParser/LLToken.h | 2 +- llvm/lib/AsmParser/LLLexer.cpp | 2 +- llvm/lib/AsmParser/LLParser.cpp | 4 +- llvm/lib/IR/AsmWriter.cpp | 4 +- llvm/test/CodeGen/Mips/cheri/cheri-ccallee.ll | 2 +- .../RISCV/cheri/cheri-local-libcall.ll | 2 +- .../RISCV/cheri/cheri-mcu-call-ccallee.ll | 4 +- .../CodeGen/RISCV/cheri/cheri-mcu-ccall.ll | 6 +- .../cheri/cheri-mcu-exported-interrupts.ll | 4 +- .../cheri/cheri-mcu-exported-unused-args.ll | 2 +- .../cheri/cheriot-check-arg-permissions.ll | 4 +- .../RISCV/cheri/cheriot-frame-checks.ll | 2 +- .../CodeGen/RISCV/cheri/cheriot-jumptable.ll | 2 +- .../RISCV/cheri/cheriot-sealed-attr.ll | 2 +- .../RISCV/cheri/cheriot-stack-size-export.ll | 6 +- .../CodeGen/RISCV/cheri/cheriot-stack-size.ll | 8 +- .../CodeGen/RISCV/cheri/cheriot-struct-ret.ll | 114 ++++++------ .../CodeGen/RISCV/cheri/cheriot-zero-ret.ll | 6 +- 22 files changed, 181 insertions(+), 177 deletions(-) diff --git a/clang/test/CodeGen/cheri/cheri-ccall-attrs.c b/clang/test/CodeGen/cheri/cheri-ccall-attrs.c index 4d1f2d9533893..21ac5690096e0 100644 --- a/clang/test/CodeGen/cheri/cheri-ccall-attrs.c +++ b/clang/test/CodeGen/cheri/cheri-ccall-attrs.c @@ -45,7 +45,7 @@ __attribute__((cheri_method_class(cls))) __attribute__((cheri_method_suffix("_cap"))) void fish(void) { - // CHECK-LABEL: define dso_local chericcallcce void @fish() + // CHECK-LABEL: define dso_local chericcallee void @fish() } __attribute__((cheri_method_suffix("_cap"))) @@ -55,7 +55,7 @@ void flibble(void); // CHECK-LABEL: define dso_local void @call() void call(void) { - // CHECK: call chericcallcce void @fish() + // CHECK: call chericcallee void @fish() fish(); // Check that we get a ccall to cheri_invoke with the correct method number // CHECK: load i64, ptr @__cheri_method.cls.fish, align 8, [[$INVARIANT_LOAD]] diff --git a/clang/test/CodeGen/cheri/cheri-mcu-ccall.c b/clang/test/CodeGen/cheri/cheri-mcu-ccall.c index a43f8c60957ca..5922a4829246c 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" "riscv32cheriot-unknown-cheriotrtos" "-emit-llvm" "-mframe-pointer=none" "-mcmodel=small" "-target-abi" "cheriot" "-target-feature" "+xcheriot" "-Oz" "-Werror" "-cheri-compartment=example" | FileCheck %s -// CHECK: define dso_local chericcallcce i32 @_Z5test2ii(i32 noundef %a0, i32 noundef %a1) local_unnamed_addr addrspace(200) #0 +// CHECK: define dso_local chericcallee i32 @_Z5test2ii(i32 noundef %a0, i32 noundef %a1) local_unnamed_addr addrspace(200) #0 __attribute__((cheriot_compartment("example"))) int test2(int a0, int a1) { return a0 + a1; } diff --git a/clang/test/CodeGen/cheri/cheri-mcu-interrupts.c b/clang/test/CodeGen/cheri/cheri-mcu-interrupts.c index e8738698269e3..4dea93a8cf355 100644 --- a/clang/test/CodeGen/cheri/cheri-mcu-interrupts.c +++ b/clang/test/CodeGen/cheri/cheri-mcu-interrupts.c @@ -24,7 +24,7 @@ int inherit(void) // The default for exported functions should be interrupts enabled // -// CHECK: define dso_local chericcallcce noundef i32 @_Z21default_enable_calleev() local_unnamed_addr addrspace(200) #[[DEFEN:[0-9]]] +// CHECK: define dso_local chericcallee noundef i32 @_Z21default_enable_calleev() local_unnamed_addr addrspace(200) #[[DEFEN:[0-9]]] __attribute__((cheri_compartment("example"))) int default_enable_callee(void) { @@ -46,7 +46,7 @@ void default_enable_callback2(void) // Explicitly setting interrupt status should override the default -// CHECK: define dso_local chericcallcce noundef i32 @_Z23explicit_disable_calleev() local_unnamed_addr addrspace(200) #[[EXPDIS:[0-9]]] +// CHECK: define dso_local chericcallee noundef i32 @_Z23explicit_disable_calleev() local_unnamed_addr addrspace(200) #[[EXPDIS:[0-9]]] __attribute__((cheriot_interrupt_state(disabled))) __attribute__((cheri_compartment("example"))) int explicit_disable_callee(void) @@ -84,7 +84,7 @@ int inherit1(void) return foo(); } -// CHECK: define dso_local chericcallcce noundef i32 @_Z24explicit_disable_callee1v() local_unnamed_addr addrspace(200) #[[EXPDIS]] +// CHECK: define dso_local chericcallee noundef i32 @_Z24explicit_disable_callee1v() local_unnamed_addr addrspace(200) #[[EXPDIS]] __attribute__((cheri_interrupt_state(disabled))) __attribute__((cheri_compartment("example"))) int explicit_disable_callee1(void) diff --git a/clang/test/CodeGen/cheri/cheriot-struct-ret.c b/clang/test/CodeGen/cheri/cheriot-struct-ret.c index 0518a0d50d3c8..155a2afd8c62f 100644 --- a/clang/test/CodeGen/cheri/cheriot-struct-ret.c +++ b/clang/test/CodeGen/cheri/cheriot-struct-ret.c @@ -17,11 +17,11 @@ __attribute__((cheri_compartment("example"), noinline)) unsigned int GetValue(vo return ++dummy; } -// CHECK: define dso_local chericcallcce [2 x i32] @_Z8InitIntsv() local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee [2 x i32] @_Z8InitIntsv() local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct TwoIntegers InitInts(void) { // CHECK: entry: - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() - // CHECK: %call1 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() + // CHECK: %call1 = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %.fca.0.insert = insertvalue [2 x i32] poison, i32 %call, 0 // CHECK: %.fca.1.insert = insertvalue [2 x i32] %.fca.0.insert, i32 %call1, 1 struct TwoIntegers Res = {GetValue(), GetValue()}; @@ -30,14 +30,14 @@ __attribute__((cheri_compartment("example"), noinline)) struct TwoIntegers InitI return Res; } -// CHECK: define dso_local chericcallcce [2 x i32] @_Z7ChgInts11TwoIntegers([2 x i32] %x.coerce) local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee [2 x i32] @_Z7ChgInts11TwoIntegers([2 x i32] %x.coerce) local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct TwoIntegers ChgInts(struct TwoIntegers x) { // CHECK: entry: // CHECK: %x.coerce.fca.0.extract = extractvalue [2 x i32] %x.coerce, 0 // CHECK: %x.coerce.fca.1.extract = extractvalue [2 x i32] %x.coerce, 1 - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %sub = sub i32 %x.coerce.fca.0.extract, %call - // CHECK: %call1 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call1 = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %sub2 = sub i32 %x.coerce.fca.1.extract, %call1 // CHECK: %.fca.0.insert = insertvalue [2 x i32] poison, i32 %sub, 0 // CHECK: %.fca.1.insert = insertvalue [2 x i32] %.fca.0.insert, i32 %sub2, 1 @@ -50,14 +50,14 @@ __attribute__((cheri_compartment("example"), noinline)) struct TwoIntegers ChgIn // Here we want to check that the initial struct received from the callee is handled as a proper struct, i.e. fields are read using `extractvalue` rather than dereferencing pointers. -// CHECK: define dso_local chericcallcce void @_Z9CheckIntsv() local_unnamed_addr addrspace(200) #2 { +// CHECK: define dso_local chericcallee void @_Z9CheckIntsv() local_unnamed_addr addrspace(200) #2 { __attribute__((cheri_compartment("example"))) void CheckInts() { static struct TwoIntegers __attribute__((used)) x = {}; // CHECK: entry: - // CHECK: %call = tail call chericcallcce [2 x i32] @_Z8InitIntsv() - // CHECK: %call1 = tail call chericcallcce [2 x i32] @_Z7ChgInts11TwoIntegers([2 x i32] %call) + // CHECK: %call = tail call chericcallee [2 x i32] @_Z8InitIntsv() + // CHECK: %call1 = tail call chericcallee [2 x i32] @_Z7ChgInts11TwoIntegers([2 x i32] %call) // CHECK: %call1.fca.0.extract = extractvalue [2 x i32] %call1, 0 // CHECK: %call1.fca.1.extract = extractvalue [2 x i32] %call1, 1 // CHECK: store i32 %call1.fca.0.extract, ptr addrspace(200) @_Z9CheckIntsv.x, align 4, !tbaa !7 @@ -77,13 +77,13 @@ struct TwoPointers { }; // Here we want to check that the result is returned by value. -// CHECK: define dso_local chericcallcce %struct.TwoPointers @_Z8InitPtrsv() local_unnamed_addr addrspace(200) #1 +// CHECK: define dso_local chericcallee %struct.TwoPointers @_Z8InitPtrsv() local_unnamed_addr addrspace(200) #1 __attribute__((cheri_compartment("example"), noinline)) struct TwoPointers InitPtrs() { // CHECK: entry: - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %rem = urem i32 %call, 5 // CHECK: %add.ptr = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem - // CHECK: %call1 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call1 = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %rem2 = urem i32 %call1, 5 // CHECK: %add.ptr3 = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem2 struct TwoPointers x = {dummies + (GetValue() % LENGTH), dummies + (GetValue() % LENGTH)}; @@ -95,14 +95,14 @@ __attribute__((cheri_compartment("example"), noinline)) struct TwoPointers InitP } // Here we want to check that the struct received as parameter is laid out as two different arguments and, again, is returned by value. -// CHECK: define dso_local chericcallcce %struct.TwoPointers @_Z7ChgPtrs11TwoPointers(ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1) local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee %struct.TwoPointers @_Z7ChgPtrs11TwoPointers(ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1) local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct TwoPointers ChgPtrs(struct TwoPointers x) { // CHECK: entry: // CHECK: store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 force_use = x.one; - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %rem = urem i32 %call, 5 // CHECK: %add.ptr = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem x.one = dummies + (GetValue() % LENGTH); @@ -110,7 +110,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct TwoPointers ChgPt // CHECK: store ptr addrspace(200) %x.coerce1, ptr addrspace(200) @force_use, align 8, !tbaa !11 force_use = x.two; - // CHECK: %call2 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call2 = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %rem3 = urem i32 %call2, 5 // CHECK: %add.ptr4 = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem3 x.two = dummies + (GetValue() % LENGTH); @@ -122,16 +122,16 @@ __attribute__((cheri_compartment("example"), noinline)) struct TwoPointers ChgPt } // Here we want to check that the struct received from the callee is handled as a proper struct, i.e. fields are read using `extractvalue` rather than dereferencing pointers. Also, we want to check that arguments in composite calls are passed correctly. -// CHECK: define dso_local chericcallcce void @_Z9CheckPtrsv() local_unnamed_addr addrspace(200) #2 { +// CHECK: define dso_local chericcallee void @_Z9CheckPtrsv() local_unnamed_addr addrspace(200) #2 { __attribute__((cheri_compartment("example"))) void CheckPtrs() { static struct TwoPointers __attribute__((used)) x = {}; // CHECK: entry: - // CHECK: %call = tail call chericcallcce %struct.TwoPointers @_Z8InitPtrsv() + // CHECK: %call = tail call chericcallee %struct.TwoPointers @_Z8InitPtrsv() // CHECK: %0 = extractvalue %struct.TwoPointers %call, 0 // CHECK: %1 = extractvalue %struct.TwoPointers %call, 1 - // CHECK: %call1 = tail call chericcallcce %struct.TwoPointers @_Z7ChgPtrs11TwoPointers(ptr addrspace(200) %0, ptr addrspace(200) %1) + // CHECK: %call1 = tail call chericcallee %struct.TwoPointers @_Z7ChgPtrs11TwoPointers(ptr addrspace(200) %0, ptr addrspace(200) %1) // CHECK: %2 = extractvalue %struct.TwoPointers %call1, 0 // CHECK: %3 = extractvalue %struct.TwoPointers %call1, 1 // CHECK: store ptr addrspace(200) %2, ptr addrspace(200) @_Z9CheckPtrsv.x, align 8, !tbaa !11 @@ -151,13 +151,13 @@ struct PointerAndInt { }; // Here we want to check that the result is returned by value. -// CHECK: define dso_local chericcallcce %struct.PointerAndInt @_Z10InitPtrIntv() local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee %struct.PointerAndInt @_Z10InitPtrIntv() local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct PointerAndInt InitPtrInt() { // CHECK: entry: - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %rem = urem i32 %call, 5 // CHECK: %add.ptr = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem - // CHECK: %call1 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call1 = tail call chericcallee i32 @_Z8GetValuev() struct PointerAndInt x = {dummies + (GetValue() % LENGTH), GetValue()}; // CHECK: %.fca.0.insert = insertvalue %struct.PointerAndInt poison, ptr addrspace(200) %add.ptr, 0 @@ -167,18 +167,18 @@ __attribute__((cheri_compartment("example"), noinline)) struct PointerAndInt Ini } // Here we want to check that the struct received as parameter is laid out as two different arguments and, again, is returned by value. -// CHECK: define dso_local chericcallcce %struct.PointerAndInt @_Z9ChgPtrInt13PointerAndInt(ptr addrspace(200) %x.coerce0, i32 %x.coerce1) local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee %struct.PointerAndInt @_Z9ChgPtrInt13PointerAndInt(ptr addrspace(200) %x.coerce0, i32 %x.coerce1) local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct PointerAndInt ChgPtrInt(struct PointerAndInt x) { // CHECK: entry: // CHECK: store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 force_use = x.one; - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %rem = urem i32 %call, 5 // CHECK: %add.ptr = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem x.one = dummies + (GetValue() % LENGTH); - // CHECK: %call2 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call2 = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %sub = sub i32 %x.coerce1, %call2 x.two -= GetValue(); @@ -189,16 +189,16 @@ __attribute__((cheri_compartment("example"), noinline)) struct PointerAndInt Chg } // Here we want to check that the struct received from the callee is handled as a proper struct, i.e. fields are read using `extractvalue` rather than dereferencing pointers. Also, we want to check that arguments in composite calls are passed correctly. -// CHECK: define dso_local chericcallcce void @_Z11CheckPtrIntv() local_unnamed_addr addrspace(200) #2 { +// CHECK: define dso_local chericcallee void @_Z11CheckPtrIntv() local_unnamed_addr addrspace(200) #2 { __attribute__((cheri_compartment("example"))) void CheckPtrInt() { static struct PointerAndInt __attribute__((used)) x = {}; // CHECK: entry: - // CHECK: %call = tail call chericcallcce %struct.PointerAndInt @_Z10InitPtrIntv() + // CHECK: %call = tail call chericcallee %struct.PointerAndInt @_Z10InitPtrIntv() // CHECK: %0 = extractvalue %struct.PointerAndInt %call, 0 // CHECK: %1 = extractvalue %struct.PointerAndInt %call, 1 - // CHECK: %call1 = tail call chericcallcce %struct.PointerAndInt @_Z9ChgPtrInt13PointerAndInt(ptr addrspace(200) %0, i32 %1) + // CHECK: %call1 = tail call chericcallee %struct.PointerAndInt @_Z9ChgPtrInt13PointerAndInt(ptr addrspace(200) %0, i32 %1) // CHECK: %2 = extractvalue %struct.PointerAndInt %call1, 0 // CHECK: %3 = extractvalue %struct.PointerAndInt %call1, 1 // CHECK: store ptr addrspace(200) %2, ptr addrspace(200) @_Z11CheckPtrIntv.x, align 8, !tbaa !11 @@ -218,11 +218,11 @@ struct IntAndPointer { }; // Here we want to check that the result is returned by value. -// CHECK: define dso_local chericcallcce %struct.IntAndPointer @_Z10InitIntPtrv() local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee %struct.IntAndPointer @_Z10InitIntPtrv() local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct IntAndPointer InitIntPtr() { // CHECK: entry: - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() - // CHECK: %call1 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() + // CHECK: %call1 = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %rem = urem i32 %call1, 5 // CHECK: %add.ptr = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem struct IntAndPointer x = {GetValue(), dummies + (GetValue() % LENGTH)}; @@ -234,18 +234,18 @@ __attribute__((cheri_compartment("example"), noinline)) struct IntAndPointer Ini } // Here we want to check that the struct received as parameter is laid out as two different arguments and, again, is returned by value. -// CHECK: define dso_local chericcallcce %struct.IntAndPointer @_Z9ChgIntPtr13IntAndPointer(i32 %x.coerce0, ptr addrspace(200) %x.coerce1) local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee %struct.IntAndPointer @_Z9ChgIntPtr13IntAndPointer(i32 %x.coerce0, ptr addrspace(200) %x.coerce1) local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct IntAndPointer ChgIntPtr(struct IntAndPointer x) { // CHECK: entry: - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %sub = sub i32 %x.coerce0, %call x.one -= GetValue(); // CHECK: store ptr addrspace(200) %x.coerce1, ptr addrspace(200) @force_use, align 8, !tbaa !11 force_use = x.two; - // CHECK: %call1 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call1 = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %rem = urem i32 %call1, 5 // CHECK: %add.ptr = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem x.two = dummies + (GetValue() % LENGTH); @@ -257,16 +257,16 @@ __attribute__((cheri_compartment("example"), noinline)) struct IntAndPointer Chg } // Here we want to check that the struct received from the callee is handled as a proper struct, i.e. fields are read using `extractvalue` rather than dereferencing pointers. Also, we want to check that arguments in composite calls are passed correctly. -// CHECK: define dso_local chericcallcce void @_Z11CheckIntPtrv() local_unnamed_addr addrspace(200) #2 { +// CHECK: define dso_local chericcallee void @_Z11CheckIntPtrv() local_unnamed_addr addrspace(200) #2 { __attribute__((cheri_compartment("example"))) void CheckIntPtr() { static struct IntAndPointer __attribute__((used)) x = {}; // CHECK: entry: - // CHECK: %call = tail call chericcallcce %struct.IntAndPointer @_Z10InitIntPtrv() + // CHECK: %call = tail call chericcallee %struct.IntAndPointer @_Z10InitIntPtrv() // CHECK: %0 = extractvalue %struct.IntAndPointer %call, 0 // CHECK: %1 = extractvalue %struct.IntAndPointer %call, 1 - // CHECK: %call1 = tail call chericcallcce %struct.IntAndPointer @_Z9ChgIntPtr13IntAndPointer(i32 %0, ptr addrspace(200) %1) + // CHECK: %call1 = tail call chericcallee %struct.IntAndPointer @_Z9ChgIntPtr13IntAndPointer(i32 %0, ptr addrspace(200) %1) // CHECK: %2 = extractvalue %struct.IntAndPointer %call1, 0 // CHECK: %3 = extractvalue %struct.IntAndPointer %call1, 1 // CHECK: store i32 %2, ptr addrspace(200) @_Z11CheckIntPtrv.x, align 8, !tbaa !7 @@ -291,11 +291,11 @@ struct Parent { // Here we want to check that the result is returned by value. -// CHECK: define dso_local chericcallcce [2 x i32] @_Z10InitParentv() local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee [2 x i32] @_Z10InitParentv() local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct Parent InitParent() { // CHECK: entry: - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() - // CHECK: %call1 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() + // CHECK: %call1 = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %.fca.0.insert = insertvalue [2 x i32] poison, i32 %call, 0 // CHECK: %.fca.1.insert = insertvalue [2 x i32] %.fca.0.insert, i32 %call1, 1 struct Parent x = {GetValue(), {GetValue()}}; @@ -305,7 +305,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct Parent InitParent } // Here we want to check that the struct received as parameter is laid out as two different arguments and, again, is returned by value. -// CHECK: define dso_local chericcallcce [2 x i32] @_Z9ChgParent6Parent([2 x i32] %x.coerce) local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee [2 x i32] @_Z9ChgParent6Parent([2 x i32] %x.coerce) local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct Parent ChgParent(struct Parent x) { @@ -314,11 +314,11 @@ __attribute__((cheri_compartment("example"), noinline)) struct Parent ChgParent( // CHECK: entry: // CHECK: %x.coerce.fca.0.extract = extractvalue [2 x i32] %x.coerce, 0 // CHECK: %x.coerce.fca.1.extract = extractvalue [2 x i32] %x.coerce, 1 - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %sub = sub i32 %x.coerce.fca.0.extract, %call x.x -= GetValue(); - // CHECK: %call2 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call2 = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %sub3 = sub i32 %x.coerce.fca.1.extract, %call2 x.y.z -= GetValue(); @@ -329,14 +329,14 @@ __attribute__((cheri_compartment("example"), noinline)) struct Parent ChgParent( } // Here we want to check that the struct received from the callee is handled as a proper struct, i.e. fields are read using `extractvalue` rather than dereferencing pointers. Also, we want to check that arguments in composite calls are passed correctly. -// CHECK: define dso_local chericcallcce void @_Z11CheckParentv() local_unnamed_addr addrspace(200) #2 { +// CHECK: define dso_local chericcallee void @_Z11CheckParentv() local_unnamed_addr addrspace(200) #2 { __attribute__((cheri_compartment("example"))) void CheckParent() { static struct Parent __attribute__((used)) x = {}; // CHECK: entry: - // CHECK: %call = tail call chericcallcce [2 x i32] @_Z10InitParentv() - // CHECK: %call1 = tail call chericcallcce [2 x i32] @_Z9ChgParent6Parent([2 x i32] %call) + // CHECK: %call = tail call chericcallee [2 x i32] @_Z10InitParentv() + // CHECK: %call1 = tail call chericcallee [2 x i32] @_Z9ChgParent6Parent([2 x i32] %call) // CHECK: %call1.fca.0.extract = extractvalue [2 x i32] %call1, 0 // CHECK: %call1.fca.1.extract = extractvalue [2 x i32] %call1, 1 // CHECK: store i32 %call1.fca.0.extract, ptr addrspace(200) @_Z11CheckParentv.x, align 4, !tbaa !7 @@ -358,13 +358,13 @@ struct ParentPtr { // Here we want to check that the result is returned by value. -// CHECK: define dso_local chericcallcce %struct.ParentPtr @_Z13InitParentPtrv() local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee %struct.ParentPtr @_Z13InitParentPtrv() local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct ParentPtr InitParentPtr() { // CHECK: entry: - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %rem = urem i32 %call, 5 // CHECK: %add.ptr = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem - // CHECK: %call1 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call1 = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %rem2 = urem i32 %call1, 5 // CHECK: %add.ptr3 = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem2 // CHECK: %.fca.0.insert = insertvalue %struct.ParentPtr poison, ptr addrspace(200) %add.ptr, 0 @@ -376,7 +376,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct ParentPtr InitPar } // Here we want to check that the struct received as parameter is laid out as two different arguments and, again, is returned by value. -// CHECK: define dso_local chericcallcce %struct.ParentPtr @_Z12ChgParentPtr9ParentPtr(ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1) local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee %struct.ParentPtr @_Z12ChgParentPtr9ParentPtr(ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1) local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct ParentPtr ChgParentPtr(struct ParentPtr x) { // CHECK: entry: // CHECK: %x.coerce1.fca.0.extract = extractvalue %struct.InnerPtr %x.coerce1, 0 @@ -384,7 +384,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct ParentPtr ChgPare // CHECK: store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 force_use = x.x; - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %rem = urem i32 %call, 5 // CHECK: %add.ptr = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem x.x = dummies + (GetValue() % LENGTH); @@ -392,7 +392,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct ParentPtr ChgPare // CHECK: store ptr addrspace(200) %x.coerce1.fca.0.extract, ptr addrspace(200) @force_use, align 8, !tbaa !11 force_use = x.y.z; - // CHECK: %call3 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call3 = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %rem4 = urem i32 %call3, 5 // CHECK: %add.ptr5 = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem4 x.y.z = dummies + (GetValue() % LENGTH); @@ -404,16 +404,16 @@ __attribute__((cheri_compartment("example"), noinline)) struct ParentPtr ChgPare } // Here we want to check that the struct received from the callee is handled as a proper struct, i.e. fields are read using `extractvalue` rather than dereferencing pointers. Also, we want to check that arguments in composite calls are passed correctly. -// CHECK: define dso_local chericcallcce void @_Z14CheckParentPtrv() local_unnamed_addr addrspace(200) #2 { +// CHECK: define dso_local chericcallee void @_Z14CheckParentPtrv() local_unnamed_addr addrspace(200) #2 { __attribute__((cheri_compartment("example"))) void CheckParentPtr() { static struct ParentPtr __attribute__((used)) x = {}; // CHECK: entry: - // CHECK: %call = tail call chericcallcce %struct.ParentPtr @_Z13InitParentPtrv() + // CHECK: %call = tail call chericcallee %struct.ParentPtr @_Z13InitParentPtrv() // CHECK: %0 = extractvalue %struct.ParentPtr %call, 0 // CHECK: %1 = extractvalue %struct.ParentPtr %call, 1 - // CHECK: %call1 = tail call chericcallcce %struct.ParentPtr @_Z12ChgParentPtr9ParentPtr(ptr addrspace(200) %0, %struct.InnerPtr %1) + // CHECK: %call1 = tail call chericcallee %struct.ParentPtr @_Z12ChgParentPtr9ParentPtr(ptr addrspace(200) %0, %struct.InnerPtr %1) // CHECK: %2 = extractvalue %struct.ParentPtr %call1, 0 // CHECK: %3 = extractvalue %struct.ParentPtr %call1, 1 // CHECK: %.fca.0.extract3 = extractvalue %struct.InnerPtr %3, 0 @@ -427,7 +427,7 @@ __attribute__((cheri_compartment("example"))) void CheckParentPtr() { // For arguments, does it work when the struct is placed in an odd-numbered position? -// CHECK: define dso_local chericcallcce [2 x i32] @_Z8ChgInts2i11TwoIntegers(i32 noundef %new_int, [2 x i32] %x.coerce) local_unnamed_addr addrspace(200) #4 { +// CHECK: define dso_local chericcallee [2 x i32] @_Z8ChgInts2i11TwoIntegers(i32 noundef %new_int, [2 x i32] %x.coerce) local_unnamed_addr addrspace(200) #4 { __attribute__((cheri_compartment("example"), noinline)) struct TwoIntegers ChgInts2(int new_int, struct TwoIntegers x) { // CHECK: %x.coerce.fca.0.extract = extractvalue [2 x i32] %x.coerce, 0 // CHECK: %x.coerce.fca.1.extract = extractvalue [2 x i32] %x.coerce, 1 @@ -443,13 +443,13 @@ __attribute__((cheri_compartment("example"), noinline)) struct TwoIntegers ChgIn return x; } -// CHECK: define dso_local chericcallcce %struct.TwoPointers @_Z8ChgPtrs2i11TwoPointers(i32 noundef %new_int, ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1) local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee %struct.TwoPointers @_Z8ChgPtrs2i11TwoPointers(i32 noundef %new_int, ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1) local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct TwoPointers ChgPtrs2(int new_int, struct TwoPointers x) { // CHECK: entry: // CHECK: store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 force_use = x.one; - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %add = add i32 %call, %new_int // CHECK: %rem = urem i32 %add, 5 // CHECK: %add.ptr = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem @@ -458,7 +458,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct TwoPointers ChgPt // CHECK: store ptr addrspace(200) %x.coerce1, ptr addrspace(200) @force_use, align 8, !tbaa !11 force_use = x.two; - // CHECK: %call2 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call2 = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %add3 = add i32 %call2, %new_int // CHECK: %rem4 = urem i32 %add3, 5 // CHECK: %add.ptr5 = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem4 @@ -470,7 +470,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct TwoPointers ChgPt return x; } -// CHECK: define dso_local chericcallcce %struct.ParentPtr @_Z13ChgParentPtr2i9ParentPtr(i32 noundef %new_int, ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1) local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee %struct.ParentPtr @_Z13ChgParentPtr2i9ParentPtr(i32 noundef %new_int, ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1) local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct ParentPtr ChgParentPtr2(int new_int, struct ParentPtr x) { // CHECK: entry: @@ -479,7 +479,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct ParentPtr ChgPare // CHECK: store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 force_use = x.x; - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %add = add i32 %call, %new_int // CHECK: %rem = urem i32 %add, 5 // CHECK: %add.ptr = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem @@ -488,7 +488,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct ParentPtr ChgPare // CHECK: store ptr addrspace(200) %x.coerce1.fca.0.extract, ptr addrspace(200) @force_use, align 8, !tbaa !11 force_use = x.y.z; - // CHECK: %call3 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call3 = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %add4 = add i32 %call3, %new_int // CHECK: %rem5 = urem i32 %add4, 5 // CHECK: %add.ptr6 = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem5 @@ -502,7 +502,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct ParentPtr ChgPare // For arguments, does it work when the function is variadic? -// CHECK: define dso_local chericcallcce [2 x i32] @_Z8ChgInts3i11TwoIntegersz(i32 noundef %n, [2 x i32] %x.coerce, ...) local_unnamed_addr addrspace(200) #5 { +// CHECK: define dso_local chericcallee [2 x i32] @_Z8ChgInts3i11TwoIntegersz(i32 noundef %n, [2 x i32] %x.coerce, ...) local_unnamed_addr addrspace(200) #5 { __attribute__((cheri_compartment("example"), noinline)) struct TwoIntegers ChgInts3(int n, struct TwoIntegers x, ...) { __builtin_va_list args; @@ -528,7 +528,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct TwoIntegers ChgIn return x; } -// CHECK: define dso_local chericcallcce %struct.TwoPointers @_Z8ChgPtrs3i11TwoPointersz(i32 noundef %n, ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1, ...) local_unnamed_addr addrspace(200) #7 { +// CHECK: define dso_local chericcallee %struct.TwoPointers @_Z8ChgPtrs3i11TwoPointersz(i32 noundef %n, ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1, ...) local_unnamed_addr addrspace(200) #7 { __attribute__((cheri_compartment("example"), noinline)) struct TwoPointers ChgPtrs3(int n, struct TwoPointers x, ...) { __builtin_va_list args; @@ -568,7 +568,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct TwoPointers ChgPt return x; } -// CHECK: define dso_local chericcallcce %struct.ParentPtr @_Z13ChgParentPtr3i9ParentPtrz(i32 noundef %n, ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1, ...) local_unnamed_addr addrspace(200) #7 { +// CHECK: define dso_local chericcallee %struct.ParentPtr @_Z13ChgParentPtr3i9ParentPtrz(i32 noundef %n, ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1, ...) local_unnamed_addr addrspace(200) #7 { __attribute__((cheri_compartment("example"), noinline)) struct ParentPtr ChgParentPtr3(int n, struct ParentPtr x, ...) { __builtin_va_list args; @@ -610,7 +610,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct ParentPtr ChgPare // For arguments, does it work correctly when the "optimizable" argument sits across the "put in registers" and "spill to stack" boundary? -// CHECK: define dso_local chericcallcce [2 x i32] @_Z8ChgInts4iiiii11TwoIntegers(i32 noundef %n0, i32 noundef %n1, i32 noundef %n2, i32 noundef %n3, i32 noundef %n4, [2 x i32] %x.coerce) local_unnamed_addr addrspace(200) #4 { +// CHECK: define dso_local chericcallee [2 x i32] @_Z8ChgInts4iiiii11TwoIntegers(i32 noundef %n0, i32 noundef %n1, i32 noundef %n2, i32 noundef %n3, i32 noundef %n4, [2 x i32] %x.coerce) local_unnamed_addr addrspace(200) #4 { __attribute__((cheri_compartment("example"), noinline)) struct TwoIntegers ChgInts4(int n0, int n1, int n2, int n3, int n4, struct TwoIntegers x) { // CHECK: entry: @@ -633,14 +633,14 @@ __attribute__((cheri_compartment("example"), noinline)) struct TwoIntegers ChgIn return x; } -// CHECK: define dso_local chericcallcce %struct.TwoPointers @_Z8ChgPtrs4iiiii11TwoPointers(i32 noundef %n0, i32 noundef %n1, i32 noundef %n2, i32 noundef %n3, i32 noundef %n4, ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1) local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee %struct.TwoPointers @_Z8ChgPtrs4iiiii11TwoPointers(i32 noundef %n0, i32 noundef %n1, i32 noundef %n2, i32 noundef %n3, i32 noundef %n4, ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1) local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct TwoPointers ChgPtrs4(int n0, int n1, int n2, int n3, int n4, struct TwoPointers x) { // CHECK: entry: // CHECK: store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 force_use = x.one; - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %add = add i32 %n1, %n0 // CHECK: %add1 = add i32 %add, %n2 // CHECK: %add2 = add i32 %add1, %n3 @@ -653,7 +653,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct TwoPointers ChgPt // CHECK: store ptr addrspace(200) %x.coerce1, ptr addrspace(200) @force_use, align 8, !tbaa !11 force_use = x.two; - // CHECK: %call6 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call6 = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %add7 = add i32 %n1, %n0 // CHECK: %add8 = add i32 %add7, %n2 // CHECK: %add9 = add i32 %add8, %n3 @@ -669,7 +669,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct TwoPointers ChgPt return x; } -// CHECK: define dso_local chericcallcce %struct.ParentPtr @_Z13ChgParentPtr4iiiii9ParentPtr(i32 noundef %n0, i32 noundef %n1, i32 noundef %n2, i32 noundef %n3, i32 noundef %n4, ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1) local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee %struct.ParentPtr @_Z13ChgParentPtr4iiiii9ParentPtr(i32 noundef %n0, i32 noundef %n1, i32 noundef %n2, i32 noundef %n3, i32 noundef %n4, ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1) local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct ParentPtr ChgParentPtr4(int n0, int n1, int n2, int n3, int n4, struct ParentPtr x) { // CHECK: entry: @@ -679,7 +679,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct ParentPtr ChgPare // CHECK: store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 force_use = x.x; - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %add = add i32 %n1, %n0 // CHECK: %add2 = add i32 %add, %n2 // CHECK: %add3 = add i32 %add2, %n3 @@ -694,7 +694,7 @@ __attribute__((cheri_compartment("example"), noinline)) struct ParentPtr ChgPare // CHECK: store ptr addrspace(200) %x.coerce1.fca.0.extract, ptr addrspace(200) @force_use, align 8, !tbaa !11 force_use = x.y.z; - // CHECK: %call7 = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call7 = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %add8 = add i32 %n1, %n0 // CHECK: %add9 = add i32 %add8, %n2 // CHECK: %add10 = add i32 %add9, %n3 @@ -720,21 +720,21 @@ struct OneInt { // CHECK: } -// CHECK: define dso_local chericcallcce i32 @_Z10InitOneIntv() local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee i32 @_Z10InitOneIntv() local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct OneInt InitOneInt(void) { // CHECK: entry: - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() struct OneInt Res = {GetValue()}; // CHECK: ret i32 %call return Res; } -// CHECK: define dso_local chericcallcce i32 @_Z9ChgOneInt6OneInt(i32 %x.coerce) local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee i32 @_Z9ChgOneInt6OneInt(i32 %x.coerce) local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct OneInt ChgOneInt(struct OneInt x) { // CHECK: entry: - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %sub = sub i32 %x.coerce, %call x.x -= GetValue(); @@ -744,14 +744,14 @@ __attribute__((cheri_compartment("example"), noinline)) struct OneInt ChgOneInt( // Here we want to check that the initial struct received from the callee is handled as a proper struct, i.e. fields are read using `extractvalue` rather than dereferencing pointers. -// CHECK: define dso_local chericcallcce void @_Z11CheckOneIntv() local_unnamed_addr addrspace(200) #2 { +// CHECK: define dso_local chericcallee void @_Z11CheckOneIntv() local_unnamed_addr addrspace(200) #2 { __attribute__((cheri_compartment("example"))) void CheckOneInt() { static struct OneInt __attribute__((used)) x = {}; // CHECK: entry: - // CHECK: %call = tail call chericcallcce i32 @_Z10InitOneIntv() - // CHECK: %call2 = tail call chericcallcce i32 @_Z9ChgOneInt6OneInt(i32 %call) + // CHECK: %call = tail call chericcallee i32 @_Z10InitOneIntv() + // CHECK: %call2 = tail call chericcallee i32 @_Z9ChgOneInt6OneInt(i32 %call) // CHECK: store i32 %call2, ptr addrspace(200) @_Z11CheckOneIntv.x, align 4, !tbaa !7 x = ChgOneInt(InitOneInt()); @@ -763,10 +763,10 @@ struct OnePtr { unsigned int* x; }; -// CHECK: define dso_local chericcallcce %struct.OnePtr @_Z10InitOnePtrv() local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee %struct.OnePtr @_Z10InitOnePtrv() local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct OnePtr InitOnePtr(void) { // CHECK: entry: - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %rem = urem i32 %call, 5 // CHECK: %add.ptr = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem // CHECK: %.fca.0.insert = insertvalue %struct.OnePtr poison, ptr addrspace(200) %add.ptr, 0 @@ -776,13 +776,13 @@ __attribute__((cheri_compartment("example"), noinline)) struct OnePtr InitOnePtr return Res; } -// CHECK: define dso_local chericcallcce %struct.OnePtr @_Z9ChgOnePtr6OnePtr(ptr addrspace(200) %x.coerce) local_unnamed_addr addrspace(200) #1 { +// CHECK: define dso_local chericcallee %struct.OnePtr @_Z9ChgOnePtr6OnePtr(ptr addrspace(200) %x.coerce) local_unnamed_addr addrspace(200) #1 { __attribute__((cheri_compartment("example"), noinline)) struct OnePtr ChgOnePtr(struct OnePtr x) { // CHECK: entry: // CHECK: store ptr addrspace(200) %x.coerce, ptr addrspace(200) @force_use, align 8, !tbaa !11 force_use = x.x; - // CHECK: %call = tail call chericcallcce i32 @_Z8GetValuev() + // CHECK: %call = tail call chericcallee i32 @_Z8GetValuev() // CHECK: %rem = urem i32 %call, 5 // CHECK: %add.ptr = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem // CHECK: %.fca.0.insert = insertvalue %struct.OnePtr poison, ptr addrspace(200) %add.ptr, 0 @@ -792,15 +792,15 @@ __attribute__((cheri_compartment("example"), noinline)) struct OnePtr ChgOnePtr( return x; } -// CHECK: define dso_local chericcallcce void @_Z11CheckOnePtrv() local_unnamed_addr addrspace(200) #2 { +// CHECK: define dso_local chericcallee void @_Z11CheckOnePtrv() local_unnamed_addr addrspace(200) #2 { __attribute__((cheri_compartment("example"))) void CheckOnePtr () { static struct OnePtr __attribute__((used)) x = {}; // CHECK: entry: - // CHECK: %call = tail call chericcallcce %struct.OnePtr @_Z10InitOnePtrv() + // CHECK: %call = tail call chericcallee %struct.OnePtr @_Z10InitOnePtrv() // CHECK: %0 = extractvalue %struct.OnePtr %call, 0 - // CHECK: %call1 = tail call chericcallcce %struct.OnePtr @_Z9ChgOnePtr6OnePtr(ptr addrspace(200) %0) + // CHECK: %call1 = tail call chericcallee %struct.OnePtr @_Z9ChgOnePtr6OnePtr(ptr addrspace(200) %0) // CHECK: %1 = extractvalue %struct.OnePtr %call1, 0 // CHECK: store ptr addrspace(200) %1, ptr addrspace(200) @_Z11CheckOnePtrv.x, align 8, !tbaa !11 x = ChgOnePtr(InitOnePtr()); diff --git a/llvm/include/llvm/AsmParser/LLToken.h b/llvm/include/llvm/AsmParser/LLToken.h index 49f181873125d..ddcfb37286d2c 100644 --- a/llvm/include/llvm/AsmParser/LLToken.h +++ b/llvm/include/llvm/AsmParser/LLToken.h @@ -159,7 +159,7 @@ enum Kind { kw_spir_func, kw_chericcallcc, kw_cherilibcallcc, - kw_chericcallcce, + kw_chericcallee, kw_x86_64_sysvcc, kw_win64cc, kw_anyregcc, diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp index 0482b5f7860c9..f83886558209d 100644 --- a/llvm/lib/AsmParser/LLLexer.cpp +++ b/llvm/lib/AsmParser/LLLexer.cpp @@ -634,7 +634,7 @@ lltok::Kind LLLexer::LexIdentifier() { KEYWORD(fastcc); KEYWORD(coldcc); KEYWORD(chericcallcc); - KEYWORD(chericcallcce); + KEYWORD(chericcallee); KEYWORD(cherilibcallcc); KEYWORD(cfguard_checkcc); KEYWORD(x86_stdcallcc); diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 56e8ace5cfb2e..89e380956aa8c 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -2211,7 +2211,9 @@ bool LLParser::parseOptionalCallingConv(unsigned &CC) { case lltok::kw_fastcc: CC = CallingConv::Fast; break; case lltok::kw_coldcc: CC = CallingConv::Cold; break; case lltok::kw_chericcallcc: CC = CallingConv::CHERI_CCall; break; - case lltok::kw_chericcallcce: CC = CallingConv::CHERI_CCallee; break; + case lltok::kw_chericcallee: + CC = CallingConv::CHERI_CCallee; + break; case lltok::kw_cherilibcallcc: CC = CallingConv::CHERI_LibCall; break; diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index 6f501f2983801..39e6834103548 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -382,7 +382,9 @@ static void PrintCallingConv(unsigned cc, raw_ostream &Out) { case CallingConv::SPIR_FUNC: Out << "spir_func"; break; case CallingConv::SPIR_KERNEL: Out << "spir_kernel"; break; case CallingConv::CHERI_CCall: Out << "chericcallcc"; break; - case CallingConv::CHERI_CCallee: Out << "chericcallcce"; break; + case CallingConv::CHERI_CCallee: + Out << "chericcallee"; + break; case CallingConv::CHERI_LibCall: Out << "cherilibcallcc"; break; diff --git a/llvm/test/CodeGen/Mips/cheri/cheri-ccallee.ll b/llvm/test/CodeGen/Mips/cheri/cheri-ccallee.ll index 8453afd8d10a7..d676a1bc2dbb6 100644 --- a/llvm/test/CodeGen/Mips/cheri/cheri-ccallee.ll +++ b/llvm/test/CodeGen/Mips/cheri/cheri-ccallee.ll @@ -2,7 +2,7 @@ ; RUN: %cheri_llc %s -O1 -o - | FileCheck %s ; Function Attrs: nounwind -define chericcallcce void @fish() { +define chericcallee void @fish() { ; CHECK-LABEL: fish: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: daddiu $2, $zero, 0 diff --git a/llvm/test/CodeGen/RISCV/cheri/cheri-local-libcall.ll b/llvm/test/CodeGen/RISCV/cheri/cheri-local-libcall.ll index b36272d3ef421..c32fc59b0687d 100644 --- a/llvm/test/CodeGen/RISCV/cheri/cheri-local-libcall.ll +++ b/llvm/test/CodeGen/RISCV/cheri/cheri-local-libcall.ll @@ -9,7 +9,7 @@ entry: ret void } -define dso_local chericcallcce void @_Z9say_hellov() local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee void @_Z9say_hellov() local_unnamed_addr addrspace(200) #1 { entry: store ptr addrspace(200) @_Z11id_functionv, ptr addrspace(200) @f, align 8 ret void diff --git a/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-call-ccallee.ll b/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-call-ccallee.ll index 46d2e95956dd7..0639dd1cb65b1 100644 --- a/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-call-ccallee.ll +++ b/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-call-ccallee.ll @@ -9,11 +9,11 @@ define dso_local void @func() local_unnamed_addr addrspace(200) #0 { entry: ; Make sure that there's a 4-byte stack argument passed in ct0. ; CHECK: csetbounds ct0, csp, 4 - call chericcallcce void @ccall(i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6) #2 + call chericcallee void @ccall(i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6) #2 ret void } -declare dso_local chericcallcce void @ccall(i32, i32, i32, i32, i32, i32, i32) local_unnamed_addr addrspace(200) #1 +declare dso_local chericcallee void @ccall(i32, i32, i32, i32, i32, i32, i32) local_unnamed_addr addrspace(200) #1 attributes #0 = { nounwind "frame-pointer"="none" "min-legal-vector-width"="0" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="cheriot" "target-features"="+xcheri,-64bit,-relax,-save-restore" } attributes #1 = { "frame-pointer"="none" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="cheriot" "target-features"="+xcheri,-64bit,-relax,-save-restore" } diff --git a/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-ccall.ll b/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-ccall.ll index 6b71d1d4382a5..38316aed19f25 100644 --- a/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-ccall.ll +++ b/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-ccall.ll @@ -9,7 +9,7 @@ target triple = "riscv32-unknown-unknown" @testcall8.stack_arg = internal addrspace(200) global i32 0, align 4 ; Function Attrs: minsize mustprogress nofree norecurse nosync nounwind optsize readnone willreturn -define dso_local chericcallcce i32 @test2(i32 %a0, i32 %a1) local_unnamed_addr addrspace(200) #0 { +define dso_local chericcallee i32 @test2(i32 %a0, i32 %a1) local_unnamed_addr addrspace(200) #0 { ; Check that we have the first two arguments in the right registers. ; CHECK-LABEL: test2: ; CHECK: # %bb.0: # %entry @@ -21,7 +21,7 @@ entry: } ; Function Attrs: minsize mustprogress nofree norecurse nosync nounwind optsize readonly willreturn -define dso_local chericcallcce i32 @test6(i32 addrspace(200)* nocapture readonly %a0, i32 addrspace(200)* nocapture readonly %a1, i32 addrspace(200)* nocapture readonly %a2, i32 addrspace(200)* nocapture readonly %a3, i32 addrspace(200)* nocapture readonly %a4, i32 addrspace(200)* nocapture readonly %a5) local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee i32 @test6(i32 addrspace(200)* nocapture readonly %a0, i32 addrspace(200)* nocapture readonly %a1, i32 addrspace(200)* nocapture readonly %a2, i32 addrspace(200)* nocapture readonly %a3, i32 addrspace(200)* nocapture readonly %a4, i32 addrspace(200)* nocapture readonly %a5) local_unnamed_addr addrspace(200) #1 { ; Check that we are loading the last register argument ; CHECK-LABEL: test6: ; CHECK: clw a5, 0(ca5) @@ -41,7 +41,7 @@ entry: } ; Function Attrs: minsize mustprogress nofree norecurse nosync nounwind optsize readonly willreturn -define dso_local chericcallcce i32 @test8(i32 addrspace(200)* nocapture readonly %a0, i32 addrspace(200)* nocapture readonly %a1, i32 addrspace(200)* nocapture readonly %a2, i32 addrspace(200)* nocapture readonly %a3, i32 addrspace(200)* nocapture readonly %a4, i32 addrspace(200)* nocapture readonly %a5, i32 addrspace(200)* nocapture readonly %a6, i32 addrspace(200)* nocapture readonly %a7) local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee i32 @test8(i32 addrspace(200)* nocapture readonly %a0, i32 addrspace(200)* nocapture readonly %a1, i32 addrspace(200)* nocapture readonly %a2, i32 addrspace(200)* nocapture readonly %a3, i32 addrspace(200)* nocapture readonly %a4, i32 addrspace(200)* nocapture readonly %a5, i32 addrspace(200)* nocapture readonly %a6, i32 addrspace(200)* nocapture readonly %a7) local_unnamed_addr addrspace(200) #1 { ; Check that the last argument (used in the multiply) is loaded from offset 8 ; in the stack-argument capability. ; CHECK-LABEL: test8: diff --git a/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-exported-interrupts.ll b/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-exported-interrupts.ll index 7967b32c88811..846c4ce0c69c7 100644 --- a/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-exported-interrupts.ll +++ b/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-exported-interrupts.ll @@ -7,7 +7,7 @@ target triple = "riscv32-unknown-unknown" ; Function Attrs: minsize mustprogress nounwind optsize define dso_local void @_Z15internal_callerv() local_unnamed_addr addrspace(200) #0 { entry: - tail call chericcallcce void @_Z5emptyv() #2 + tail call chericcallee void @_Z5emptyv() #2 ret void } @@ -23,7 +23,7 @@ entry: ; CHECK: .word __export_example__Z5emptyv+1 ; Function Attrs: minsize optsize -declare dso_local chericcallcce void @_Z5emptyv() local_unnamed_addr addrspace(200) #1 +declare dso_local chericcallee void @_Z5emptyv() local_unnamed_addr addrspace(200) #1 attributes #0 = { minsize mustprogress nounwind optsize "cheri-compartment"="example" "frame-pointer"="none" "min-legal-vector-width"="0" "no-builtins" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="cheriot" "target-features"="+xcheri,-64bit,-relax,-save-restore" } attributes #1 = { minsize optsize "cheri-compartment"="example" "frame-pointer"="none" "interrupt-state"="enabled" "no-builtins" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="cheriot" "target-features"="+xcheri,-64bit,-relax,-save-restore" } diff --git a/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-exported-unused-args.ll b/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-exported-unused-args.ll index 2796c6daf2233..95f7abca696a3 100644 --- a/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-exported-unused-args.ll +++ b/llvm/test/CodeGen/RISCV/cheri/cheri-mcu-exported-unused-args.ll @@ -5,7 +5,7 @@ target datalayout = "e-m:e-pf200:64:64:64:32-p:32:32-i64:64-n32-S128-A200-P200-G target triple = "riscv32-unknown-unknown" ; Function Attrs: minsize mustprogress nofree norecurse nosync nounwind optsize readnone willreturn -define dso_local chericcallcce i32 @_Z2fnPvS_i(i8 addrspace(200)* nocapture readnone %a, i8 addrspace(200)* nocapture readnone %b, i32 returned %c) local_unnamed_addr addrspace(200) #0 { +define dso_local chericcallee i32 @_Z2fnPvS_i(i8 addrspace(200)* nocapture readnone %a, i8 addrspace(200)* nocapture readnone %b, i32 returned %c) local_unnamed_addr addrspace(200) #0 { entry: ret i32 %c } diff --git a/llvm/test/CodeGen/RISCV/cheri/cheriot-check-arg-permissions.ll b/llvm/test/CodeGen/RISCV/cheri/cheriot-check-arg-permissions.ll index 5872ce6b56b7a..1fc912266ea1d 100644 --- a/llvm/test/CodeGen/RISCV/cheri/cheriot-check-arg-permissions.ll +++ b/llvm/test/CodeGen/RISCV/cheri/cheriot-check-arg-permissions.ll @@ -14,7 +14,7 @@ target triple = "riscv32-unknown-unknown" ; may be on the stack). ; Function Attrs: minsize mustprogress nofree norecurse nosync nounwind optsize willreturn writeonly -define dso_local chericcallcce void @_Z4ret2v(%struct.ret addrspace(200)* noalias nocapture sret(%struct.ret) align 8 %agg.result) local_unnamed_addr addrspace(200) #0 { +define dso_local chericcallee void @_Z4ret2v(%struct.ret addrspace(200)* noalias nocapture sret(%struct.ret) align 8 %agg.result) local_unnamed_addr addrspace(200) #0 { entry: ; CHECK-LABEL: _Z4ret2v: ; Make sure that the base points to the current address @@ -42,7 +42,7 @@ entry: ; compiler must insert the check that they are valid. ; Function Attrs: minsize mustprogress nofree norecurse nosync nounwind optsize readnone willreturn -define dso_local chericcallcce i32 @_Z7bigargsiiiiiiii(i32 %a0, i32 %a1, i32 %a2, i32 %a3, i32 %a4, i32 %a5, i32 %a6, i32 %a7) local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee i32 @_Z7bigargsiiiiiiii(i32 %a0, i32 %a1, i32 %a2, i32 %a3, i32 %a4, i32 %a5, i32 %a6, i32 %a7) local_unnamed_addr addrspace(200) #1 { entry: ; CHECK-LABEL: _Z7bigargsiiiiiiii: ; Make sure that the base points to the current address diff --git a/llvm/test/CodeGen/RISCV/cheri/cheriot-frame-checks.ll b/llvm/test/CodeGen/RISCV/cheri/cheriot-frame-checks.ll index a151d8e5f2883..5b8d1814c0350 100644 --- a/llvm/test/CodeGen/RISCV/cheri/cheriot-frame-checks.ll +++ b/llvm/test/CodeGen/RISCV/cheri/cheriot-frame-checks.ll @@ -6,7 +6,7 @@ target triple = "riscv32-unknown-unknown" @.str = private unnamed_addr addrspace(200) constant [16 x i8] c"Seven arguments\00", align 1 ; Function Attrs: minsize mustprogress nounwind optsize -define dso_local chericcallcce noundef i32 @_Z22compartment_call_inneriiPKiiS0_ii(i32 noundef %0, i32 noundef %1, ptr addrspace(200) nocapture noundef readnone %2, i32 noundef %3, ptr addrspace(200) nocapture noundef readnone %4, i32 noundef %5, i32 noundef %6) local_unnamed_addr addrspace(200) #0 { +define dso_local chericcallee noundef i32 @_Z22compartment_call_inneriiPKiiS0_ii(i32 noundef %0, i32 noundef %1, ptr addrspace(200) nocapture noundef readnone %2, i32 noundef %3, ptr addrspace(200) nocapture noundef readnone %4, i32 noundef %5, i32 noundef %6) local_unnamed_addr addrspace(200) #0 { ; CHECK-LABEL: _Z22compartment_call_inneriiPKiiS0_ii: ; CHECK: # %bb.0: ; CHECK-NEXT: cgetbase t2, ct0 diff --git a/llvm/test/CodeGen/RISCV/cheri/cheriot-jumptable.ll b/llvm/test/CodeGen/RISCV/cheri/cheriot-jumptable.ll index 71ccb637412d4..5aae22f71f9a8 100644 --- a/llvm/test/CodeGen/RISCV/cheri/cheriot-jumptable.ll +++ b/llvm/test/CodeGen/RISCV/cheri/cheriot-jumptable.ll @@ -4,7 +4,7 @@ target datalayout = "e-m:e-pf200:64:64:64:32-p:32:32-i64:64-n32-S128-A200-P200-G target triple = "riscv32-unknown-unknown" ; Function Attrs: minsize nounwind optsize -define dso_local chericcallcce i32 @_Z2swi(i32 noundef %v) local_unnamed_addr addrspace(200) #0 { +define dso_local chericcallee i32 @_Z2swi(i32 noundef %v) local_unnamed_addr addrspace(200) #0 { ; CHECK-LABEL: _Z2swi: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: addi a0, a0, -1 diff --git a/llvm/test/CodeGen/RISCV/cheri/cheriot-sealed-attr.ll b/llvm/test/CodeGen/RISCV/cheri/cheriot-sealed-attr.ll index 2c0342b80d60a..79a91df3cbc38 100644 --- a/llvm/test/CodeGen/RISCV/cheri/cheriot-sealed-attr.ll +++ b/llvm/test/CodeGen/RISCV/cheri/cheriot-sealed-attr.ll @@ -14,7 +14,7 @@ target triple = "riscv32cheriot-unknown-cheriotrtos" %struct.SealedAllocatorCapabilityState = type { i32, i32, %struct.AllocatorCapabilityState } ; Function Attrs: minsize mustprogress nounwind optsize -define dso_local chericcallcce noundef i32 @test_static_sealing() local_unnamed_addr addrspace(200) #0 { +define dso_local chericcallee noundef i32 @test_static_sealing() local_unnamed_addr addrspace(200) #0 { entry: ;; CHECK: .LBB0_1: # %entry diff --git a/llvm/test/CodeGen/RISCV/cheri/cheriot-stack-size-export.ll b/llvm/test/CodeGen/RISCV/cheri/cheriot-stack-size-export.ll index 7e2d307fea591..544d97e6ffae7 100644 --- a/llvm/test/CodeGen/RISCV/cheri/cheriot-stack-size-export.ll +++ b/llvm/test/CodeGen/RISCV/cheri/cheriot-stack-size-export.ll @@ -4,7 +4,7 @@ target datalayout = "e-m:e-pf200:64:64:64:32-p:32:32-i64:64-n32-S128-A200-P200-G target triple = "riscv32-unknown-unknown" ; Function Attrs: noinline nounwind optnone -define dso_local chericcallcce void @_Z9usesStackv() addrspace(200) #0 { +define dso_local chericcallee void @_Z9usesStackv() addrspace(200) #0 { ; CHECK-LABEL: _Z9usesStackv ; Make sure that the stack is what we expect. If this changes, we need to ; update the number in the export table below. @@ -23,13 +23,13 @@ declare dso_local void @foo(i8 addrspace(200)*) addrspace(200) #1 ; CHECK-LABEL: _Z11usesNoStackv ; Make sure we don't allocate anything on the stack here. ; CHECK-NOT: csp -define dso_local chericcallcce void @_Z11usesNoStackv() addrspace(200) #0 { +define dso_local chericcallee void @_Z11usesNoStackv() addrspace(200) #0 { entry: ret void } ; Function Attrs: noinline nounwind optnone -define dso_local chericcallcce void @_Z13usesHugeStackv() addrspace(200) #0 { +define dso_local chericcallee void @_Z13usesHugeStackv() addrspace(200) #0 { ; CHECK-LABEL: _Z13usesHugeStackv ; Make sure that we allocate a load of things on the stack, it doesn't matter ; if this changes to another large value. diff --git a/llvm/test/CodeGen/RISCV/cheri/cheriot-stack-size.ll b/llvm/test/CodeGen/RISCV/cheri/cheriot-stack-size.ll index d452f2623d502..84e3ededcd612 100644 --- a/llvm/test/CodeGen/RISCV/cheri/cheriot-stack-size.ll +++ b/llvm/test/CodeGen/RISCV/cheri/cheriot-stack-size.ll @@ -6,7 +6,7 @@ target triple = "riscv32-unknown-unknown" ; Explicit 256-byte stack requirement ; Function Attrs: minsize nounwind optsize -define dso_local chericcallcce i32 @needs256() local_unnamed_addr addrspace(200) #0 { +define dso_local chericcallee i32 @needs256() local_unnamed_addr addrspace(200) #0 { entry: %call = tail call i32 @foo() #2 ret i32 %call @@ -17,7 +17,7 @@ declare i32 @foo() local_unnamed_addr addrspace(200) #1 ; Explicit 512-byte stack requirement ; Function Attrs: minsize nounwind optsize -define dso_local chericcallcce i32 @needs512() local_unnamed_addr addrspace(200) #3 { +define dso_local chericcallee i32 @needs512() local_unnamed_addr addrspace(200) #3 { entry: %call = tail call i32 @foo() #2 ret i32 %call @@ -25,7 +25,7 @@ entry: ; No stack requirement ; Function Attrs: minsize nounwind optsize -define dso_local chericcallcce i32 @noStack() local_unnamed_addr addrspace(200) #4 { +define dso_local chericcallee i32 @noStack() local_unnamed_addr addrspace(200) #4 { entry: ret i32 0 } @@ -33,7 +33,7 @@ entry: ; Implicit 16-byte requirement as a result of spilling the return value (and ; the 16-byte alignment requirement) ; Function Attrs: minsize nounwind optsize -define dso_local chericcallcce i32 @tinyStack() local_unnamed_addr addrspace(200) #4 { +define dso_local chericcallee i32 @tinyStack() local_unnamed_addr addrspace(200) #4 { entry: %call = tail call i32 @foo() #2 %add1 = add nsw i32 %call, 1 diff --git a/llvm/test/CodeGen/RISCV/cheri/cheriot-struct-ret.ll b/llvm/test/CodeGen/RISCV/cheri/cheriot-struct-ret.ll index 9648bfde98d80..34ae5698eedba 100644 --- a/llvm/test/CodeGen/RISCV/cheri/cheriot-struct-ret.ll +++ b/llvm/test/CodeGen/RISCV/cheri/cheriot-struct-ret.ll @@ -18,7 +18,7 @@ target triple = "riscv32cheriot-unknown-cheriotrtos" @llvm.compiler.used = appending addrspace(200) global [5 x ptr addrspace(200)] [ptr addrspace(200) @_Z11CheckPtrIntv.x, ptr addrspace(200) @_Z14CheckParentPtrv.x, ptr addrspace(200) @_Z9CheckIntsv.x, ptr addrspace(200) @_Z9CheckPtrsv.x, ptr addrspace(200) @force_use], section "llvm.metadata" ; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) -define dso_local chericcallcce i32 @_Z8GetValuev() local_unnamed_addr addrspace(200) #0 { +define dso_local chericcallee i32 @_Z8GetValuev() local_unnamed_addr addrspace(200) #0 { entry: %0 = load i32, ptr addrspace(200) @dummy, align 4, !tbaa !7 %inc = add i32 %0, 1 @@ -27,19 +27,19 @@ entry: } ; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce [2 x i32] @_Z8InitIntsv() local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee [2 x i32] @_Z8InitIntsv() local_unnamed_addr addrspace(200) #1 { ;; CHECK: _Z8InitIntsv: # @_Z8InitIntsv entry: ;; CHECK: ct.ccall _Z8GetValuev ;; CHECK: mv s0, a0 - %call = tail call chericcallcce i32 @_Z8GetValuev() + %call = tail call chericcallee i32 @_Z8GetValuev() ;; CHECK: ct.ccall _Z8GetValuev ;; CHECK: mv a1, a0 ;; CHECK: mv a0, s0 - %call1 = tail call chericcallcce i32 @_Z8GetValuev() + %call1 = tail call chericcallee i32 @_Z8GetValuev() %.fca.0.insert = insertvalue [2 x i32] poison, i32 %call, 0 %.fca.1.insert = insertvalue [2 x i32] %.fca.0.insert, i32 %call1, 1 @@ -52,7 +52,7 @@ entry: } ; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce [2 x i32] @_Z7ChgInts11TwoIntegers([2 x i32] %x.coerce) local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee [2 x i32] @_Z7ChgInts11TwoIntegers([2 x i32] %x.coerce) local_unnamed_addr addrspace(200) #1 { ;; CHECK: _Z7ChgInts11TwoIntegers: # @_Z7ChgInts11TwoIntegers entry: @@ -62,13 +62,13 @@ entry: %x.coerce.fca.1.extract = extractvalue [2 x i32] %x.coerce, 1 ;; CHECK: ct.ccall _Z8GetValuev - %call = tail call chericcallcce i32 @_Z8GetValuev() + %call = tail call chericcallee i32 @_Z8GetValuev() ;; CHECK: sub s1, s1, a0 %sub = sub i32 %x.coerce.fca.0.extract, %call ;; CHECK: ct.ccall _Z8GetValuev - %call1 = tail call chericcallcce i32 @_Z8GetValuev() + %call1 = tail call chericcallee i32 @_Z8GetValuev() ;; CHECK: sub a1, s0, a0 %sub2 = sub i32 %x.coerce.fca.1.extract, %call1 @@ -86,10 +86,10 @@ entry: } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce void @_Z9CheckIntsv() local_unnamed_addr addrspace(200) #2 { +define dso_local chericcallee void @_Z9CheckIntsv() local_unnamed_addr addrspace(200) #2 { entry: - %call = tail call chericcallcce [2 x i32] @_Z8InitIntsv() - %call1 = tail call chericcallcce [2 x i32] @_Z7ChgInts11TwoIntegers([2 x i32] %call) + %call = tail call chericcallee [2 x i32] @_Z8InitIntsv() + %call1 = tail call chericcallee [2 x i32] @_Z7ChgInts11TwoIntegers([2 x i32] %call) ;; CHECK: _Z9CheckIntsv: # @_Z9CheckIntsv ;; CHECK: ct.ccall _Z8InitIntsv @@ -109,12 +109,12 @@ declare void @llvm.lifetime.start.p200(i64 immarg, ptr addrspace(200) nocapture) declare void @llvm.lifetime.end.p200(i64 immarg, ptr addrspace(200) nocapture) addrspace(200) #3 ; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce %struct.TwoPointers @_Z8InitPtrsv() local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee %struct.TwoPointers @_Z8InitPtrsv() local_unnamed_addr addrspace(200) #1 { ;; CHECK: _Z8InitPtrsv: # @_Z8InitPtrsv entry: ;; CHECK: ct.ccall _Z8GetValuev - %call = tail call chericcallcce i32 @_Z8GetValuev() + %call = tail call chericcallee i32 @_Z8GetValuev() ;; CHECK: auicgp cs0, %cheriot_compartment_hi(dummies) ;; CHECK: cincoffset cs0, cs0, %cheriot_compartment_lo_i(.LBB4_1) @@ -125,7 +125,7 @@ entry: ;; CHECK: ct.ccall _Z8GetValuev ;; CHECK: ct.cincoffset ca1, cs0, a0 - %call1 = tail call chericcallcce i32 @_Z8GetValuev() + %call1 = tail call chericcallee i32 @_Z8GetValuev() %rem2 = urem i32 %call1, 5 %add.ptr3 = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem2 %.fca.0.insert = insertvalue %struct.TwoPointers poison, ptr addrspace(200) %add.ptr, 0 @@ -141,7 +141,7 @@ entry: } ; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce %struct.TwoPointers @_Z7ChgPtrs11TwoPointers(ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1) local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee %struct.TwoPointers @_Z7ChgPtrs11TwoPointers(ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1) local_unnamed_addr addrspace(200) #1 { ;; CHECK: _Z7ChgPtrs11TwoPointers: # @_Z7ChgPtrs11TwoPointers ;; CHECK: ct.csc ca1, 16(csp) # 8-byte Folded Spill entry: @@ -153,7 +153,7 @@ entry: store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 ;; CHECK: ct.ccall _Z8GetValuev - %call = tail call chericcallcce i32 @_Z8GetValuev() + %call = tail call chericcallee i32 @_Z8GetValuev() %rem = urem i32 %call, 5 ;; %call above was saved/reloaded in a0 @@ -172,7 +172,7 @@ entry: store ptr addrspace(200) %x.coerce1, ptr addrspace(200) @force_use, align 8, !tbaa !11 ;; CHECK: ct.ccall _Z8GetValuev - %call2 = tail call chericcallcce i32 @_Z8GetValuev() + %call2 = tail call chericcallee i32 @_Z8GetValuev() %rem3 = urem i32 %call2, 5 ;; CHECK: ct.cincoffset ca1, cs0, a0 @@ -188,16 +188,16 @@ entry: } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce void @_Z9CheckPtrsv() local_unnamed_addr addrspace(200) #2 { +define dso_local chericcallee void @_Z9CheckPtrsv() local_unnamed_addr addrspace(200) #2 { ;; CHECK: _Z9CheckPtrsv: # @_Z9CheckPtrsv entry: ;; CHECK: ct.ccall _Z8InitPtrsv ;; CHECK-NEXT: ct.ccall _Z7ChgPtrs11TwoPointers - %call = tail call chericcallcce %struct.TwoPointers @_Z8InitPtrsv() + %call = tail call chericcallee %struct.TwoPointers @_Z8InitPtrsv() %0 = extractvalue %struct.TwoPointers %call, 0 %1 = extractvalue %struct.TwoPointers %call, 1 - %call1 = tail call chericcallcce %struct.TwoPointers @_Z7ChgPtrs11TwoPointers(ptr addrspace(200) %0, ptr addrspace(200) %1) + %call1 = tail call chericcallee %struct.TwoPointers @_Z7ChgPtrs11TwoPointers(ptr addrspace(200) %0, ptr addrspace(200) %1) %2 = extractvalue %struct.TwoPointers %call1, 0 %3 = extractvalue %struct.TwoPointers %call1, 1 store ptr addrspace(200) %2, ptr addrspace(200) @_Z9CheckPtrsv.x, align 8, !tbaa !11 @@ -206,12 +206,12 @@ entry: } ; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce %struct.PointerAndInt @_Z10InitPtrIntv() local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee %struct.PointerAndInt @_Z10InitPtrIntv() local_unnamed_addr addrspace(200) #1 { ;; CHECK: _Z10InitPtrIntv: # @_Z10InitPtrIntv entry: ;; CHECK: ct.ccall _Z8GetValuev - %call = tail call chericcallcce i32 @_Z8GetValuev() + %call = tail call chericcallee i32 @_Z8GetValuev() %rem = urem i32 %call, 5 ;; CHECK: auicgp ca1, %cheriot_compartment_hi(dummies) @@ -221,7 +221,7 @@ entry: %add.ptr = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem ;; CHECK: ct.ccall _Z8GetValuev - %call1 = tail call chericcallcce i32 @_Z8GetValuev() + %call1 = tail call chericcallee i32 @_Z8GetValuev() ;; CHECK: mv a1, a0 ;; CHECK: ct.cmove ca0, cs0 @@ -236,7 +236,7 @@ entry: } ; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce %struct.PointerAndInt @_Z9ChgPtrInt13PointerAndInt(ptr addrspace(200) %x.coerce0, i32 %x.coerce1) local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee %struct.PointerAndInt @_Z9ChgPtrInt13PointerAndInt(ptr addrspace(200) %x.coerce0, i32 %x.coerce1) local_unnamed_addr addrspace(200) #1 { ;; CHECK: _Z9ChgPtrInt13PointerAndInt: # @_Z9ChgPtrInt13PointerAndInt ;; CHECK: mv s0, a1 entry: @@ -249,7 +249,7 @@ entry: store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 ;; CHECK: ct.ccall _Z8GetValuev - %call = tail call chericcallcce i32 @_Z8GetValuev() + %call = tail call chericcallee i32 @_Z8GetValuev() %rem = urem i32 %call, 5 ;; CHECK: auicgp ca1, %cheriot_compartment_hi(dummies) @@ -259,7 +259,7 @@ entry: %add.ptr = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem ;; CHECK: ct.ccall _Z8GetValuev - %call2 = tail call chericcallcce i32 @_Z8GetValuev() + %call2 = tail call chericcallee i32 @_Z8GetValuev() ;; CHECK: sub a1, s0, a0 %sub = sub i32 %x.coerce1, %call2 @@ -277,16 +277,16 @@ entry: } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce void @_Z11CheckPtrIntv() local_unnamed_addr addrspace(200) #2 { +define dso_local chericcallee void @_Z11CheckPtrIntv() local_unnamed_addr addrspace(200) #2 { ;; CHECK: _Z11CheckPtrIntv: # @_Z11CheckPtrIntv entry: ;; CHECK: ct.ccall _Z10InitPtrIntv ;; CHECK-NEXT: ct.ccall _Z9ChgPtrInt13PointerAndInt - %call = tail call chericcallcce %struct.PointerAndInt @_Z10InitPtrIntv() + %call = tail call chericcallee %struct.PointerAndInt @_Z10InitPtrIntv() %0 = extractvalue %struct.PointerAndInt %call, 0 %1 = extractvalue %struct.PointerAndInt %call, 1 - %call1 = tail call chericcallcce %struct.PointerAndInt @_Z9ChgPtrInt13PointerAndInt(ptr addrspace(200) %0, i32 %1) + %call1 = tail call chericcallee %struct.PointerAndInt @_Z9ChgPtrInt13PointerAndInt(ptr addrspace(200) %0, i32 %1) %2 = extractvalue %struct.PointerAndInt %call1, 0 %3 = extractvalue %struct.PointerAndInt %call1, 1 store ptr addrspace(200) %2, ptr addrspace(200) @_Z11CheckPtrIntv.x, align 8, !tbaa !11 @@ -295,14 +295,14 @@ entry: } ; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce %struct.ParentPtr @_Z13InitParentPtrv() local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee %struct.ParentPtr @_Z13InitParentPtrv() local_unnamed_addr addrspace(200) #1 { ;; CHECK: _Z13InitParentPtrv: # @_Z13InitParentPtrv entry: ;; CHECK: ct.ccall _Z8GetValuev - %call = tail call chericcallcce i32 @_Z8GetValuev() + %call = tail call chericcallee i32 @_Z8GetValuev() %rem = urem i32 %call, 5 ;; CHECK: auicgp cs0, %cheriot_compartment_hi(dummies) @@ -313,7 +313,7 @@ entry: %add.ptr = getelementptr inbounds nuw i32, ptr addrspace(200) @dummies, i32 %rem ;; CHECK: ct.ccall _Z8GetValuev - %call1 = tail call chericcallcce i32 @_Z8GetValuev() + %call1 = tail call chericcallee i32 @_Z8GetValuev() %rem2 = urem i32 %call1, 5 ;; CHECK: ct.cincoffset ca1, cs0, a0 @@ -328,7 +328,7 @@ entry: } ; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce %struct.ParentPtr @_Z12ChgParentPtr9ParentPtr(ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1) local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee %struct.ParentPtr @_Z12ChgParentPtr9ParentPtr(ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1) local_unnamed_addr addrspace(200) #1 { ;; CHECK: _Z12ChgParentPtr9ParentPtr: # @_Z12ChgParentPtr9ParentPtr ;; CHECK: ct.csc ca1, 16(csp) # 8-byte Folded Spill @@ -342,7 +342,7 @@ entry: store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 ;; CHECK: ct.ccall _Z8GetValuev - %call = tail call chericcallcce i32 @_Z8GetValuev() + %call = tail call chericcallee i32 @_Z8GetValuev() %rem = urem i32 %call, 5 ;; CHECK: auicgp cs0, %cheriot_compartment_hi(dummies) @@ -358,7 +358,7 @@ entry: store ptr addrspace(200) %x.coerce1.fca.0.extract, ptr addrspace(200) @force_use, align 8, !tbaa !11 ;; CHECK: ct.ccall _Z8GetValuev - %call3 = tail call chericcallcce i32 @_Z8GetValuev() + %call3 = tail call chericcallee i32 @_Z8GetValuev() %rem4 = urem i32 %call3, 5 ;; CHECK: ct.cincoffset ca1, cs0, a0 @@ -373,17 +373,17 @@ entry: } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce void @_Z14CheckParentPtrv() local_unnamed_addr addrspace(200) #2 { +define dso_local chericcallee void @_Z14CheckParentPtrv() local_unnamed_addr addrspace(200) #2 { ;; CHECK: _Z14CheckParentPtrv: # @_Z14CheckParentPtrv entry: ;; CHECK: ct.ccall _Z13InitParentPtrv ;; CHECK-NEXT: ct.ccall _Z12ChgParentPtr9ParentPtr - %call = tail call chericcallcce %struct.ParentPtr @_Z13InitParentPtrv() + %call = tail call chericcallee %struct.ParentPtr @_Z13InitParentPtrv() %0 = extractvalue %struct.ParentPtr %call, 0 %1 = extractvalue %struct.ParentPtr %call, 1 - %call1 = tail call chericcallcce %struct.ParentPtr @_Z12ChgParentPtr9ParentPtr(ptr addrspace(200) %0, %struct.InnerPtr %1) + %call1 = tail call chericcallee %struct.ParentPtr @_Z12ChgParentPtr9ParentPtr(ptr addrspace(200) %0, %struct.InnerPtr %1) %2 = extractvalue %struct.ParentPtr %call1, 0 %3 = extractvalue %struct.ParentPtr %call1, 1 %.fca.0.extract3 = extractvalue %struct.InnerPtr %3, 0 @@ -393,7 +393,7 @@ entry: } ; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce %struct.TwoPointers @_Z8ChgPtrs2i11TwoPointers(i32 noundef %new_int, ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1) local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee %struct.TwoPointers @_Z8ChgPtrs2i11TwoPointers(i32 noundef %new_int, ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1) local_unnamed_addr addrspace(200) #1 { ;; CHECK: _Z8ChgPtrs2i11TwoPointers: # @_Z8ChgPtrs2i11TwoPointers ;; CHECK: ct.csc ca2, 32(csp) # 8-byte Folded Spill @@ -407,7 +407,7 @@ entry: store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 ;; CHECK: ct.ccall _Z8GetValuev - %call = tail call chericcallcce i32 @_Z8GetValuev() + %call = tail call chericcallee i32 @_Z8GetValuev() %add = add i32 %call, %new_int %rem = urem i32 %add, 5 @@ -425,7 +425,7 @@ entry: ;; CHECK: ct.ccall _Z8GetValuev ;; CHECK: ct.clw a1, 28(csp) # 4-byte Folded Reload - %call2 = tail call chericcallcce i32 @_Z8GetValuev() + %call2 = tail call chericcallee i32 @_Z8GetValuev() %add3 = add i32 %call2, %new_int %rem4 = urem i32 %add3, 5 @@ -441,7 +441,7 @@ entry: } ; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce %struct.ParentPtr @_Z13ChgParentPtr2i9ParentPtr(i32 noundef %new_int, ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1) local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee %struct.ParentPtr @_Z13ChgParentPtr2i9ParentPtr(i32 noundef %new_int, ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1) local_unnamed_addr addrspace(200) #1 { ;; CHECK: _Z13ChgParentPtr2i9ParentPtr: # @_Z13ChgParentPtr2i9ParentPtr ;; CHECK: ct.csc ca2, 32(csp) # 8-byte Folded Spill @@ -457,7 +457,7 @@ entry: store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 ;; CHECK: ct.ccall _Z8GetValuev - %call = tail call chericcallcce i32 @_Z8GetValuev() + %call = tail call chericcallee i32 @_Z8GetValuev() %add = add i32 %call, %new_int %rem = urem i32 %add, 5 @@ -475,7 +475,7 @@ entry: ;; CHECK: ct.ccall _Z8GetValuev ;; CHECK: ct.clw a1, 28(csp) # 4-byte Folded Reload - %call3 = tail call chericcallcce i32 @_Z8GetValuev() + %call3 = tail call chericcallee i32 @_Z8GetValuev() %add4 = add i32 %call3, %new_int %rem5 = urem i32 %add4, 5 @@ -497,7 +497,7 @@ declare void @llvm.va_start.p200(ptr addrspace(200)) addrspace(200) #6 declare void @llvm.va_end.p200(ptr addrspace(200)) addrspace(200) #6 ; Function Attrs: nofree noinline norecurse nounwind -define dso_local chericcallcce %struct.TwoPointers @_Z8ChgPtrs3i11TwoPointersz(i32 noundef %n, ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1, ...) local_unnamed_addr addrspace(200) #7 { +define dso_local chericcallee %struct.TwoPointers @_Z8ChgPtrs3i11TwoPointersz(i32 noundef %n, ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1, ...) local_unnamed_addr addrspace(200) #7 { ;; CHECK: _Z8ChgPtrs3i11TwoPointersz: # @_Z8ChgPtrs3i11TwoPointersz entry: @@ -507,7 +507,7 @@ entry: call void @llvm.va_start.p200(ptr addrspace(200) nonnull %args) store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 call void @llvm.lifetime.start.p200(i64 4, ptr addrspace(200) nonnull %_) - %call = call chericcallcce i32 @_Z8GetValuev() + %call = call chericcallee i32 @_Z8GetValuev() store volatile i32 %call, ptr addrspace(200) %_, align 4, !tbaa !7 store ptr addrspace(200) %x.coerce1, ptr addrspace(200) @force_use, align 8, !tbaa !11 %cmp10 = icmp sgt i32 %n, 0 @@ -536,8 +536,8 @@ for.body: ; preds = %entry, %for.body %argp.next = getelementptr inbounds nuw i8, ptr addrspace(200) %argp.cur, i32 4 store ptr addrspace(200) %argp.next, ptr addrspace(200) %args, align 8 %0 = load i32, ptr addrspace(200) %argp.cur, align 4, !tbaa !7 - %call1 = call chericcallcce i32 @_Z8GetValuev() - %call3 = call chericcallcce i32 @_Z8GetValuev() + %call1 = call chericcallee i32 @_Z8GetValuev() + %call3 = call chericcallee i32 @_Z8GetValuev() %inc = add nuw nsw i32 %i.011, 1 %exitcond.not = icmp eq i32 %inc, %n br i1 %exitcond.not, label %for.cond.for.cond.cleanup_crit_edge, label %for.body, !llvm.loop !17 @@ -559,7 +559,7 @@ for.cond.cleanup: ; preds = %for.cond.for.cond.c } ; Function Attrs: nofree noinline norecurse nounwind -define dso_local chericcallcce %struct.ParentPtr @_Z13ChgParentPtr3i9ParentPtrz(i32 noundef %n, ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1, ...) local_unnamed_addr addrspace(200) #7 { +define dso_local chericcallee %struct.ParentPtr @_Z13ChgParentPtr3i9ParentPtrz(i32 noundef %n, ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1, ...) local_unnamed_addr addrspace(200) #7 { ;; CHECK: _Z13ChgParentPtr3i9ParentPtrz: # @_Z13ChgParentPtr3i9ParentPtrz entry: @@ -570,7 +570,7 @@ entry: call void @llvm.va_start.p200(ptr addrspace(200) nonnull %args) store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 call void @llvm.lifetime.start.p200(i64 4, ptr addrspace(200) nonnull %_) - %call = call chericcallcce i32 @_Z8GetValuev() + %call = call chericcallee i32 @_Z8GetValuev() store volatile i32 %call, ptr addrspace(200) %_, align 4, !tbaa !7 store ptr addrspace(200) %x.coerce1.fca.0.extract, ptr addrspace(200) @force_use, align 8, !tbaa !11 %cmp12 = icmp sgt i32 %n, 0 @@ -597,8 +597,8 @@ for.body: ; preds = %entry, %for.body %argp.next = getelementptr inbounds nuw i8, ptr addrspace(200) %argp.cur, i32 4 store ptr addrspace(200) %argp.next, ptr addrspace(200) %args, align 8 %0 = load i32, ptr addrspace(200) %argp.cur, align 4, !tbaa !7 - %call2 = call chericcallcce i32 @_Z8GetValuev() - %call4 = call chericcallcce i32 @_Z8GetValuev() + %call2 = call chericcallee i32 @_Z8GetValuev() + %call4 = call chericcallee i32 @_Z8GetValuev() %inc = add nuw nsw i32 %i.013, 1 %exitcond.not = icmp eq i32 %inc, %n br i1 %exitcond.not, label %for.cond.for.cond.cleanup_crit_edge, label %for.body, !llvm.loop !18 @@ -623,7 +623,7 @@ for.cond.cleanup: ; preds = %for.cond.for.cond.c } ; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce %struct.TwoPointers @_Z8ChgPtrs4iiiii11TwoPointers(i32 noundef %n0, i32 noundef %n1, i32 noundef %n2, i32 noundef %n3, i32 noundef %n4, ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1) local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee %struct.TwoPointers @_Z8ChgPtrs4iiiii11TwoPointers(i32 noundef %n0, i32 noundef %n1, i32 noundef %n2, i32 noundef %n3, i32 noundef %n4, ptr addrspace(200) %x.coerce0, ptr addrspace(200) %x.coerce1) local_unnamed_addr addrspace(200) #1 { ;; CHECK: _Z8ChgPtrs4iiiii11TwoPointers: # @_Z8ChgPtrs4iiiii11TwoPointers ;; CHECK: mv s1, a1 ;; CHECK: mv s0, a0 @@ -637,7 +637,7 @@ entry: store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 ;; CHECK: ct.ccall _Z8GetValuev - %call = tail call chericcallcce i32 @_Z8GetValuev() + %call = tail call chericcallee i32 @_Z8GetValuev() %add = add i32 %n1, %n0 %add1 = add i32 %add, %n2 @@ -658,7 +658,7 @@ entry: store ptr addrspace(200) %x.coerce1, ptr addrspace(200) @force_use, align 8, !tbaa !11 ;; CHECK: ct.ccall _Z8GetValuev - %call6 = tail call chericcallcce i32 @_Z8GetValuev() + %call6 = tail call chericcallee i32 @_Z8GetValuev() %add7 = add i32 %n1, %n0 %add8 = add i32 %add7, %n2 %add9 = add i32 %add8, %n3 @@ -679,7 +679,7 @@ entry: } ; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) -define dso_local chericcallcce %struct.ParentPtr @_Z13ChgParentPtr4iiiii9ParentPtr(i32 noundef %n0, i32 noundef %n1, i32 noundef %n2, i32 noundef %n3, i32 noundef %n4, ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1) local_unnamed_addr addrspace(200) #1 { +define dso_local chericcallee %struct.ParentPtr @_Z13ChgParentPtr4iiiii9ParentPtr(i32 noundef %n0, i32 noundef %n1, i32 noundef %n2, i32 noundef %n3, i32 noundef %n4, ptr addrspace(200) %x.coerce0, %struct.InnerPtr %x.coerce1) local_unnamed_addr addrspace(200) #1 { ;; CHECK: _Z13ChgParentPtr4iiiii9ParentPtr: # @_Z13ChgParentPtr4iiiii9ParentPtr ;; CHECK: mv s1, a1 @@ -696,7 +696,7 @@ entry: store ptr addrspace(200) %x.coerce0, ptr addrspace(200) @force_use, align 8, !tbaa !11 ;; CHECK: ct.ccall _Z8GetValuev - %call = tail call chericcallcce i32 @_Z8GetValuev() + %call = tail call chericcallee i32 @_Z8GetValuev() %add = add i32 %n1, %n0 %add2 = add i32 %add, %n2 %add3 = add i32 %add2, %n3 @@ -717,7 +717,7 @@ entry: store ptr addrspace(200) %x.coerce1.fca.0.extract, ptr addrspace(200) @force_use, align 8, !tbaa !11 ;; CHECK: ct.ccall _Z8GetValuev - %call7 = tail call chericcallcce i32 @_Z8GetValuev() + %call7 = tail call chericcallee i32 @_Z8GetValuev() %add8 = add i32 %n1, %n0 %add9 = add i32 %add8, %n2 %add10 = add i32 %add9, %n3 diff --git a/llvm/test/CodeGen/RISCV/cheri/cheriot-zero-ret.ll b/llvm/test/CodeGen/RISCV/cheri/cheriot-zero-ret.ll index 8cbc4c4aad69e..8f6825ef557d0 100644 --- a/llvm/test/CodeGen/RISCV/cheri/cheriot-zero-ret.ll +++ b/llvm/test/CodeGen/RISCV/cheri/cheriot-zero-ret.ll @@ -5,7 +5,7 @@ target datalayout = "e-m:e-pf200:64:64:64:32-p:32:32-i64:64-n32-S128-A200-P200-G target triple = "riscv32-unknown-unknown" ; Function Attrs: minsize mustprogress nofree norecurse nosync nounwind optsize readnone willreturn -define dso_local chericcallcce void @_Z4ret0v() local_unnamed_addr addrspace(200) #0 { +define dso_local chericcallee void @_Z4ret0v() local_unnamed_addr addrspace(200) #0 { entry: ; CHECK-LABEL: _Z4ret0v ; CHECK: li a0, 0 @@ -15,7 +15,7 @@ entry: } ; Function Attrs: minsize mustprogress nofree norecurse nosync nounwind optsize readnone willreturn -define dso_local chericcallcce i32 @_Z4ret1v() local_unnamed_addr addrspace(200) #0 { +define dso_local chericcallee i32 @_Z4ret1v() local_unnamed_addr addrspace(200) #0 { entry: ; CHECK-LABEL: _Z4ret1v ; CHECK: li a0, 1 @@ -25,7 +25,7 @@ entry: } ; Function Attrs: minsize mustprogress nofree norecurse nosync nounwind optsize readnone willreturn -define dso_local chericcallcce [2 x i32] @_Z4ret2v() local_unnamed_addr addrspace(200) #0 { +define dso_local chericcallee [2 x i32] @_Z4ret2v() local_unnamed_addr addrspace(200) #0 { entry: ; CHECK-LABEL: _Z4ret2v ; CHECK: li a0, 1