Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

68 lines
2.3 KiB
LLVM

; RUN: opt -S -passes=consthoist -consthoist-with-block-frequency=false < %s | FileCheck %s
; RUN: opt -S -passes=consthoist -consthoist-with-block-frequency=true < %s | FileCheck --check-prefix=BFIHOIST %s
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-windows-msvc"
; CHECK-LABEL: define i32 @main
; CHECK: %tobool = icmp eq i32 %argc, 0
; CHECK-NEXT: bitcast i64 9209618997431186100 to i64
; CHECK-NEXT: br i1 %tobool
; BFIHOIST-LABEL: define i32 @main
; BFIHOIST: then:
; BFIHOIST: %[[CONST1:.*]] = bitcast i64 9209618997431186100 to i64
; BFIHOIST: %add = add i64 %call4, %[[CONST1]]
; BFIHOIST: br label %endif
; BFIHOIST: else:
; BFIHOIST: %[[CONST2:.*]] = bitcast i64 9209618997431186100 to i64
; BFIHOIST: %add6 = add i64 %call5, %[[CONST2]]
; BFIHOIST: br label %endif
; Function Attrs: norecurse
define i32 @main(i32 %argc, ptr nocapture readnone %argv) local_unnamed_addr personality ptr @__CxxFrameHandler3 {
%call = tail call i64 @fn(i64 0)
%call1 = tail call i64 @fn(i64 1)
%tobool = icmp eq i32 %argc, 0
br i1 %tobool, label %2, label %1
; <label>:1: ; preds = %0
%call2 = invoke i64 @fn(i64 %call)
to label %6 unwind label %catch.dispatch
; <label>:2: ; preds = %0
%call3 = invoke i64 @fn(i64 %call1)
to label %6 unwind label %catch.dispatch
catch.dispatch: ; preds = %2, %1
%z.0 = phi i64 [ %call, %1 ], [ %call1, %2 ]
%3 = catchswitch within none [label %4] unwind to caller
; <label>:4: ; preds = %catch.dispatch
%5 = catchpad within %3 [ptr null, i32 64, ptr null]
br i1 %tobool, label %then, label %else
then:
%call4 = tail call i64 @fn(i64 %z.0) [ "funclet"(token %5) ]
%add = add i64 %call4, 9209618997431186100
br label %endif
else:
%call5 = tail call i64 @fn(i64 0) [ "funclet"(token %5) ]
%add6 = add i64 %call5, 9209618997431186100
br label %endif
endif:
%v = phi i64 [ %add, %then ], [ %add6, %else ]
%call7 = tail call i64 @fn(i64 %v) [ "funclet"(token %5) ]
%call8 = tail call i64 @fn(i64 %call7) [ "funclet"(token %5) ]
catchret from %5 to label %6
; <label>:6: ; preds = %1, %2, %4
ret i32 0
}
declare i64 @fn(i64) local_unnamed_addr
declare i32 @__CxxFrameHandler3(...)