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
108 lines
3.7 KiB
LLVM
108 lines
3.7 KiB
LLVM
; RUN: opt -disable-output "-passes=print<scalar-evolution>" < %s 2>&1 | FileCheck %s
|
|
|
|
define void @single_loop(ptr %buf, i32 %start) {
|
|
; CHECK-LABEL: Classifying expressions for: @single_loop
|
|
entry:
|
|
%val = add i32 %start, 400
|
|
br label %loop
|
|
|
|
loop:
|
|
%counter = phi i32 [ 0, %entry ], [ %counter.inc, %loop ]
|
|
%idx = phi i32 [ %start, %entry ], [ %idx.inc, %loop ]
|
|
|
|
; CHECK: %counter = phi i32 [ 0, %entry ], [ %counter.inc, %loop ]
|
|
; CHECK-NEXT: --> {{.*}} LoopDispositions: { %loop: Computable }
|
|
; CHECK: %idx = phi i32 [ %start, %entry ], [ %idx.inc, %loop ]
|
|
; CHECK-NEXT: --> {{.*}} LoopDispositions: { %loop: Computable }
|
|
; CHECK: %val2 = add i32 %start, 400
|
|
; CHECK-NEXT: --> {{.*}} LoopDispositions: { %loop: Invariant }
|
|
; CHECK: %idx.inc = add nsw i32 %idx, 1
|
|
; CHECK-NEXT: --> {{.*}} LoopDispositions: { %loop: Computable }
|
|
; CHECK: %val3 = load volatile i32, ptr %buf
|
|
; CHECK-NEXT: --> {{.*}} LoopDispositions: { %loop: Variant }
|
|
|
|
%val2 = add i32 %start, 400
|
|
%idx.inc = add nsw i32 %idx, 1
|
|
%idx.inc.sext = sext i32 %idx.inc to i64
|
|
%condition = icmp eq i32 %counter, 1
|
|
%counter.inc = add i32 %counter, 1
|
|
%val3 = load volatile i32, ptr %buf
|
|
br i1 %condition, label %exit, label %loop
|
|
|
|
exit:
|
|
ret void
|
|
}
|
|
|
|
|
|
define void @nested_loop(ptr %p, i64 %m) {
|
|
; CHECK-LABEL: Classifying expressions for: @nested_loop
|
|
|
|
; CHECK: %j = phi i64 [ 0, %entry ], [ %j.next, %outer.latch ]
|
|
; CHECK-NEXT: --> {{.*}} LoopDispositions: { %outer.loop: Computable, %bb: Invariant }
|
|
; CHECK: %i = phi i64 [ 0, %outer.loop ], [ %i.next, %bb ]
|
|
; CHECK-NEXT: --> {{.*}} LoopDispositions: { %bb: Computable, %outer.loop: Uniform }
|
|
; CHECK: %j.add = add i64 %j, 100
|
|
; CHECK-NEXT: --> {{.*}} LoopDispositions: { %bb: Invariant, %outer.loop: Computable }
|
|
; CHECK: %i.next = add i64 %i, 1
|
|
; CHECK-NEXT: --> {{.*}} LoopDispositions: { %bb: Computable, %outer.loop: Uniform }
|
|
; CHECK: %j.next = add i64 %j, 91
|
|
; CHECK-NEXT: --> {{.*}} LoopDispositions: { %outer.loop: Computable, %bb: Invariant }
|
|
|
|
entry:
|
|
%k = icmp sgt i64 %m, 0
|
|
br i1 %k, label %outer.loop, label %return
|
|
|
|
outer.loop:
|
|
%j = phi i64 [ 0, %entry ], [ %j.next, %outer.latch ]
|
|
br label %bb
|
|
|
|
bb:
|
|
%i = phi i64 [ 0, %outer.loop ], [ %i.next, %bb ]
|
|
%j.add = add i64 %j, 100
|
|
%i.next = add i64 %i, 1
|
|
%exitcond = icmp eq i64 %i.next, 91
|
|
br i1 %exitcond, label %outer.latch, label %bb
|
|
|
|
outer.latch:
|
|
%j.next = add i64 %j, 91
|
|
%h = icmp eq i64 %j.next, %m
|
|
br i1 %h, label %return, label %outer.loop
|
|
|
|
return:
|
|
ret void
|
|
}
|
|
|
|
define void @nested_loop2(i16 %.pre.pre) {
|
|
; CHECK-LABEL: Classifying expressions for: @nested_loop2
|
|
|
|
; CHECK: %i = phi i16 [ 0, %entry ], [ %i.next, %outer.latch ]
|
|
; CHECK-NEXT: --> {{.*}} LoopDispositions: { %outer.loop: Computable, %inner.loop: Invariant }
|
|
; CHECK: %j = phi i16 [ %j.next, %inner.loop ], [ -1, %outer.loop ]
|
|
; CHECK-NEXT: --> {{.*}} LoopDispositions: { %inner.loop: Computable, %outer.loop: Uniform }
|
|
; CHECK: %j.next = add nsw i16 %j, 1
|
|
; CHECK-NEXT: --> {{.*}} LoopDispositions: { %inner.loop: Computable, %outer.loop: Uniform }
|
|
; CHECK: %smin = call i16 @llvm.smin.i16(i16 %i, i16 %j)
|
|
; CHECK-NEXT: --> {{.*}} LoopDispositions: { %outer.loop: Variant, %inner.loop: Computable }
|
|
; CHECK: %i.next = add i16 %i, 1
|
|
; CHECK-NEXT: --> {{.*}} LoopDispositions: { %outer.loop: Computable, %inner.loop: Invariant }
|
|
|
|
entry:
|
|
br label %outer.loop
|
|
|
|
outer.loop:
|
|
%i = phi i16 [ 0, %entry ], [ %i.next, %outer.latch ]
|
|
br label %inner.loop
|
|
|
|
inner.loop:
|
|
%j = phi i16 [ %j.next, %inner.loop ], [ -1, %outer.loop ]
|
|
%cmp = icmp eq i16 %.pre.pre, 0
|
|
%j.next = add nsw i16 %j, 1
|
|
br i1 %cmp, label %inner.loop, label %outer.latch
|
|
|
|
outer.latch:
|
|
%smin = call i16 @llvm.smin.i16(i16 %i, i16 %j)
|
|
store i16 %smin, ptr null, align 1
|
|
%i.next = add i16 %i, 1
|
|
br label %outer.loop
|
|
}
|