Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/LoopUnroll/branch-weights-freq/peel-last-iteration.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

66 lines
2.4 KiB
LLVM

; Disable this test in profcheck because the first run would cause profcheck to fail.
; REQUIRES: !profcheck
; RUN: opt -p "print<block-freq>,loop-unroll,print<block-freq>" -scev-cheap-expansion-budget=3 -S %s -profcheck-disable-metadata-fixes 2>&1 | FileCheck %s --check-prefixes=COMMON,BAD
; RUN: opt -p "print<block-freq>,loop-unroll,print<block-freq>" -scev-cheap-expansion-budget=3 -S %s 2>&1 | FileCheck %s --check-prefixes=COMMON,GOOD
define i32 @test_expansion_cost_2(i32 %start, i32 %end) !prof !0 {
entry:
%sub = add i32 %end, -1
br label %loop.header
loop.header:
%iv = phi i32 [ %start, %entry ], [ %iv.next, %loop.latch ]
%c = icmp eq i32 %iv, %sub
br i1 %c, label %then, label %loop.latch, !prof !1
then:
br label %loop.latch
loop.latch:
%iv.next = add nsw i32 %iv, 1
%ec = icmp eq i32 %iv.next, %end
br i1 %ec, label %exit, label %loop.header, !prof !2
exit:
ret i32 0
}
!0 = !{!"function_entry_count", i32 10}
!1 = !{!"branch_weights", i32 2, i32 3}
!2 = !{!"branch_weights", i32 1, i32 50}
; COMMON: block-frequency-info: test_expansion_cost_2
; COMMON-NEXT: entry: float = 1.0
; COMMON-NEXT: loop.header: float = 51.0
; COMMON-NEXT: then: float = 20.4
; COMMON-NEXT: loop.latch: float = 51.0
; COMMON-NEXT: exit: float = 1.0
; COMMON: block-frequency-info: test_expansion_cost_2
; GOOD-NEXT: entry: float = 1.0
; GOOD-NEXT: entry.split: float = 0.98039
; GOOD-NEXT: loop.header: float = 50.0
; GOOD-NEXT: then: float = 20.0
; GOOD-NEXT: loop.latch: float = 50.0
; GOOD-NEXT: exit.peel.begin.loopexit: float = 0.98039
; GOOD-NEXT: exit.peel.begin: float = 1.0
; GOOD-NEXT: loop.header.peel: float = 1.0
; GOOD-NEXT: then.peel: float = 0.4
; GOOD-NEXT: loop.latch.peel: float = 1.0
; GOOD-NEXT: exit.peel.next: float = 1.0
; GOOD-NEXT: loop.header.peel.next: float = 1.0
; GOOD-NEXT: exit: float = 1.0
; BAD-NEXT: entry: float = 1.0
; BAD-NEXT: entry.split: float = 0.625
; BAD-NEXT: loop.header: float = 31.875
; BAD-NEXT: then: float = 12.75
; BAD-NEXT: loop.latch: float = 31.875
; BAD-NEXT: exit.peel.begin.loopexit: float = 0.625
; BAD-NEXT: exit.peel.begin: float = 1.0
; BAD-NEXT: loop.header.peel: float = 1.0
; BAD-NEXT: then.peel: float = 0.4
; BAD-NEXT: loop.latch.peel: float = 1.0
; BAD-NEXT: exit.peel.next: float = 1.0
; BAD-NEXT: loop.header.peel.next: float = 1.0
; BAD-NEXT: exit: float = 1.0