Files
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

65 lines
2.2 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
; RUN: opt < %s -passes=loop-interchange -loop-interchange-profitabilities=ignore -S | FileCheck %s
@g = global i64 0
declare void @rd(ptr)
declare i32 @__gxx_personality_v0(...)
; The following loops must not be interchanged because the invocation of @rd
; may read or write the memory.
;
define void @invoke_may_rw() personality ptr @__gxx_personality_v0 {
; CHECK-LABEL: define void @invoke_may_rw() personality ptr @__gxx_personality_v0 {
; CHECK-NEXT: [[I_HEADER:.*]]:
; CHECK-NEXT: br label %[[J_HEADER_PREHEADER:.*]]
; CHECK: [[J_HEADER_PREHEADER]]:
; CHECK-NEXT: [[I:%.*]] = phi i64 [ 0, %[[I_HEADER]] ], [ [[I_NEXT:%.*]], %[[I_LATCH:.*]] ]
; CHECK-NEXT: br label %[[J_HEADER:.*]]
; CHECK: [[J_HEADER]]:
; CHECK-NEXT: [[J:%.*]] = phi i64 [ 0, %[[J_HEADER_PREHEADER]] ], [ [[TMP0:%.*]], %[[J_LATCH:.*]] ]
; CHECK-NEXT: invoke void @rd(ptr @g)
; CHECK-NEXT: to label %[[J_LATCH]] unwind label %[[LP:.*]]
; CHECK: [[LP]]:
; CHECK-NEXT: [[L:%.*]] = landingpad { ptr, i32 }
; CHECK-NEXT: cleanup
; CHECK-NEXT: br label %[[J_LATCH]]
; CHECK: [[J_LATCH]]:
; CHECK-NEXT: [[TMP0]] = add i64 [[J]], 1
; CHECK-NEXT: [[TMP1:%.*]] = icmp eq i64 [[TMP0]], 8
; CHECK-NEXT: br i1 [[TMP1]], label %[[I_LATCH]], label %[[J_HEADER]]
; CHECK: [[I_LATCH]]:
; CHECK-NEXT: [[I_NEXT]] = add i64 [[I]], 1
; CHECK-NEXT: [[EC_I:%.*]] = icmp eq i64 [[I_NEXT]], 8
; CHECK-NEXT: br i1 [[EC_I]], label %[[EXIT:.*]], label %[[J_HEADER_PREHEADER]]
; CHECK: [[EXIT]]:
; CHECK-NEXT: ret void
;
entry:
br label %i.header
i.header:
%i = phi i64 [ 0, %entry ], [ %i.next, %i.latch ]
br label %j.header
j.header:
%j = phi i64 [ 0, %i.header ], [ %j.next, %j.latch ]
invoke void @rd(ptr @g) to label %j.latch unwind label %lp
lp:
%l = landingpad { ptr, i32 } cleanup
br label %j.latch
j.latch:
%j.next = add i64 %j, 1
%ec.j = icmp eq i64 %j.next, 8
br i1 %ec.j, label %i.latch, label %j.header
i.latch:
%i.next = add i64 %i, 1
%ec.i = icmp eq i64 %i.next, 8
br i1 %ec.i, label %exit, label %i.header
exit:
ret void
}