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
48 lines
1.7 KiB
LLVM
48 lines
1.7 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt -S -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s
|
|
|
|
; We're sign extending an 8-bit value.
|
|
; The switch condition must be in the range [-128, 127], so any cases outside of that range must be dead.
|
|
; Only the first case has a non-zero weight, but that gets eliminated. Note
|
|
; that this shouldn't have been the case in the first place, but the test here
|
|
; ensures that all-zero branch weights are not attached causing problems downstream.
|
|
|
|
define i1 @repeated_signbits(i8 %condition) {
|
|
; CHECK-LABEL: @repeated_signbits(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[SEXT:%.*]] = sext i8 [[CONDITION:%.*]] to i32
|
|
; CHECK-NEXT: switch i32 [[SEXT]], label [[DEFAULT:%.*]] [
|
|
; CHECK-NEXT: i32 0, label [[COMMON_RET:%.*]]
|
|
; CHECK-NEXT: i32 127, label [[COMMON_RET]]
|
|
; CHECK-NEXT: i32 -128, label [[COMMON_RET]]
|
|
; CHECK-NEXT: i32 -1, label [[COMMON_RET]]
|
|
; CHECK-NEXT: ]
|
|
; CHECK: common.ret:
|
|
; CHECK-NEXT: [[COMMON_RET_OP:%.*]] = phi i1 [ false, [[DEFAULT]] ], [ true, [[ENTRY:%.*]] ], [ true, [[ENTRY]] ], [ true, [[ENTRY]] ], [ true, [[ENTRY]] ]
|
|
; CHECK-NEXT: ret i1 [[COMMON_RET_OP]]
|
|
; CHECK: default:
|
|
; CHECK-NEXT: br label [[COMMON_RET]]
|
|
;
|
|
entry:
|
|
%sext = sext i8 %condition to i32
|
|
switch i32 %sext, label %default [
|
|
i32 -2147483648, label %a
|
|
i32 -129, label %a
|
|
i32 -128, label %a
|
|
i32 -1, label %a
|
|
i32 0, label %a
|
|
i32 127, label %a
|
|
i32 128, label %a
|
|
i32 2147483647, label %a
|
|
], !prof !1
|
|
|
|
a:
|
|
ret i1 1
|
|
|
|
default:
|
|
ret i1 0
|
|
}
|
|
|
|
!1 = !{!"branch_weights", i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0}
|
|
|