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
92 lines
2.3 KiB
LLVM
92 lines
2.3 KiB
LLVM
; RUN: opt -S -passes=mergefunc < %s | FileCheck %s
|
|
|
|
; These two functions are identical. The basic block labels are the same, and
|
|
; induce the same CFG. We are testing that block addresses within different
|
|
; functions are compared by their value, and not based on order. Both functions
|
|
; come from the same C-code, but in the first the two val_0/val_1 basic blocks
|
|
; are in a different order (they were manually switched post-compilation).
|
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
define i32 @_Z1fi(i32 %i) #0 {
|
|
entry:
|
|
%i.addr = alloca i32, align 4
|
|
%ret = alloca i32, align 4
|
|
%l = alloca ptr, align 8
|
|
store i32 %i, ptr %i.addr, align 4
|
|
store i32 0, ptr %ret, align 4
|
|
store ptr blockaddress(@_Z1fi, %val_0), ptr %l, align 8
|
|
%0 = load i32, ptr %i.addr, align 4
|
|
%and = and i32 %0, 256
|
|
%cmp = icmp eq i32 %and, 0
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
if.then:
|
|
store ptr blockaddress(@_Z1fi, %val_1), ptr %l, align 8
|
|
br label %if.end
|
|
|
|
if.end:
|
|
%1 = load ptr, ptr %l, align 8
|
|
br label %indirectgoto
|
|
|
|
val_1:
|
|
store i32 42, ptr %ret, align 4
|
|
br label %end
|
|
|
|
val_0:
|
|
store i32 12, ptr %ret, align 4
|
|
br label %end
|
|
|
|
|
|
end:
|
|
%2 = load i32, ptr %ret, align 4
|
|
ret i32 %2
|
|
|
|
indirectgoto:
|
|
%indirect.goto.dest = phi ptr [ %1, %if.end ]
|
|
indirectbr ptr %indirect.goto.dest, [label %val_0, label %val_1]
|
|
}
|
|
|
|
define i32 @_Z1gi(i32 %i) #0 {
|
|
; CHECK-LABEL: define i32 @_Z1gi
|
|
; CHECK-NEXT: tail call i32 @_Z1fi
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%i.addr = alloca i32, align 4
|
|
%ret = alloca i32, align 4
|
|
%l = alloca ptr, align 8
|
|
store i32 %i, ptr %i.addr, align 4
|
|
store i32 0, ptr %ret, align 4
|
|
store ptr blockaddress(@_Z1gi, %val_0), ptr %l, align 8
|
|
%0 = load i32, ptr %i.addr, align 4
|
|
%and = and i32 %0, 256
|
|
%cmp = icmp eq i32 %and, 0
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
if.then:
|
|
store ptr blockaddress(@_Z1gi, %val_1), ptr %l, align 8
|
|
br label %if.end
|
|
|
|
if.end:
|
|
%1 = load ptr, ptr %l, align 8
|
|
br label %indirectgoto
|
|
|
|
val_0:
|
|
store i32 12, ptr %ret, align 4
|
|
br label %end
|
|
|
|
val_1:
|
|
store i32 42, ptr %ret, align 4
|
|
br label %end
|
|
|
|
end:
|
|
%2 = load i32, ptr %ret, align 4
|
|
ret i32 %2
|
|
|
|
indirectgoto:
|
|
%indirect.goto.dest = phi ptr [ %1, %if.end ]
|
|
indirectbr ptr %indirect.goto.dest, [label %val_0, label %val_1]
|
|
}
|
|
|