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
95 lines
2.3 KiB
LLVM
95 lines
2.3 KiB
LLVM
; RUN: opt < %s -passes=gvn-sink,simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true -simplifycfg-sink-common=false -S | FileCheck %s
|
|
|
|
declare i8 @ext(i1)
|
|
|
|
define zeroext i1 @test1(i1 zeroext %flag, i32 %blksA, i32 %blksB, i32 %nblks, ptr %ext) {
|
|
entry:
|
|
%cmp = icmp uge i32 %blksA, %nblks
|
|
br i1 %flag, label %if.then, label %if.else
|
|
|
|
; CHECK-LABEL: test1
|
|
; CHECK: call i8 @ext
|
|
; CHECK: call i8 %ext
|
|
if.then:
|
|
%frombool1 = call i8 @ext(i1 %cmp)
|
|
br label %if.end
|
|
|
|
if.else:
|
|
%frombool3 = call i8 %ext(i1 %cmp)
|
|
br label %if.end
|
|
|
|
if.end:
|
|
%obeys.0 = phi i8 [ %frombool1, %if.then ], [ %frombool3, %if.else ]
|
|
%tobool4 = icmp ne i8 %obeys.0, 0
|
|
ret i1 %tobool4
|
|
}
|
|
|
|
define zeroext i1 @test2(i1 zeroext %flag, i32 %blksA, i32 %blksB, i32 %nblks, ptr %ext) {
|
|
entry:
|
|
%cmp = icmp uge i32 %blksA, %nblks
|
|
br i1 %flag, label %if.then, label %if.else
|
|
|
|
; CHECK-LABEL: test2
|
|
; CHECK: call i8 %ext
|
|
; CHECK-NOT: call
|
|
if.then:
|
|
%frombool1 = call i8 %ext(i1 %cmp)
|
|
br label %if.end
|
|
|
|
if.else:
|
|
%frombool3 = call i8 %ext(i1 %cmp)
|
|
br label %if.end
|
|
|
|
if.end:
|
|
%obeys.0 = phi i8 [ %frombool1, %if.then ], [ %frombool3, %if.else ]
|
|
%tobool4 = icmp ne i8 %obeys.0, 0
|
|
ret i1 %tobool4
|
|
}
|
|
|
|
define zeroext i1 @test3(i1 zeroext %flag, i32 %blksA, i32 %blksB, i32 %nblks, ptr %ext1, ptr %ext2) {
|
|
entry:
|
|
%cmp = icmp uge i32 %blksA, %nblks
|
|
br i1 %flag, label %if.then, label %if.else
|
|
|
|
; CHECK-LABEL: test3
|
|
; CHECK: %[[x:.*]] = select i1 %flag, ptr %ext1, ptr %ext2
|
|
; CHECK: call i8 %[[x]](i1 %cmp)
|
|
; CHECK-NOT: call
|
|
if.then:
|
|
%frombool1 = call i8 %ext1(i1 %cmp)
|
|
br label %if.end
|
|
|
|
if.else:
|
|
%frombool3 = call i8 %ext2(i1 %cmp)
|
|
br label %if.end
|
|
|
|
if.end:
|
|
%obeys.0 = phi i8 [ %frombool1, %if.then ], [ %frombool3, %if.else ]
|
|
%tobool4 = icmp ne i8 %obeys.0, 0
|
|
ret i1 %tobool4
|
|
}
|
|
|
|
; Make sure no indirect call is introduced from direct calls
|
|
declare i8 @ext2(i1)
|
|
define zeroext i1 @test4(i1 zeroext %flag, i32 %blksA, i32 %blksB, i32 %nblks) {
|
|
entry:
|
|
%cmp = icmp uge i32 %blksA, %nblks
|
|
br i1 %flag, label %if.then, label %if.else
|
|
|
|
; CHECK-LABEL: test4
|
|
; CHECK: call i8 @ext(
|
|
; CHECK: call i8 @ext2(
|
|
if.then:
|
|
%frombool1 = call i8 @ext(i1 %cmp)
|
|
br label %if.end
|
|
|
|
if.else:
|
|
%frombool3 = call i8 @ext2(i1 %cmp)
|
|
br label %if.end
|
|
|
|
if.end:
|
|
%obeys.0 = phi i8 [ %frombool1, %if.then ], [ %frombool3, %if.else ]
|
|
%tobool4 = icmp ne i8 %obeys.0, 0
|
|
ret i1 %tobool4
|
|
}
|