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
58 lines
2.3 KiB
LLVM
58 lines
2.3 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals --include-generated-funcs
|
|
; RUN: opt -S -passes=lower-ifunc < %s | FileCheck %s
|
|
|
|
define ptr @resolver() {
|
|
ret ptr inttoptr (i64 333 to ptr)
|
|
}
|
|
|
|
@resolver_alias = alias ptr (), ptr @resolver
|
|
@ifunc_alias = alias ptr (), ptr @resolver_alias
|
|
|
|
@ifunc0_kept = ifunc float (i64), ptr @resolver_alias
|
|
@ifunc1_removed = ifunc float (i64), ptr @resolver_alias
|
|
|
|
@ifunc_def = ifunc float (i64), ptr @resolver
|
|
@alias_of_ifunc = alias float (i64), ptr @ifunc_def
|
|
|
|
define float @call_ifunc_aliasee(i64 %arg) {
|
|
%call = call float @ifunc1_removed(i64 %arg)
|
|
ret float %call
|
|
}
|
|
|
|
define float @call_alias_of_ifunc(i64 %arg) {
|
|
%call = call float @alias_of_ifunc(i64 %arg)
|
|
ret float %call
|
|
}
|
|
;.
|
|
; CHECK: @[[GLOB0:[0-9]+]] = internal global [3 x ptr] poison, align 8
|
|
; CHECK: @[[LLVM_GLOBAL_CTORS:[a-zA-Z0-9_$"\\.-]+]] = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 10, ptr @[[GLOB1:[0-9]+]], ptr null }]
|
|
; CHECK: @[[RESOLVER_ALIAS:[a-zA-Z0-9_$"\\.-]+]] = alias ptr (), ptr @resolver
|
|
; CHECK: @[[IFUNC_ALIAS:[a-zA-Z0-9_$"\\.-]+]] = alias ptr (), ptr @resolver_alias
|
|
; CHECK: @[[ALIAS_OF_IFUNC:[a-zA-Z0-9_$"\\.-]+]] = alias float (i64), ptr @ifunc_def
|
|
; CHECK: @[[IFUNC_DEF:[a-zA-Z0-9_$"\\.-]+]] = ifunc float (i64), ptr @resolver
|
|
;.
|
|
; CHECK-LABEL: define {{[^@]+}}@resolver(
|
|
; CHECK-NEXT: ret ptr inttoptr (i64 333 to ptr)
|
|
;
|
|
;
|
|
; CHECK-LABEL: define {{[^@]+}}@call_ifunc_aliasee(
|
|
; CHECK-NEXT: [[TMP1:%.*]] = load ptr, ptr getelementptr inbounds ([3 x ptr], ptr @[[GLOB0]], i32 0, i32 1), align 8
|
|
; CHECK-NEXT: [[CALL:%.*]] = call float [[TMP1]](i64 [[ARG:%.*]])
|
|
; CHECK-NEXT: ret float [[CALL]]
|
|
;
|
|
;
|
|
; CHECK-LABEL: define {{[^@]+}}@call_alias_of_ifunc(
|
|
; CHECK-NEXT: [[CALL:%.*]] = call float @alias_of_ifunc(i64 [[ARG:%.*]])
|
|
; CHECK-NEXT: ret float [[CALL]]
|
|
;
|
|
;
|
|
; CHECK-LABEL: define {{[^@]+}}@1(
|
|
; CHECK-NEXT: [[TMP1:%.*]] = call ptr @resolver()
|
|
; CHECK-NEXT: store ptr [[TMP1]], ptr @[[GLOB0]], align 8
|
|
; CHECK-NEXT: [[TMP2:%.*]] = call ptr @resolver()
|
|
; CHECK-NEXT: store ptr [[TMP2]], ptr getelementptr inbounds ([3 x ptr], ptr @[[GLOB0]], i32 0, i32 1), align 8
|
|
; CHECK-NEXT: [[TMP3:%.*]] = call ptr @resolver()
|
|
; CHECK-NEXT: store ptr [[TMP3]], ptr getelementptr inbounds ([3 x ptr], ptr @[[GLOB0]], i32 0, i32 2), align 8
|
|
; CHECK-NEXT: ret void
|
|
;
|