Files
TheRock/compiler/amd-llvm/polly/test/ScopDetect/collective_invariant_loads.ll
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

57 lines
2.3 KiB
LLVM

; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -polly-invariant-load-hoisting -disable-output < %s 2>&1 | FileCheck %s
;CHECK: Function: test_init_chpl
;CHECK-NEXT: Region: %bb1---%bb16
;CHECK-NEXT: Max Loop Depth: 2
;CHECK-NEXT: Invariant Accesses: {
;CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
;CHECK-NEXT: [tmp5] -> { Stmt_bb2[i0, i1] -> MemRef_arg[1] };
;CHECK-NEXT: Execution Context: [tmp5] -> { : }
;CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
;CHECK-NEXT: [tmp5] -> { Stmt_bb2[i0, i1] -> MemRef_tmp3[9] };
;CHECK-NEXT: Execution Context: [tmp5] -> { : }
;CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
;CHECK-NEXT: [tmp5] -> { Stmt_bb2[i0, i1] -> MemRef_tmp3[2] };
;CHECK-NEXT: Execution Context: [tmp5] -> { : }
;CHECK-NEXT: }
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
%array_ty = type { i64, ptr, i8 }
%array_ptr = type { [2 x i64], [2 x i64], [2 x i64], i64, i64, ptr, ptr, i8 }
; Function Attrs: noinline
define weak dso_local void @test_init_chpl(ptr nonnull %arg) {
bb:
br label %bb1
bb1: ; preds = %bb14, %bb
%.0 = phi i64 [ 0, %bb ], [ %tmp15, %bb14 ]
br label %bb2
bb2: ; preds = %bb2, %bb1
%.01 = phi i64 [ 0, %bb1 ], [ %tmp13, %bb2 ]
%tmp = getelementptr inbounds %array_ty, ptr %arg, i64 0, i32 1
%tmp3 = load ptr, ptr %tmp, align 8
%tmp4 = getelementptr inbounds %array_ptr, ptr %tmp3, i64 0, i32 1, i64 0
%tmp5 = load i64, ptr %tmp4, align 8
%tmp6 = mul nsw i64 %tmp5, %.0
%tmp7 = add nsw i64 %tmp6, %.01
%tmp8 = getelementptr inbounds %array_ptr, ptr %tmp3, i64 0, i32 6
%tmp9 = load ptr, ptr %tmp8, align 8
%tmp10 = getelementptr inbounds double, ptr %tmp9, i64 %tmp7
store double 13.0, ptr %tmp10, align 8
%tmp13 = add nuw nsw i64 %.01, 1
%exitcond = icmp ne i64 %tmp13, 1000
br i1 %exitcond, label %bb2, label %bb14
bb14: ; preds = %bb2
%tmp15 = add nuw nsw i64 %.0, 1
%exitcond8 = icmp ne i64 %tmp15, 1000
br i1 %exitcond8, label %bb1, label %bb16
bb16: ; preds = %bb14
ret void
}