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
57 lines
1.9 KiB
LLVM
57 lines
1.9 KiB
LLVM
; Note: Make sure that instrumention intrinsic is after entry alloca.
|
|
; RUN: opt < %s -passes=pgo-instr-gen -S | FileCheck %s
|
|
; RUN: opt < %s -passes=pgo-instr-gen,instrprof -sampled-instrumentation -S | FileCheck %s --check-prefixes=SAMPLE
|
|
|
|
%struct.A = type { i32, [0 x i32] }
|
|
%struct.B = type { i32, [0 x double] }
|
|
|
|
; CHECK-LABEL: @foo()
|
|
; CHECK-NEXT: %1 = alloca %struct.A
|
|
; CHECK-NEXT: %2 = alloca %struct.B
|
|
; CHECK-NEXT: call void @llvm.instrprof.increment(ptr @__profn_foo
|
|
|
|
; SAMPLE: @foo()
|
|
; SAMPLE-NEXT: %1 = alloca %struct.A
|
|
; SAMPLE-NEXT: %2 = alloca %struct.B
|
|
; SAMPLE-NEXT: %[[v:[0-9]+]] = load i16, ptr @__llvm_profile_sampling
|
|
; SAMPLE-NEXT: {{.*}} = icmp ule i16 %[[v]], 199
|
|
|
|
define dso_local double @foo() {
|
|
%1 = alloca %struct.A, align 4
|
|
%2 = alloca %struct.B, align 8
|
|
call void @llvm.lifetime.start.p0(ptr nonnull %1)
|
|
call void @llvm.lifetime.start.p0(ptr nonnull %2)
|
|
call void @bar(ptr noundef nonnull %1, ptr noundef nonnull %2)
|
|
%3 = load i32, ptr %1, align 4
|
|
%4 = icmp sgt i32 %3, 0
|
|
br i1 %4, label %5, label %21
|
|
|
|
5:
|
|
%6 = getelementptr inbounds i8, ptr %1, i64 4
|
|
%7 = getelementptr inbounds i8, ptr %2, i64 8
|
|
%8 = zext nneg i32 %3 to i64
|
|
br label %9
|
|
|
|
9:
|
|
%10 = phi i64 [ 0, %5 ], [ %19, %9 ]
|
|
%11 = phi double [ 0.000000e+00, %5 ], [ %18, %9 ]
|
|
%12 = getelementptr inbounds [0 x i32], ptr %6, i64 0, i64 %10
|
|
%13 = load i32, ptr %12, align 4
|
|
%14 = sitofp i32 %13 to double
|
|
%15 = getelementptr inbounds [0 x double], ptr %7, i64 0, i64 %10
|
|
%16 = load double, ptr %15, align 8
|
|
%17 = fadd double %16, %14
|
|
%18 = fadd double %11, %17
|
|
%19 = add nuw nsw i64 %10, 1
|
|
%20 = icmp eq i64 %19, %8
|
|
br i1 %20, label %21, label %9
|
|
|
|
21:
|
|
%22 = phi double [ 0.000000e+00, %0 ], [ %18, %9 ]
|
|
call void @llvm.lifetime.end.p0(ptr nonnull %2)
|
|
call void @llvm.lifetime.end.p0(ptr nonnull %1)
|
|
ret double %22
|
|
}
|
|
|
|
declare void @bar(ptr noundef, ptr noundef)
|