Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/X86/branch-hint.ll
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

75 lines
2.1 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc < %s -mtriple=x86_64 -mattr=+branch-hint -enable-branch-hint | FileCheck %s
; RUN: llc < %s -mtriple=x86_64 -mattr=+branch-hint -enable-branch-hint -branch-hint-probability-threshold=50 | FileCheck %s
; RUN: llc < %s -mtriple=x86_64 -mattr=+branch-hint -enable-branch-hint -branch-hint-probability-threshold=60 -tail-dup-placement=false | FileCheck --check-prefix=TH60 %s
; Design: Add DS segment override prefix for condition branch who has high
; probability to take (which is greater than the probability threshold of
; enabling branch hint).
define void @p51(i32 %x, ptr %p) {
; CHECK-LABEL: p51:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: testl %edi, %edi
; CHECK-NEXT: ds
; CHECK-NEXT: je .LBB0_2
; CHECK-NEXT: # %bb.1: # %if.then
; CHECK-NEXT: movl %edi, (%rsi)
; CHECK-NEXT: .LBB0_2: # %if.end
; CHECK-NEXT: retq
;
; TH60-LABEL: p51:
; TH60: # %bb.0: # %entry
; TH60-NEXT: testl %edi, %edi
; TH60-NEXT: je .LBB0_2
; TH60-NEXT: # %bb.1: # %if.then
; TH60-NEXT: movl %edi, (%rsi)
; TH60-NEXT: .LBB0_2: # %if.end
; TH60-NEXT: retq
entry:
%tobool.not = icmp eq i32 %x, 0
br i1 %tobool.not, label %if.end, label %if.then, !prof !0
if.then:
store i32 %x, ptr %p, align 4
br label %if.end
if.end:
ret void
}
define void @p61(i32 %x, ptr %p) {
; CHECK-LABEL: p61:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: testl %edi, %edi
; CHECK-NEXT: jne .LBB1_1
; CHECK-NEXT: # %bb.2: # %if.end
; CHECK-NEXT: retq
; CHECK-NEXT: .LBB1_1: # %if.then
; CHECK-NEXT: movl %edi, (%rsi)
; CHECK-NEXT: retq
;
; TH60-LABEL: p61:
; TH60: # %bb.0: # %entry
; TH60-NEXT: testl %edi, %edi
; TH60-NEXT: ds
; TH60-NEXT: je .LBB1_2
; TH60-NEXT: # %bb.1: # %if.then
; TH60-NEXT: movl %edi, (%rsi)
; TH60-NEXT: .LBB1_2: # %if.end
; TH60-NEXT: retq
entry:
%tobool.not = icmp eq i32 %x, 0
br i1 %tobool.not, label %if.end, label %if.then, !prof !1
if.then:
store i32 %x, ptr %p, align 4
br label %if.end
if.end:
ret void
}
!0 = !{!"branch_weights", i32 51, i32 49}
!1 = !{!"branch_weights", i32 61, i32 39}