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
107 lines
3.7 KiB
C++
107 lines
3.7 KiB
C++
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals all --include-generated-funcs --global-value-regex ".*" --version 5
|
|
// RUN: %clang_cc1 -triple aarch64-linux-gnu -emit-llvm %s -o - | FileCheck %s
|
|
|
|
namespace Name {
|
|
int __attribute((target_version("default"))) foo() { return 0; }
|
|
}
|
|
|
|
namespace Name {
|
|
int __attribute((target_version("sve"))) foo() { return 1; }
|
|
}
|
|
|
|
int bar() { return Name::foo(); }
|
|
|
|
namespace OtherName {
|
|
int __attribute((target_version("sve"))) foo() { return 2; }
|
|
}
|
|
|
|
int baz() { return OtherName::foo(); }
|
|
|
|
namespace Foo {
|
|
int bar();
|
|
__attribute((target_version("default"))) int bar() { return 0; }
|
|
__attribute((target_version("mops"))) int bar() { return 1; }
|
|
}
|
|
|
|
//.
|
|
// CHECK: @__aarch64_cpu_features = external dso_local global { i64 }
|
|
// CHECK: @_ZN4Name3fooEv = weak_odr ifunc i32 (), ptr @_ZN4Name3fooEv.resolver
|
|
// CHECK: @_ZN3Foo3barEv = weak_odr ifunc i32 (), ptr @_ZN3Foo3barEv.resolver
|
|
//.
|
|
// CHECK-LABEL: define dso_local noundef i32 @_ZN4Name3fooEv.default(
|
|
// CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: ret i32 0
|
|
//
|
|
//
|
|
// CHECK-LABEL: define dso_local noundef i32 @_ZN4Name3fooEv._Msve(
|
|
// CHECK-SAME: ) #[[ATTR1:[0-9]+]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: ret i32 1
|
|
//
|
|
//
|
|
// CHECK-LABEL: define dso_local noundef i32 @_Z3barv(
|
|
// CHECK-SAME: ) #[[ATTR2:[0-9]+]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[CALL:%.*]] = call noundef i32 @_ZN4Name3fooEv()
|
|
// CHECK-NEXT: ret i32 [[CALL]]
|
|
//
|
|
//
|
|
// CHECK-LABEL: define dso_local noundef i32 @_ZN9OtherName3fooEv._Msve(
|
|
// CHECK-SAME: ) #[[ATTR1]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: ret i32 2
|
|
//
|
|
//
|
|
// CHECK-LABEL: define dso_local noundef i32 @_Z3bazv(
|
|
// CHECK-SAME: ) #[[ATTR2]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[CALL:%.*]] = call noundef i32 @_ZN9OtherName3fooEv()
|
|
// CHECK-NEXT: ret i32 [[CALL]]
|
|
//
|
|
//
|
|
// CHECK-LABEL: define dso_local noundef i32 @_ZN3Foo3barEv.default(
|
|
// CHECK-SAME: ) #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: ret i32 0
|
|
//
|
|
//
|
|
// CHECK-LABEL: define dso_local noundef i32 @_ZN3Foo3barEv._Mmops(
|
|
// CHECK-SAME: ) #[[ATTR4:[0-9]+]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: ret i32 1
|
|
//
|
|
//
|
|
// CHECK-LABEL: define weak_odr ptr @_ZN4Name3fooEv.resolver(
|
|
// CHECK-SAME: ) #[[ATTR5:[0-9]+]] comdat {
|
|
// CHECK-NEXT: [[RESOLVER_ENTRY:.*:]]
|
|
// CHECK-NEXT: call void @__init_cpu_features_resolver()
|
|
// CHECK-NEXT: [[TMP0:%.*]] = load i64, ptr @__aarch64_cpu_features, align 8
|
|
// CHECK-NEXT: [[TMP1:%.*]] = and i64 [[TMP0]], 1073807616
|
|
// CHECK-NEXT: [[TMP2:%.*]] = icmp eq i64 [[TMP1]], 1073807616
|
|
// CHECK-NEXT: [[TMP3:%.*]] = and i1 true, [[TMP2]]
|
|
// CHECK-NEXT: br i1 [[TMP3]], label %[[RESOLVER_RETURN:.*]], label %[[RESOLVER_ELSE:.*]]
|
|
// CHECK: [[RESOLVER_RETURN]]:
|
|
// CHECK-NEXT: ret ptr @_ZN4Name3fooEv._Msve
|
|
// CHECK: [[RESOLVER_ELSE]]:
|
|
// CHECK-NEXT: ret ptr @_ZN4Name3fooEv.default
|
|
//
|
|
//
|
|
// CHECK-LABEL: define weak_odr ptr @_ZN3Foo3barEv.resolver(
|
|
// CHECK-SAME: ) #[[ATTR5]] comdat {
|
|
// CHECK-NEXT: [[RESOLVER_ENTRY:.*:]]
|
|
// CHECK-NEXT: call void @__init_cpu_features_resolver()
|
|
// CHECK-NEXT: [[TMP0:%.*]] = load i64, ptr @__aarch64_cpu_features, align 8
|
|
// CHECK-NEXT: [[TMP1:%.*]] = and i64 [[TMP0]], 576460752303423488
|
|
// CHECK-NEXT: [[TMP2:%.*]] = icmp eq i64 [[TMP1]], 576460752303423488
|
|
// CHECK-NEXT: [[TMP3:%.*]] = and i1 true, [[TMP2]]
|
|
// CHECK-NEXT: br i1 [[TMP3]], label %[[RESOLVER_RETURN:.*]], label %[[RESOLVER_ELSE:.*]]
|
|
// CHECK: [[RESOLVER_RETURN]]:
|
|
// CHECK-NEXT: ret ptr @_ZN3Foo3barEv._Mmops
|
|
// CHECK: [[RESOLVER_ELSE]]:
|
|
// CHECK-NEXT: ret ptr @_ZN3Foo3barEv.default
|
|
//
|
|
//.
|
|
// CHECK: [[META0:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"}
|
|
//.
|