Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/GuardWidening/pr60234_recommit.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

57 lines
2.2 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -passes=guard-widening -S < %s | FileCheck %s
define ptr @test(i1 %cond, ptr %p) {
; CHECK-LABEL: @test(
; CHECK-NEXT: bb:
; CHECK-NEXT: [[VAR:%.*]] = call i1 @llvm.experimental.widenable.condition()
; CHECK-NEXT: [[VAR2:%.*]] = call i1 @llvm.experimental.widenable.condition()
; CHECK-NEXT: [[VAR3:%.*]] = and i1 [[COND:%.*]], [[VAR2]]
; CHECK-NEXT: br label [[BB4:%.*]]
; CHECK: bb4:
; CHECK-NEXT: [[VAR5:%.*]] = load atomic i32, ptr [[P:%.*]] unordered, align 8
; CHECK-NEXT: [[VAR6:%.*]] = icmp ugt i32 [[VAR5]], 0
; CHECK-NEXT: [[VAR7:%.*]] = and i1 [[VAR6]], [[VAR]]
; CHECK-NEXT: br i1 [[VAR7]], label [[BB10:%.*]], label [[BB8:%.*]]
; CHECK: bb8:
; CHECK-NEXT: [[VAR9:%.*]] = call ptr (...) @llvm.experimental.deoptimize.p0(i32 13) [ "deopt"(i32 0) ]
; CHECK-NEXT: ret ptr [[VAR9]]
; CHECK: bb10:
; CHECK-NEXT: br i1 [[VAR3]], label [[BB13:%.*]], label [[BB11:%.*]]
; CHECK: bb11:
; CHECK-NEXT: [[VAR12:%.*]] = call ptr (...) @llvm.experimental.deoptimize.p0(i32 13) [ "deopt"(i32 1) ]
; CHECK-NEXT: ret ptr [[VAR12]]
; CHECK: bb13:
; CHECK-NEXT: unreachable
;
bb:
%var = call i1 @llvm.experimental.widenable.condition()
%var2 = call i1 @llvm.experimental.widenable.condition()
%var3 = and i1 %cond, %var2
br label %bb4
bb4: ; preds = %bb
%var5 = load atomic i32, ptr %p unordered, align 8
%var6 = icmp ugt i32 %var5, 0
%var7 = and i1 %var6, %var
br i1 %var7, label %bb10, label %bb8
bb8: ; preds = %bb4
%var9 = call ptr (...) @llvm.experimental.deoptimize.p0(i32 13) [ "deopt"(i32 0) ]
ret ptr %var9
bb10: ; preds = %bb4
br i1 %var3, label %bb13, label %bb11
bb11: ; preds = %bb10
%var12 = call ptr (...) @llvm.experimental.deoptimize.p0(i32 13) [ "deopt"(i32 1) ]
ret ptr %var12
bb13: ; preds = %bb10
unreachable
}
declare ptr @llvm.experimental.deoptimize.p0(...)
declare i1 @llvm.experimental.widenable.condition()