Files
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

52 lines
2.2 KiB
LLVM

; RUN: opt -passes='hardware-loops<force-hardware-loops;hardware-loop-decrement=1;hardware-loop-counter-bitwidth=32>' -S %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ALLOW
; RUN: opt -passes='hardware-loops<force-hardware-loops;hardware-loop-decrement=1;hardware-loop-counter-bitwidth=32>' -force-hardware-loop-guard=true -S %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ALLOW
; RUN: opt -passes='hardware-loops<force-hardware-loops;hardware-loop-decrement=1;hardware-loop-counter-bitwidth=32;force-hardware-loop-phi>' -S %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-LATCH
; CHECK-LABEL: not_rotated
; CHECK-LATCH-NOT: call void @llvm.set.loop.iterations
; CHECK-LATCH-NOT: call i1 @llvm.loop.decrement
; CHECK-ALLOW: bb:
; CHECK-ALLOW: [[COUNT:%[^ ]+]] = add i32 %arg, 1
; CHECK-ALLOW: br label %bb3
; CHECK-ALLOW: bb5:
; CHECK-ALLOW: call void @llvm.set.loop.iterations.i32(i32 [[COUNT]])
; CHECK-ALLOW: br label %bb7
; CHECK-ALLOW: [[CMP:%[^ ]+]] = call i1 @llvm.loop.decrement.i32(i32 1)
; CHECK-ALLOW: br i1 [[CMP]], label %bb10, label %bb16
define void @not_rotated(i32 %arg, ptr nocapture %arg1, i16 signext %arg2) {
bb:
br label %bb3
bb3: ; preds = %bb16, %bb
%tmp = phi i32 [ 0, %bb ], [ %tmp17, %bb16 ]
%tmp4 = icmp eq i32 %tmp, %arg
br i1 %tmp4, label %bb18, label %bb5
bb5: ; preds = %bb3
%tmp6 = mul i32 %tmp, %arg
br label %bb7
bb7: ; preds = %bb10, %bb5
%tmp8 = phi i32 [ %tmp15, %bb10 ], [ 0, %bb5 ]
%tmp9 = icmp eq i32 %tmp8, %arg
br i1 %tmp9, label %bb16, label %bb10
bb10: ; preds = %bb7
%tmp11 = add i32 %tmp8, %tmp6
%tmp12 = getelementptr inbounds i16, ptr %arg1, i32 %tmp11
%tmp13 = load i16, ptr %tmp12, align 2
%tmp14 = add i16 %tmp13, %arg2
store i16 %tmp14, ptr %tmp12, align 2
%tmp15 = add i32 %tmp8, 1
br label %bb7
bb16: ; preds = %bb7
%tmp17 = add i32 %tmp, 1
br label %bb3
bb18: ; preds = %bb3
ret void
}