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
46 lines
1.1 KiB
LLVM
46 lines
1.1 KiB
LLVM
; RUN: opt < %s -passes=gvn -S | FileCheck %s
|
|
; RUN: opt < %s -passes="gvn<load-pre>" -S | FileCheck %s
|
|
|
|
target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32-n32"
|
|
|
|
@p = external global i32
|
|
|
|
define i32 @test(i32 %n) nounwind {
|
|
; CHECK-LABEL: @test(
|
|
entry:
|
|
br label %for.cond
|
|
|
|
; loads aligned greater than the memory should not be moved past conditionals
|
|
; CHECK-NOT: load
|
|
; CHECK: br i1
|
|
|
|
for.cond:
|
|
%i.0 = phi i32 [ 0, %entry ], [ %indvar.next, %for.inc ]
|
|
%cmp = icmp slt i32 %i.0, %n
|
|
br i1 %cmp, label %for.body, label %for.cond.for.end_crit_edge
|
|
|
|
for.cond.for.end_crit_edge:
|
|
; ...but PRE can still move the load out of for.end to here.
|
|
; CHECK: for.cond.for.end_crit_edge:
|
|
; CHECK-NEXT: load
|
|
br label %for.end
|
|
|
|
for.body:
|
|
%tmp3 = load i32, ptr @p, align 8
|
|
%dec = add i32 %tmp3, -1
|
|
store i32 %dec, ptr @p
|
|
%cmp6 = icmp slt i32 %dec, 0
|
|
br i1 %cmp6, label %for.body.for.end_crit_edge, label %for.inc
|
|
|
|
for.body.for.end_crit_edge:
|
|
br label %for.end
|
|
|
|
for.inc:
|
|
%indvar.next = add i32 %i.0, 1
|
|
br label %for.cond
|
|
|
|
for.end:
|
|
%tmp9 = load i32, ptr @p, align 8
|
|
ret i32 %tmp9
|
|
}
|