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
73 lines
3.1 KiB
LLVM
73 lines
3.1 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals --version 2
|
|
; Test that hoisting conditional branches copies the debug and profiling info
|
|
; metadata from the branch being hoisted.
|
|
; RUN: opt -S -passes=licm -licm-control-flow-hoisting=1 %s -o - | FileCheck %s
|
|
|
|
define void @triangle_phi(i32 %x, ptr %p) {
|
|
; CHECK-LABEL: define void @triangle_phi
|
|
; CHECK-SAME: (i32 [[X:%.*]], ptr [[P:%.*]]) {
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i32 [[X]], 0
|
|
; CHECK-NEXT: br i1 [[CMP1]], label [[IF_LICM:%.*]], label [[THEN_LICM:%.*]], !prof [[PROF2:![0-9]+]]
|
|
; CHECK: if.licm:
|
|
; CHECK-NEXT: [[ADD:%.*]] = add i32 [[X]], 1
|
|
; CHECK-NEXT: br label [[THEN_LICM]]
|
|
; CHECK: then.licm:
|
|
; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ [[ADD]], [[IF_LICM]] ], [ [[X]], [[ENTRY:%.*]] ]
|
|
; CHECK-NEXT: store i32 [[PHI]], ptr [[P]], align 4
|
|
; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i32 [[PHI]], 0
|
|
; CHECK-NEXT: br label [[LOOP:%.*]]
|
|
; CHECK: loop:
|
|
; CHECK-NEXT: br i1 [[CMP1]], label [[IF:%.*]], label [[THEN:%.*]], !dbg [[DBG3:![0-9]+]], !prof [[PROF2]]
|
|
; CHECK: if:
|
|
; CHECK-NEXT: br label [[THEN]]
|
|
; CHECK: then:
|
|
; CHECK-NEXT: br i1 [[CMP2]], label [[LOOP]], label [[END:%.*]], !dbg [[DBG7:![0-9]+]], !prof [[PROF8:![0-9]+]]
|
|
; CHECK: end:
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
entry:
|
|
br label %loop, !dbg !5
|
|
loop:
|
|
%cmp1 = icmp sgt i32 %x, 0
|
|
br i1 %cmp1, label %if, label %then, !dbg !6, !prof !8
|
|
if:
|
|
%add = add i32 %x, 1
|
|
br label %then
|
|
|
|
then:
|
|
%phi = phi i32 [ %add, %if ], [ %x, %loop ]
|
|
store i32 %phi, ptr %p
|
|
%cmp2 = icmp ne i32 %phi, 0
|
|
br i1 %cmp2, label %loop, label %end, !dbg !7, !prof !9
|
|
|
|
end:
|
|
ret void
|
|
}
|
|
|
|
!llvm.module.flags = !{!2, !3}
|
|
|
|
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1)
|
|
!1 = !DIFile(filename: "t", directory: "/")
|
|
!2 = !{i32 7, !"Dwarf Version", i32 5}
|
|
!3 = !{i32 2, !"Debug Info Version", i32 3}
|
|
!4 = distinct !DISubprogram(name: "triangle_phi", linkageName: "triangle_phi", scope: !1, file: !1, line: 1, unit: !0, type: !10)
|
|
!5 = !DILocation(line: 1, column: 22, scope: !4)
|
|
!6 = !DILocation(line: 2, column: 22, scope: !4)
|
|
!7 = !DILocation(line: 3, column: 22, scope: !4)
|
|
!8 = !{!"branch_weights", i32 5, i32 7}
|
|
!9 = !{!"branch_weights", i32 13, i32 11}
|
|
;.
|
|
; CHECK: [[META0:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 5}
|
|
; CHECK: [[META1:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
|
|
; CHECK: [[PROF2]] = !{!"branch_weights", i32 5, i32 7}
|
|
; CHECK: [[DBG3]] = !DILocation(line: 2, column: 22, scope: [[META4:![0-9]+]])
|
|
; CHECK: [[META4]] = distinct !DISubprogram(name: "triangle_phi", linkageName: "triangle_phi", scope: [[META5:![0-9]+]], file: [[META5]], line: 1, type: [[TYPE:![0-9]+]], spFlags: DISPFlagDefinition, unit: [[META6:![0-9]+]])
|
|
; CHECK: [[META5]] = !DIFile(filename: "{{.*}}t", directory: {{.*}})
|
|
; CHECK: [[META6]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: [[META5]], isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug)
|
|
; CHECK: [[DBG7]] = !DILocation(line: 3, column: 22, scope: [[META4]])
|
|
; CHECK: [[PROF8]] = !{!"branch_weights", i32 13, i32 11}
|
|
;.
|
|
!10 = !DISubroutineType(types: !11)
|
|
!11 = !{null}
|