Files
TheRock/compiler/amd-llvm/llvm/test/tools/llvm-profgen/inline-pseudoprobe.test
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

69 lines
2.2 KiB
Plaintext

; RUN: llvm-profgen --format=text --ignore-stack-samples --perfscript=%S/Inputs/inline-cs-pseudoprobe.perfscript --binary=%S/Inputs/inline-cs-pseudoprobe.perfbin --output=%t --profile-summary-cold-count=0
; RUN: FileCheck %s --input-file %t
; RUN: llvm-profgen --format=text --ignore-stack-samples --perfscript=%S/Inputs/inline-cs-pseudoprobe.perfscript --binary=%S/Inputs/inline-cs-pseudoprobe.perfbin --output=%t1 --profile-summary-cold-count=0 --mark-all-context-preinlined
; RUN: FileCheck %s --input-file %t1 --check-prefix=CHECK-MARK-PREINLINED
; CHECK: main:88:0
; CHECK-NEXT: 1: 0
; CHECK-NEXT: 2: foo:88
; CHECK-NEXT: 1: 0
; CHECK-NEXT: 2: 15
; CHECK-NEXT: 3: 15
; CHECK-NEXT: 4: 14
; CHECK-NEXT: 5: 1
; CHECK-NEXT: 6: 15
; CHECK-NEXT: 7: 0
; CHECK-NEXT: 9: 0
; CHECK-NEXT: 8: bar:28
; CHECK-NEXT: 1: 14
; CHECK-NEXT: 4: 14
; CHECK-NEXT: !CFGChecksum: 72617220756
; CHECK-NEXT: !CFGChecksum: 563088904013236
; CHECK-NEXT: !CFGChecksum: 281479271677951
; CHECK-MARK-PREINLINED: main:88:0
; CHECK-MARK-PREINLINED-NEXT: 1: 0
; CHECK-MARK-PREINLINED-NEXT: 2: foo:88
; CHECK-MARK-PREINLINED-NEXT: 1: 0
; CHECK-MARK-PREINLINED-NEXT: 2: 15
; CHECK-MARK-PREINLINED-NEXT: 3: 15
; CHECK-MARK-PREINLINED-NEXT: 4: 14
; CHECK-MARK-PREINLINED-NEXT: 5: 1
; CHECK-MARK-PREINLINED-NEXT: 6: 15
; CHECK-MARK-PREINLINED-NEXT: 7: 0
; CHECK-MARK-PREINLINED-NEXT: 9: 0
; CHECK-MARK-PREINLINED-NEXT: 8: bar:28
; CHECK-MARK-PREINLINED-NEXT: 1: 14
; CHECK-MARK-PREINLINED-NEXT: 4: 14
; CHECK-MARK-PREINLINED-NEXT: !CFGChecksum: 72617220756
; CHECK-MARK-PREINLINED-NEXT: !Attributes: 2
; CHECK-MARK-PREINLINED-NEXT: !CFGChecksum: 563088904013236
; CHECK-MARK-PREINLINED-NEXT: !Attributes: 2
; CHECK-MARK-PREINLINED-NEXT: !CFGChecksum: 281479271677951
; CHECK-MARK-PREINLINED-NEXT: !Attributes: 2
; clang -O3 -fuse-ld=lld -fpseudo-probe-for-profiling
; -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Xclang -mdisable-tail-calls
; -g test.c -o a.out
#include <stdio.h>
int bar(int x, int y) {
if (x % 3) {
return x - y;
}
return x + y;
}
void foo() {
int s, i = 0;
while (i++ < 4000 * 4000)
if (i % 91) s = bar(i, s); else s += 30;
printf("sum is %d\n", s);
}
int main() {
foo();
return 0;
}