Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/GVN/pre-invalid-prof-metadata.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

61 lines
2.5 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
; RUN: opt -passes=gvn -S < %s | FileCheck %s
; Make sure that performing PRE does not add prof metadata onto newly created
; phi nodes.
define fastcc ptr @foo(i8 %__pred.1.val) {
; CHECK-LABEL: define fastcc ptr @foo(
; CHECK-SAME: i8 [[__PRED_1_VAL:%.*]]) {
; CHECK-NEXT: [[ENTRY:.*:]]
; CHECK-NEXT: switch i64 0, label %[[SW_BB:.*]] [
; CHECK-NEXT: i64 1, label %[[ENTRY_SW_BB26_CRIT_EDGE:.*]]
; CHECK-NEXT: i64 0, label %[[ENTRY_SW_BB21_CRIT_EDGE:.*]]
; CHECK-NEXT: ]
; CHECK: [[ENTRY_SW_BB21_CRIT_EDGE]]:
; CHECK-NEXT: [[DOTPRE:%.*]] = trunc i8 [[__PRED_1_VAL]] to i1
; CHECK-NEXT: [[DOTPRE1:%.*]] = select i1 [[DOTPRE]], i64 0, i64 4
; CHECK-NEXT: br label %[[SW_BB21:.*]]
; CHECK: [[ENTRY_SW_BB26_CRIT_EDGE]]:
; CHECK-NEXT: [[DOTPRE2:%.*]] = trunc i8 [[__PRED_1_VAL]] to i1
; CHECK-NEXT: [[DOTPRE3:%.*]] = select i1 [[DOTPRE2]], i64 0, i64 4, !prof [[PROF0:![0-9]+]]
; CHECK-NEXT: br label %[[SW_BB26:.*]]
; CHECK: [[SW_BB]]:
; CHECK-NEXT: [[L78:%.*]] = trunc i8 [[__PRED_1_VAL]] to i1
; CHECK-NEXT: [[C79:%.*]] = select i1 [[L78]], i64 0, i64 4
; CHECK-NEXT: br label %[[SW_BB21]]
; CHECK: [[SW_BB21]]:
; CHECK-NEXT: [[C84_PRE_PHI:%.*]] = phi i64 [ [[DOTPRE1]], %[[ENTRY_SW_BB21_CRIT_EDGE]] ], [ [[C79]], %[[SW_BB]] ]
; CHECK-NEXT: [[L83_PRE_PHI:%.*]] = phi i1 [ [[DOTPRE]], %[[ENTRY_SW_BB21_CRIT_EDGE]] ], [ [[L78]], %[[SW_BB]] ]
; CHECK-NEXT: br label %[[SW_BB26]]
; CHECK: [[SW_BB26]]:
; CHECK-NEXT: [[C89_PRE_PHI:%.*]] = phi i64 [ [[DOTPRE3]], %[[ENTRY_SW_BB26_CRIT_EDGE]] ], [ [[C84_PRE_PHI]], %[[SW_BB21]] ]
; CHECK-NEXT: [[L88_PRE_PHI:%.*]] = phi i1 [ [[DOTPRE2]], %[[ENTRY_SW_BB26_CRIT_EDGE]] ], [ [[L83_PRE_PHI]], %[[SW_BB21]] ]
; CHECK-NEXT: ret ptr null
;
entry:
switch i64 0, label %sw.bb [
i64 1, label %sw.bb26
i64 0, label %sw.bb21
]
sw.bb: ; preds = %entry
%l78 = trunc i8 %__pred.1.val to i1
%c79 = select i1 %l78, i64 0, i64 4
br label %sw.bb21
sw.bb21: ; preds = %sw.bb, %entry
%l83 = trunc i8 %__pred.1.val to i1
%c84 = select i1 %l83, i64 0, i64 4
br label %sw.bb26
sw.bb26: ; preds = %sw.bb21, %entry
%l88 = trunc i8 %__pred.1.val to i1
%c89 = select i1 %l88, i64 0, i64 4, !prof !0
ret ptr null
}
!0 = !{!"branch_weights", i32 3994, i32 883}
;.
; CHECK: [[PROF0]] = !{!"branch_weights", i32 3994, i32 883}
;.