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

117 lines
3.0 KiB
LLVM

; RUN: opt -S -passes=consthoist < %s | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.9.0"
; PR18626
define ptr @test1(i1 %cmp, ptr %tmp) {
entry:
call void @foo(ptr inttoptr (i64 68719476735 to ptr))
br i1 %cmp, label %if.end, label %return
if.end: ; preds = %bb1
call void @foo(ptr inttoptr (i64 68719476736 to ptr))
br label %return
return:
%retval.0 = phi ptr [ null, %entry ], [ inttoptr (i64 68719476736 to ptr), %if.end ]
store i64 1172321806, ptr %tmp
ret ptr %retval.0
; CHECK-LABEL: @test1
; CHECK: if.end:
; CHECK: %2 = inttoptr i64 %const to ptr
; CHECK-NEXT: br
; CHECK: return:
; CHECK-NEXT: %retval.0 = phi ptr [ null, %entry ], [ %2, %if.end ]
}
define void @test2(i1 %cmp, ptr %tmp) {
entry:
call void @foo(ptr inttoptr (i64 68719476736 to ptr))
br i1 %cmp, label %if.end, label %return
if.end: ; preds = %bb1
call void @foo(ptr inttoptr (i64 68719476736 to ptr))
br label %return
return:
store ptr inttoptr (i64 68719476735 to ptr), ptr %tmp
ret void
; CHECK-LABEL: @test2
; CHECK: return:
; CHECK-NEXT: %const_mat = add i64 %const, -1
; CHECK-NEXT: inttoptr i64 %const_mat to ptr
}
declare void @foo(ptr)
; PR18768
define i32 @test3(i1 %c) {
entry:
br i1 %c, label %if.then, label %if.end3
if.then: ; preds = %entry
br label %if.end3
if.end3: ; preds = %if.then, %entry
%d.0 = phi ptr [ inttoptr (i64 985162435264511 to ptr), %entry ], [ null, %if.then ]
%cmp4 = icmp eq ptr %d.0, inttoptr (i64 985162435264511 to ptr)
%cmp6 = icmp eq ptr %d.0, inttoptr (i64 985162418487296 to ptr)
%or = or i1 %cmp4, %cmp6
br i1 %or, label %if.then8, label %if.end9
if.then8: ; preds = %if.end3
ret i32 1
if.end9: ; preds = %if.then8, %if.end3
ret i32 undef
}
; <rdar://problem/16394449>
define i64 @switch_test1(i64 %a) {
; CHECK-LABEL: @switch_test1
; CHECK: %0 = phi i64 [ %const, %case2 ], [ %const_mat, %Entry ], [ %const_mat, %Entry ]
Entry:
%sel = add i64 %a, 4519019440
switch i64 %sel, label %fail [
i64 462, label %continuation
i64 449, label %case2
i64 443, label %continuation
]
case2:
br label %continuation
continuation:
%0 = phi i64 [ 4519019440, %case2 ], [ 4519019460, %Entry ], [ 4519019460, %Entry ]
ret i64 0;
fail:
ret i64 -1;
}
define i64 @switch_test2(i64 %a) {
; CHECK-LABEL: @switch_test2
; CHECK: %2 = phi ptr [ %1, %case2 ], [ %0, %Entry ], [ %0, %Entry ]
Entry:
%sel = add i64 %a, 4519019440
switch i64 %sel, label %fail [
i64 462, label %continuation
i64 449, label %case2
i64 443, label %continuation
]
case2:
br label %continuation
continuation:
%0 = phi ptr [ inttoptr(i64 4519019440 to ptr), %case2 ], [ inttoptr(i64 4519019460 to ptr), %Entry ], [ inttoptr(i64 4519019460 to ptr), %Entry ]
ret i64 0;
fail:
ret i64 -1;
}