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
78 lines
2.5 KiB
LLVM
78 lines
2.5 KiB
LLVM
; Test misexpect doesn't issue diagnostics when a branch is marked unpredictable
|
|
|
|
; RUN: llvm-profdata merge %S/Inputs/misexpect-branch-correct.proftext -o %t.profdata
|
|
|
|
; RUN: opt < %s -passes="function(lower-expect),pgo-instr-use" -pgo-test-profile-file=%t.profdata -pgo-warn-misexpect -pass-remarks=misexpect -S 2>&1 | FileCheck %s
|
|
|
|
; CHECK-NOT: warning: {{.*}}
|
|
; CHECK-NOT: remark: {{.*}}
|
|
|
|
; ModuleID = 'misexpect-branch-unpredictable.c'
|
|
source_filename = "clang/test/Profile/misexpect-branch-unpredictable.c"
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
@inner_loop = constant i32 100, align 4
|
|
@outer_loop = constant i32 2000, align 4
|
|
|
|
; Function Attrs: nounwind
|
|
define i32 @bar() {
|
|
entry:
|
|
%rando = alloca i32, align 4
|
|
%x = alloca i32, align 4
|
|
call void @llvm.lifetime.start.p0(ptr %rando)
|
|
%call = call i32 (...) @buzz()
|
|
store i32 %call, ptr %rando, align 4, !tbaa !2
|
|
call void @llvm.lifetime.start.p0(ptr %x)
|
|
store i32 0, ptr %x, align 4, !tbaa !2
|
|
%0 = load i32, ptr %rando, align 4, !tbaa !2
|
|
%rem = srem i32 %0, 200000
|
|
%cmp = icmp eq i32 %rem, 0
|
|
%lnot = xor i1 %cmp, true
|
|
%lnot1 = xor i1 %lnot, true
|
|
%lnot.ext = zext i1 %lnot1 to i32
|
|
%conv = sext i32 %lnot.ext to i64
|
|
%tobool = icmp ne i64 %conv, 0
|
|
br i1 %tobool, label %if.then, label %if.else, !unpredictable !6
|
|
|
|
if.then: ; preds = %entry
|
|
%1 = load i32, ptr %rando, align 4, !tbaa !2
|
|
%call2 = call i32 @baz(i32 %1)
|
|
store i32 %call2, ptr %x, align 4, !tbaa !2
|
|
br label %if.end
|
|
|
|
if.else: ; preds = %entry
|
|
%call3 = call i32 @foo(i32 50)
|
|
store i32 %call3, ptr %x, align 4, !tbaa !2
|
|
br label %if.end
|
|
|
|
if.end: ; preds = %if.else, %if.then
|
|
%2 = load i32, ptr %x, align 4, !tbaa !2
|
|
call void @llvm.lifetime.end.p0(ptr %x)
|
|
call void @llvm.lifetime.end.p0(ptr %rando)
|
|
ret i32 %2
|
|
}
|
|
|
|
; Function Attrs: argmemonly nounwind willreturn
|
|
declare void @llvm.lifetime.start.p0(ptr nocapture)
|
|
|
|
declare i32 @buzz(...)
|
|
|
|
declare i32 @baz(i32)
|
|
|
|
declare i32 @foo(i32)
|
|
|
|
; Function Attrs: argmemonly nounwind willreturn
|
|
declare void @llvm.lifetime.end.p0(ptr nocapture)
|
|
|
|
!llvm.module.flags = !{!0}
|
|
!llvm.ident = !{!1}
|
|
|
|
!0 = !{i32 1, !"wchar_size", i32 4}
|
|
!1 = !{!"Fuchsia clang version 10.0.0 (153b453014c94291c8c6cf6320b2f46df40f26f3) (based on LLVM 10.0.0svn)"}
|
|
!2 = !{!3, !3, i64 0}
|
|
!3 = !{!"int", !4, i64 0}
|
|
!4 = !{!"omnipotent char", !5, i64 0}
|
|
!5 = !{!"Simple C/C++ TBAA"}
|
|
!6 = !{}
|