CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
103 lines
4.3 KiB
C++
103 lines
4.3 KiB
C++
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
|
|
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR,CIR_NONE
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t.ll
|
|
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM,LLVM_NONE
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
|
|
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM,LLVM_NONE
|
|
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fzero-call-used-regs=skip -fclangir -emit-cir %s -o %t.cir
|
|
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR,CIR_SKIP
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fzero-call-used-regs=skip -fclangir -emit-llvm %s -o %t.ll
|
|
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM,LLVM_SKIP
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fzero-call-used-regs=skip -emit-llvm %s -o %t.ll
|
|
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM,LLVM_SKIP
|
|
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fzero-call-used-regs=all-gpr -fclangir -emit-cir %s -o %t.cir
|
|
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR,CIR_ALLGPR
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fzero-call-used-regs=all-gpr -fclangir -emit-llvm %s -o %t.ll
|
|
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM,LLVM_ALLGPR
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fzero-call-used-regs=all-gpr -emit-llvm %s -o %t.ll
|
|
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM,LLVM_ALLGPR
|
|
|
|
extern "C" {
|
|
__attribute__((hot))
|
|
void normal(){}
|
|
// CIR: cir.func{{.*}}@normal()
|
|
// CIR_NONE-NOT: zero-call-used-regs
|
|
// CIR_SKIP-NOT: zero-call-used-regs
|
|
// CIR_ALLGPR-SAME: zero_call_used_regs = "all-gpr"
|
|
// LLVM: define{{.*}}@normal() #[[NORM_ATTR:.*]] {
|
|
|
|
__attribute__((cold))
|
|
__attribute__((zero_call_used_regs("skip")))
|
|
void skip() { }
|
|
// CIR: cir.func{{.*}}@skip()
|
|
// CIR-SAME: zero_call_used_regs = "skip"
|
|
// LLVM: define{{.*}}@skip() #[[SKIP_ATTR:.*]] {
|
|
|
|
__attribute__((zero_call_used_regs("all")))
|
|
void all() { }
|
|
// CIR: cir.func{{.*}}@all()
|
|
// CIR-SAME: zero_call_used_regs = "all"
|
|
// LLVM: define{{.*}}@all() #[[ALL_ATTR:.*]] {
|
|
|
|
__attribute__((zero_call_used_regs("used")))
|
|
void used() { }
|
|
// CIR: cir.func{{.*}}@used()
|
|
// CIR-SAME: zero_call_used_regs = "used"
|
|
// LLVM: define{{.*}}@used() #[[USED_ATTR:.*]] {
|
|
|
|
__attribute__((zero_call_used_regs("used-gpr-arg")))
|
|
void used_gpr_arg() { }
|
|
// CIR: cir.func{{.*}}@used_gpr_arg()
|
|
// CIR-SAME: zero_call_used_regs = "used-gpr-arg"
|
|
// LLVM: define{{.*}}@used_gpr_arg() #[[USED_GPR_ATTR:.*]] {
|
|
|
|
void caller() {
|
|
normal();
|
|
// CIR: cir.call{{.*}}@normal()
|
|
// CIR-NOT: zero-call-used-regs
|
|
// LLVM: call void{{.*}}@normal() #[[NORM_CALL_ATTR:.*]]
|
|
skip();
|
|
// CIR: cir.call{{.*}}@skip()
|
|
// CIR-SAME: zero_call_used_regs = "skip"
|
|
// LLVM: call void{{.*}}@skip() #[[SKIP_CALL_ATTR:.*]]
|
|
all();
|
|
// CIR: cir.call{{.*}}@all()
|
|
// CIR-SAME: zero_call_used_regs = "all"
|
|
// LLVM: call void{{.*}}@all() #[[ALL_CALL_ATTR:.*]]
|
|
used();
|
|
// CIR: cir.call{{.*}}@used()
|
|
// CIR-SAME: zero_call_used_regs = "used"
|
|
// LLVM: call void{{.*}}@used() #[[USED_CALL_ATTR:.*]]
|
|
used_gpr_arg();
|
|
// CIR: cir.call{{.*}}@used_gpr_arg()
|
|
// CIR-SAME: zero_call_used_regs = "used-gpr-arg"
|
|
// LLVM: call void{{.*}}@used_gpr_arg() #[[USED_GPR_CALL_ATTR:.*]]
|
|
}
|
|
}
|
|
|
|
// LLVM: attributes #[[NORM_ATTR]]
|
|
// LLVM_NONE-NOT: zero-call-used-regs
|
|
// LLVM_SKIP-NOT: zero-call-used-regs
|
|
// LLVM_ALLGPR-SAME: "zero-call-used-regs"="all-gpr"
|
|
// LLVM: attributes #[[SKIP_ATTR]]
|
|
// LLVM-SAME: "zero-call-used-regs"="skip"
|
|
// LLVM: attributes #[[ALL_ATTR]]
|
|
// LLVM-SAME: "zero-call-used-regs"="all"
|
|
// LLVM: attributes #[[USED_ATTR]]
|
|
// LLVM-SAME: "zero-call-used-regs"="used"
|
|
// LLVM: attributes #[[USED_GPR_ATTR]]
|
|
// LLVM-SAME: "zero-call-used-regs"="used-gpr-arg"
|
|
//
|
|
// LLVM: attributes #[[NORM_CALL_ATTR]]
|
|
// LLVM-NOT: zero-call-used-regs
|
|
// LLVM: attributes #[[SKIP_CALL_ATTR]]
|
|
// LLVM-SAME: "zero-call-used-regs"="skip"
|
|
// LLVM: attributes #[[ALL_CALL_ATTR]]
|
|
// LLVM-SAME: "zero-call-used-regs"="all"
|
|
// LLVM: attributes #[[USED_CALL_ATTR]]
|
|
// LLVM-SAME: "zero-call-used-regs"="used"
|
|
// LLVM: attributes #[[USED_GPR_CALL_ATTR]]
|
|
// LLVM-SAME: "zero-call-used-regs"="used-gpr-arg"
|