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
55 lines
1.9 KiB
LLVM
55 lines
1.9 KiB
LLVM
; RUN: opt < %s -passes=loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -S | FileCheck %s
|
|
; We vectorize the inner loop, so we have to put it in LCSSA form.
|
|
; However, there's no reason to touch the outer loop.
|
|
|
|
; CHECK-LABEL: @foo
|
|
; CHECK-LABEL: for.end.inner.loopexit:
|
|
; CHECK: %[[LCSSAPHI:.*]] = phi i64 [ %indvars.iv, %for.body.inner ], [ %{{.*}}, %middle.block ]
|
|
; CHECK: store i64 %[[LCSSAPHI]], ptr %O1, align 4
|
|
; CHECK-LABEL: for.end.outer.loopexit
|
|
; CHECK: store i64 %indvars.outer, ptr %O2, align 4
|
|
|
|
|
|
define void @foo(ptr nocapture %A, ptr nocapture %B, i64 %n, i64 %m, ptr %O1, ptr %O2) {
|
|
entry:
|
|
%cmp = icmp sgt i64 %n, 0
|
|
br i1 %cmp, label %for.body.outer.preheader, label %for.end.outer
|
|
|
|
for.body.outer.preheader:
|
|
br label %for.body.outer
|
|
|
|
for.body.outer:
|
|
%indvars.outer = phi i64 [ %indvars.outer.next, %for.end.inner ], [ 0, %for.body.outer.preheader ]
|
|
%cmp2 = icmp sgt i64 %m, 0
|
|
br i1 %cmp2, label %for.body.inner.preheader, label %for.end.inner
|
|
|
|
for.body.inner.preheader:
|
|
br label %for.body.inner
|
|
|
|
for.body.inner:
|
|
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body.inner ], [ 0, %for.body.inner.preheader ]
|
|
%arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
|
|
%v = load i32, ptr %arrayidx, align 4
|
|
%arrayidx2 = getelementptr inbounds i32, ptr %B, i64 %indvars.iv
|
|
store i32 %v, ptr %arrayidx2, align 4
|
|
%indvars.iv.next = add i64 %indvars.iv, 1
|
|
%exitcond = icmp eq i64 %indvars.iv, %n
|
|
br i1 %exitcond, label %for.end.inner.loopexit, label %for.body.inner
|
|
|
|
for.end.inner.loopexit:
|
|
store i64 %indvars.iv, ptr %O1, align 4
|
|
br label %for.end.inner
|
|
|
|
for.end.inner:
|
|
%indvars.outer.next = add i64 %indvars.outer, 1
|
|
%exitcond.outer = icmp eq i64 %indvars.outer, %m
|
|
br i1 %exitcond.outer, label %for.end.outer.loopexit, label %for.body.outer
|
|
|
|
for.end.outer.loopexit:
|
|
store i64 %indvars.outer, ptr %O2, align 4
|
|
br label %for.end.outer
|
|
|
|
for.end.outer:
|
|
ret void
|
|
}
|