Skip to content

Commit

Permalink
Get test ready
Browse files Browse the repository at this point in the history
  • Loading branch information
ghehg committed Nov 4, 2024
1 parent 94f1967 commit c120586
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
15 changes: 0 additions & 15 deletions clang/test/CIR/CodeGen/builtins-memory.c

This file was deleted.

11 changes: 11 additions & 0 deletions clang/test/CIR/CodeGen/builtins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,14 @@ int *test_std_addressof2() {
// LLVM: [[RES:%.*]] = load ptr, ptr [[ADDR]], align 8
// LLVM: ret ptr [[RES]]
}

extern "C" void *test_return_address(void) {
return __builtin_return_address(1);

// CIR-LABEL: test_return_address
// [[ARG:%.*]] = cir.const #cir.int<1> : !u32i
// {{%.*}} = cir.llvm.intrinsic "llvm.returnaddress" [[ARG]] : (!u32i) -> !cir.ptr<!void>

// LLVM-LABEL: @test_return_address
// LLVM: {{%.*}} = call ptr @llvm.returnaddress(i32 1)
}

0 comments on commit c120586

Please sign in to comment.