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
105 lines
4.5 KiB
LLVM
105 lines
4.5 KiB
LLVM
; RUN: opt < %s -S -passes='function(loop-versioning-licm,loop-mssa(licm))' 2>&1 | FileCheck %s
|
|
|
|
; CHECK-LABEL: @without_metadata(
|
|
define i32 @without_metadata(ptr nocapture %var1, ptr nocapture readnone %var2, ptr nocapture %var3, i32 %itr) #0 {
|
|
entry:
|
|
%cmp14 = icmp eq i32 %itr, 0
|
|
br i1 %cmp14, label %for.end13, label %for.cond1.preheader.preheader
|
|
|
|
for.cond1.preheader.preheader: ; preds = %entry
|
|
br label %for.cond1.preheader
|
|
|
|
for.cond1.preheader: ; preds = %for.cond1.preheader.preheader, %for.inc11
|
|
%j.016 = phi i32 [ %j.1.lcssa, %for.inc11 ], [ 0, %for.cond1.preheader.preheader ]
|
|
%i.015 = phi i32 [ %inc12, %for.inc11 ], [ 0, %for.cond1.preheader.preheader ]
|
|
%cmp212 = icmp ult i32 %j.016, %itr
|
|
br i1 %cmp212, label %for.body3.lr.ph, label %for.inc11
|
|
|
|
for.body3.lr.ph: ; preds = %for.cond1.preheader
|
|
%add = add i32 %i.015, %itr
|
|
%idxprom6 = zext i32 %i.015 to i64
|
|
%arrayidx7 = getelementptr inbounds i32, ptr %var3, i64 %idxprom6
|
|
br label %for.body3
|
|
|
|
for.body3: ; preds = %for.body3.lr.ph, %for.body3
|
|
%j.113 = phi i32 [ %j.016, %for.body3.lr.ph ], [ %inc, %for.body3 ]
|
|
%idxprom = zext i32 %j.113 to i64
|
|
%arrayidx = getelementptr inbounds i32, ptr %var1, i64 %idxprom
|
|
; CHECK: store i32 %add, ptr %arrayidx, align 4, !alias.scope {{.*}}, !noalias {{.*}}
|
|
store i32 %add, ptr %arrayidx, align 4
|
|
%0 = load i32, ptr %arrayidx7, align 4
|
|
%add8 = add nsw i32 %0, %add
|
|
store i32 %add8, ptr %arrayidx7, align 4
|
|
%inc = add nuw i32 %j.113, 1
|
|
%cmp2 = icmp ult i32 %inc, %itr
|
|
br i1 %cmp2, label %for.body3, label %for.inc11.loopexit
|
|
|
|
for.inc11.loopexit: ; preds = %for.body3
|
|
br label %for.inc11
|
|
|
|
for.inc11: ; preds = %for.inc11.loopexit, %for.cond1.preheader
|
|
%j.1.lcssa = phi i32 [ %j.016, %for.cond1.preheader ], [ %itr, %for.inc11.loopexit ]
|
|
%inc12 = add nuw i32 %i.015, 1
|
|
%cmp = icmp ult i32 %inc12, %itr
|
|
br i1 %cmp, label %for.cond1.preheader, label %for.end13.loopexit
|
|
|
|
for.end13.loopexit: ; preds = %for.inc11
|
|
br label %for.end13
|
|
|
|
for.end13: ; preds = %for.end13.loopexit, %entry
|
|
ret i32 0
|
|
}
|
|
|
|
; CHECK-LABEL: @with_metadata(
|
|
define i32 @with_metadata(ptr nocapture %var1, ptr nocapture readnone %var2, ptr nocapture %var3, i32 %itr) #0 {
|
|
entry:
|
|
%cmp14 = icmp eq i32 %itr, 0
|
|
br i1 %cmp14, label %for.end13, label %for.cond1.preheader.preheader
|
|
|
|
for.cond1.preheader.preheader: ; preds = %entry
|
|
br label %for.cond1.preheader
|
|
|
|
for.cond1.preheader: ; preds = %for.cond1.preheader.preheader, %for.inc11
|
|
%j.016 = phi i32 [ %j.1.lcssa, %for.inc11 ], [ 0, %for.cond1.preheader.preheader ]
|
|
%i.015 = phi i32 [ %inc12, %for.inc11 ], [ 0, %for.cond1.preheader.preheader ]
|
|
%cmp212 = icmp ult i32 %j.016, %itr
|
|
br i1 %cmp212, label %for.body3.lr.ph, label %for.inc11
|
|
|
|
for.body3.lr.ph: ; preds = %for.cond1.preheader
|
|
%add = add i32 %i.015, %itr
|
|
%idxprom6 = zext i32 %i.015 to i64
|
|
%arrayidx7 = getelementptr inbounds i32, ptr %var3, i64 %idxprom6
|
|
br label %for.body3
|
|
|
|
for.body3: ; preds = %for.body3.lr.ph, %for.body3
|
|
%j.113 = phi i32 [ %j.016, %for.body3.lr.ph ], [ %inc, %for.body3 ]
|
|
%idxprom = zext i32 %j.113 to i64
|
|
%arrayidx = getelementptr inbounds i32, ptr %var1, i64 %idxprom
|
|
; CHECK-NOT: store i32 %add, ptr %arrayidx, align 4, !alias.scope {{.*}}, !noalias {{.*}}
|
|
store i32 %add, ptr %arrayidx, align 4
|
|
%0 = load i32, ptr %arrayidx7, align 4
|
|
%add8 = add nsw i32 %0, %add
|
|
store i32 %add8, ptr %arrayidx7, align 4
|
|
%inc = add nuw i32 %j.113, 1
|
|
%cmp2 = icmp ult i32 %inc, %itr
|
|
br i1 %cmp2, label %for.body3, label %for.inc11.loopexit, !llvm.loop !0
|
|
|
|
for.inc11.loopexit: ; preds = %for.body3
|
|
br label %for.inc11
|
|
|
|
for.inc11: ; preds = %for.inc11.loopexit, %for.cond1.preheader
|
|
%j.1.lcssa = phi i32 [ %j.016, %for.cond1.preheader ], [ %itr, %for.inc11.loopexit ]
|
|
%inc12 = add nuw i32 %i.015, 1
|
|
%cmp = icmp ult i32 %inc12, %itr
|
|
br i1 %cmp, label %for.cond1.preheader, label %for.end13.loopexit
|
|
|
|
for.end13.loopexit: ; preds = %for.inc11
|
|
br label %for.end13
|
|
|
|
for.end13: ; preds = %for.end13.loopexit, %entry
|
|
ret i32 0
|
|
}
|
|
|
|
!0 = distinct !{!0, !1}
|
|
!1 = !{!"llvm.loop.licm_versioning.disable"}
|