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
80 lines
2.1 KiB
C++
80 lines
2.1 KiB
C++
// RUN: %clang_cc1 -Oz -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s -check-prefix=Oz
|
|
// RUN: %clang_cc1 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s -check-prefix=OTHER
|
|
// RUN: %clang_cc1 -O1 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s -check-prefix=OTHER
|
|
// RUN: %clang_cc1 -O2 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s -check-prefix=OTHER
|
|
// RUN: %clang_cc1 -O3 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s -check-prefix=OTHER
|
|
// RUN: %clang_cc1 -Os -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s -check-prefix=OTHER
|
|
// Check that we set the minsize attribute on each function
|
|
// when Oz optimization level is set.
|
|
|
|
__attribute__((minsize))
|
|
int test1() {
|
|
return 42;
|
|
// Oz: @{{.*}}test1{{.*}}[[MINSIZE:#[0-9]+]]
|
|
// OTHER: @{{.*}}test1{{.*}}[[MS:#[0-9]+]]
|
|
}
|
|
|
|
int test2() {
|
|
return 42;
|
|
// Oz: @{{.*}}test2{{.*}}[[MINSIZE]]
|
|
// Oz: ret
|
|
// OTHER: @{{.*}}test2
|
|
// OTHER-NOT: [[MS]]
|
|
// OTHER: ret
|
|
}
|
|
|
|
int test3() {
|
|
return 42;
|
|
// Oz: @{{.*}}test3{{.*}}[[MINSIZE]]
|
|
// Oz: ret
|
|
// OTHER: @{{.*}}test3
|
|
// OTHER-NOT: [[MS]]
|
|
// OTHER: ret
|
|
}
|
|
|
|
// Check that the minsize attribute is well propagated through
|
|
// template instantiation
|
|
|
|
template<typename T>
|
|
__attribute__((minsize))
|
|
void test4(T arg) {
|
|
return;
|
|
}
|
|
|
|
template
|
|
void test4<int>(int arg);
|
|
// Oz: define{{.*}}void @{{.*}}test4
|
|
// Oz: [[MINSIZE]]
|
|
// OTHER: define{{.*}}void @{{.*}}test4
|
|
// OTHER: [[MS]]
|
|
|
|
template
|
|
void test4<float>(float arg);
|
|
// Oz: define{{.*}}void @{{.*}}test4
|
|
// Oz: [[MINSIZE]]
|
|
// OTHER: define{{.*}}void @{{.*}}test4
|
|
// OTHER: [[MS]]
|
|
|
|
template<typename T>
|
|
void test5(T arg) {
|
|
return;
|
|
}
|
|
|
|
template
|
|
void test5<int>(int arg);
|
|
// Oz: define{{.*}}void @{{.*}}test5
|
|
// Oz: [[MINSIZE]]
|
|
// OTHER: define{{.*}}void @{{.*}}test5
|
|
// OTHER-NOT: define{{.*}}void @{{.*}}test5{{.*}}[[MS]]
|
|
|
|
template
|
|
void test5<float>(float arg);
|
|
// Oz: define{{.*}}void @{{.*}}test5
|
|
// Oz: [[MINSIZE]]
|
|
// OTHER: define{{.*}}void @{{.*}}test5
|
|
// OTHER-NOT: define{{.*}}void @{{.*}}test5{{.*}}[[MS]]
|
|
|
|
// Oz: attributes [[MINSIZE]] = { minsize{{.*}} }
|
|
|
|
// OTHER: attributes [[MS]] = { minsize{{.*}} }
|