Files
TheRock/compiler/amd-llvm/clang/test/Profile/branch-logical-mixed.cpp
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

67 lines
2.4 KiB
C++

// Test to ensure instrumentation of logical operator RHS True/False counters
// are being instrumented for branch coverage
// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -main-file-name branch-logical-mixed.cpp %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck -allow-deprecated-dag-overlap %s
// CHECK: @[[FUNC:__profc__Z4funcv]] = {{.*}} global [61 x i64] zeroinitializer
// CHECK-LABEL: @_Z4funcv()
bool func() {
bool bt0 = true;
bool bt1 = true;
bool bt2 = true;
bool bt3 = true;
bool bt4 = true;
bool bt5 = true;
bool bf0 = false;
bool bf1 = false;
bool bf2 = false;
bool bf3 = false;
bool bf4 = false;
bool bf5 = false;
bool a = bt0 &&
bf0 && // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 10
bt1 && // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 8
bf1 && // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 6
bt2 && // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 4
bf2; // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 2
bool b = bt0 ||
bf0 || // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 20
bt1 || // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 18
bf1 || // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 16
bt2 || // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 14
bf2; // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 12
bool c = (bt0 &&
bf0) || // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 27
(bt1 &&
bf1) || // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 29
(bt2 &&
bf2) || // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 31
(bt3 &&
bf3) || // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 33
(bt4 &&
bf4) || // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 35
(bf5 &&
bf5); // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 37
bool d = (bt0 ||
bf0) && // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 44
(bt1 ||
bf1) && // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 46
(bt2 ||
bf2) && // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 48
(bt3 ||
bf3) && // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 50
(bt4 ||
bf4) && // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 52
(bt5 ||
bf5); // CHECK: store {{.*}} @[[FUNC]], i32 0, i32 54
return a && b && c && d;
}