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
57 lines
1.5 KiB
LLVM
57 lines
1.5 KiB
LLVM
; RUN: opt -passes=loop-unroll -unroll-peel-count=2 -S -disable-output -debug-only=loop-unroll < %s 2>&1 | FileCheck %s
|
|
; REQUIRES: asserts
|
|
|
|
define void @test() {
|
|
; CHECK-LABEL: Loop Unroll: F[test] Loop %loop3
|
|
; CHECK-NEXT: Loop Size = 7
|
|
; CHECK: PEELING loop %loop3 with iteration count 2!
|
|
; CHECK: Loop Unroll: F[test] Loop %loop2
|
|
; CHECK-NEXT: Loop Size = 28
|
|
; CHECK: PEELING loop %loop2 with iteration count 2!
|
|
; CHECK: Loop Unroll: F[test] Loop %loop4
|
|
; CHECK-NEXT: Loop Size = 3
|
|
; CHECK: PEELING loop %loop4 with iteration count 2!
|
|
; CHECK: Loop Unroll: F[test] Loop %loop1
|
|
; CHECK-NEXT: Loop Size = 95
|
|
; CHECK: PEELING loop %loop1 with iteration count 2!
|
|
entry:
|
|
br label %loop1
|
|
|
|
loop1:
|
|
%phi = phi i32 [ 1, %entry ], [ 0, %loop1.latch ]
|
|
br label %loop2
|
|
|
|
loop2:
|
|
%phi3 = phi i64 [ 0, %loop1 ], [ %sext, %loop2.latch ]
|
|
br label %loop3
|
|
|
|
loop3:
|
|
%phi5 = phi i64 [ %phi3, %loop2 ], [ %sext, %loop3.latch ]
|
|
%phi6 = phi i32 [ 1, %loop2 ], [ %add10, %loop3.latch ]
|
|
%trunc = trunc i64 %phi5 to i32
|
|
br i1 true, label %loop3.latch, label %exit
|
|
|
|
loop3.latch:
|
|
%add = add i32 1, %phi
|
|
%sext = sext i32 %add to i64
|
|
%add10 = add i32 %phi6, 1
|
|
%icmp = icmp ugt i32 %add10, 2
|
|
br i1 %icmp, label %loop2.latch, label %loop3
|
|
|
|
loop2.latch:
|
|
br i1 false, label %loop4.preheader, label %loop2
|
|
|
|
loop4.preheader:
|
|
br label %loop4
|
|
|
|
loop4:
|
|
br i1 false, label %loop1.latch, label %loop4
|
|
|
|
loop1.latch:
|
|
br label %loop1
|
|
|
|
exit:
|
|
%phi8 = phi i32 [ %trunc, %loop3 ]
|
|
ret void
|
|
}
|