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
61 lines
2.2 KiB
LLVM
61 lines
2.2 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt -S -passes=jump-threading -jump-threading-threshold=3 < %s | FileCheck %s
|
|
|
|
; TODO: In this test case, only the stores in %join should count towards
|
|
; the jump threading threshold, as everything else are free instructions.
|
|
define i32 @free_instructions(i1 %c, ptr %p) {
|
|
; CHECK-LABEL: @free_instructions(
|
|
; CHECK-NEXT: br i1 [[C:%.*]], label [[IF2:%.*]], label [[ELSE2:%.*]]
|
|
; CHECK: if2:
|
|
; CHECK-NEXT: store i32 -1, ptr [[P:%.*]], align 4
|
|
; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META0:![0-9]+]])
|
|
; CHECK-NEXT: store i32 1, ptr [[P]], align 4, !noalias !0
|
|
; CHECK-NEXT: call void @llvm.assume(i1 true) [ "align"(ptr [[P]], i64 32) ]
|
|
; CHECK-NEXT: store i32 2, ptr [[P]], align 4
|
|
; CHECK-NEXT: [[P32:%.*]] = call ptr @llvm.launder.invariant.group.p0(ptr [[P]])
|
|
; CHECK-NEXT: store i32 3, ptr [[P32]], align 4, !invariant.group !3
|
|
; CHECK-NEXT: ret i32 0
|
|
; CHECK: else2:
|
|
; CHECK-NEXT: store i32 -2, ptr [[P]], align 4
|
|
; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META4:![0-9]+]])
|
|
; CHECK-NEXT: store i32 1, ptr [[P]], align 4, !noalias !4
|
|
; CHECK-NEXT: call void @llvm.assume(i1 true) [ "align"(ptr [[P]], i64 32) ]
|
|
; CHECK-NEXT: store i32 2, ptr [[P]], align 4
|
|
; CHECK-NEXT: [[P3:%.*]] = call ptr @llvm.launder.invariant.group.p0(ptr [[P]])
|
|
; CHECK-NEXT: store i32 3, ptr [[P3]], align 4, !invariant.group !3
|
|
; CHECK-NEXT: ret i32 1
|
|
;
|
|
br i1 %c, label %if, label %else
|
|
|
|
if:
|
|
store i32 -1, ptr %p
|
|
br label %join
|
|
|
|
else:
|
|
store i32 -2, ptr %p
|
|
br label %join
|
|
|
|
join:
|
|
call void @llvm.experimental.noalias.scope.decl(metadata !0)
|
|
store i32 1, ptr %p, !noalias !0
|
|
call void @llvm.assume(i1 true) ["align"(ptr %p, i64 32)]
|
|
store i32 2, ptr %p
|
|
%p3 = call ptr @llvm.launder.invariant.group.p0(ptr %p)
|
|
store i32 3, ptr %p3, !invariant.group !{}
|
|
br i1 %c, label %if2, label %else2
|
|
|
|
if2:
|
|
ret i32 0
|
|
|
|
else2:
|
|
ret i32 1
|
|
}
|
|
|
|
declare void @llvm.assume(i1)
|
|
declare void @llvm.experimental.noalias.scope.decl(metadata)
|
|
declare ptr @llvm.launder.invariant.group.p0(ptr)
|
|
|
|
!0 = !{!1}
|
|
!1 = distinct !{!1, !2, !"scope"}
|
|
!2 = distinct !{!2, !"domain"}
|