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
91 lines
2.2 KiB
LLVM
91 lines
2.2 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt %loadexampleirtransforms -passes=tut-simplifycfg -tut-simplifycfg-version=v1 -S < %s | FileCheck %s
|
|
; RUN: opt %loadexampleirtransforms -passes=tut-simplifycfg -tut-simplifycfg-version=v2 -S < %s | FileCheck %s
|
|
; RUN: opt %loadexampleirtransforms -passes=tut-simplifycfg -tut-simplifycfg-version=v3 -S < %s | FileCheck %s
|
|
|
|
define i32 @simp1() {
|
|
; CHECK-LABEL: @simp1(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: ret i32 10
|
|
;
|
|
entry:
|
|
br i1 true, label %if.then, label %if.else
|
|
|
|
if.then:
|
|
ret i32 10
|
|
|
|
if.else:
|
|
ret i32 12
|
|
}
|
|
|
|
define i32 @simp2() {
|
|
; CHECK-LABEL: @simp2(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: ret i32 200
|
|
;
|
|
entry:
|
|
br i1 false, label %if.then, label %if.else
|
|
|
|
if.then:
|
|
ret i32 99
|
|
|
|
if.else:
|
|
ret i32 200
|
|
}
|
|
|
|
declare void @foo(i64)
|
|
|
|
define i64 @merge_into_predecessor(i64 %a, i64 %b) {
|
|
; CHECK-LABEL: @merge_into_predecessor(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[R:%.*]] = add i64 [[A:%.*]], [[B:%.*]]
|
|
; CHECK-NEXT: call void @foo(i64 [[R]])
|
|
; CHECK-NEXT: call void @foo(i64 [[A]])
|
|
; CHECK-NEXT: ret i64 [[R]]
|
|
;
|
|
entry:
|
|
br label %bb.next
|
|
|
|
bb.next:
|
|
%r = add i64 %a, %b
|
|
call void @foo(i64 %r)
|
|
call void @foo(i64 %a)
|
|
br label %bb.next.next
|
|
|
|
bb.next.next:
|
|
ret i64 %r
|
|
}
|
|
|
|
define i64 @merge_into_predecessor_with_phi(i64 %a, i64 %b, i1 %c) {
|
|
; CHECK-LABEL: @merge_into_predecessor_with_phi(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: call void @foo(i64 [[B:%.*]])
|
|
; CHECK-NEXT: [[R:%.*]] = add i64 [[A:%.*]], [[B]]
|
|
; CHECK-NEXT: call void @foo(i64 [[R]])
|
|
; CHECK-NEXT: call void @foo(i64 [[A]])
|
|
; CHECK-NEXT: br i1 [[C:%.*]], label [[BB_NEXT_NEXT:%.*]], label [[BB_EXIT:%.*]]
|
|
; CHECK: bb.next.next:
|
|
; CHECK-NEXT: br label [[BB_EXIT]]
|
|
; CHECK: bb.exit:
|
|
; CHECK-NEXT: [[RET:%.*]] = phi i64 [ [[R]], [[ENTRY:%.*]] ], [ 10, [[BB_NEXT_NEXT]] ]
|
|
; CHECK-NEXT: ret i64 [[RET]]
|
|
;
|
|
entry:
|
|
call void @foo(i64 %b)
|
|
br label %bb.next
|
|
|
|
bb.next:
|
|
%r = add i64 %a, %b
|
|
call void @foo(i64 %r)
|
|
call void @foo(i64 %a)
|
|
br i1 %c, label %bb.next.next, label %bb.exit
|
|
|
|
bb.next.next:
|
|
br label %bb.exit
|
|
|
|
bb.exit:
|
|
%ret = phi i64 [ %r, %bb.next], [ 10, %bb.next.next]
|
|
ret i64 %ret
|
|
|
|
}
|