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
88 lines
2.1 KiB
LLVM
88 lines
2.1 KiB
LLVM
; RUN: opt < %s -passes=lcssa -S -o - | FileCheck %s
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
; PR28424
|
|
; Here LCSSA adds phi-nodes for %x into the loop exits. Then, SSAUpdater needs
|
|
; to insert phi-nodes to merge these values. That creates a new def, which in
|
|
; its turn needs another LCCSA phi-node, and this test ensures that we insert
|
|
; it.
|
|
|
|
; CHECK-LABEL: @foo1
|
|
define internal i32 @foo1(i1 %arg) {
|
|
entry:
|
|
br label %header
|
|
|
|
header:
|
|
%x = add i32 0, 1
|
|
br i1 %arg, label %if, label %loopexit1
|
|
|
|
if:
|
|
br i1 %arg, label %latch, label %loopexit2
|
|
|
|
latch:
|
|
br i1 %arg, label %header, label %loopexit3
|
|
|
|
; CHECK: loopexit1:
|
|
; CHECK: %x.lcssa = phi i32 [ %x, %header ]
|
|
loopexit1:
|
|
br label %loop_with_insert_point
|
|
|
|
; CHECK: loopexit2:
|
|
; CHECK: %x.lcssa1 = phi i32 [ %x, %if ]
|
|
loopexit2:
|
|
br label %exit
|
|
|
|
; CHECK: loopexit3:
|
|
; CHECK: %x.lcssa2 = phi i32 [ %x, %latch ]
|
|
loopexit3:
|
|
br label %loop_with_insert_point
|
|
|
|
; CHECK: loop_with_insert_point:
|
|
; CHECK: %x4 = phi i32 [ %x4, %loop_with_insert_point ], [ %x.lcssa2, %loopexit3 ], [ %x.lcssa, %loopexit1 ]
|
|
loop_with_insert_point:
|
|
br i1 %arg, label %loop_with_insert_point, label %bb
|
|
|
|
; CHECK: bb:
|
|
; CHECK: %x4.lcssa = phi i32 [ %x4, %loop_with_insert_point ]
|
|
bb:
|
|
br label %exit
|
|
|
|
; CHECK: exit:
|
|
; CHECK: %x3 = phi i32 [ %x4.lcssa, %bb ], [ %x.lcssa1, %loopexit2 ]
|
|
exit:
|
|
ret i32 %x
|
|
}
|
|
|
|
; CHECK-LABEL: @foo2
|
|
define internal i32 @foo2(i1 %arg) {
|
|
entry:
|
|
br label %header
|
|
|
|
header:
|
|
%x = add i32 0, 1
|
|
br i1 %arg, label %latch, label %loopexit1
|
|
|
|
latch:
|
|
br i1 %arg, label %header, label %loopexit2
|
|
|
|
; CHECK: loopexit1:
|
|
; CHECK: %x.lcssa = phi i32 [ %x, %header ]
|
|
loopexit1:
|
|
br label %loop_with_insert_point
|
|
|
|
; CHECK: loopexit2:
|
|
; CHECK: %x.lcssa1 = phi i32 [ %x, %latch ]
|
|
loopexit2:
|
|
br label %loop_with_insert_point
|
|
|
|
; CHECK: loop_with_insert_point:
|
|
; CHECK: %x2 = phi i32 [ %x2, %loop_with_insert_point ], [ %x.lcssa1, %loopexit2 ], [ %x.lcssa, %loopexit1 ]
|
|
loop_with_insert_point:
|
|
br i1 %arg, label %loop_with_insert_point, label %exit
|
|
|
|
; CHECK: exit:
|
|
; CHECK: %x2.lcssa = phi i32 [ %x2, %loop_with_insert_point ]
|
|
exit:
|
|
ret i32 %x
|
|
}
|