Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/LICM/2007-09-17-PromoteValue.ll
T
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

62 lines
1.8 KiB
LLVM

; ModuleID = 'PR1657.bc'
; Do not promote getelementptr because it may exposes load from a null pointer
; and store from a null pointer which are covered by
; icmp eq ptr null, null condition.
; RUN: opt < %s -passes=licm -S | not grep promoted
%struct.decision = type { i8, ptr }
define i32 @main() {
entry:
br label %blah.i
blah.i: ; preds = %cond_true.i, %entry
%tmp3.i = icmp eq ptr null, null ; <i1> [#uses=1]
br i1 %tmp3.i, label %clear_modes.exit, label %cond_true.i
cond_true.i: ; preds = %blah.i
%tmp1.i = getelementptr %struct.decision, ptr null, i32 0, i32 0 ; <ptr> [#uses=1]
store i8 0, ptr %tmp1.i
br label %blah.i
clear_modes.exit: ; preds = %blah.i
call void @exit( i32 0 )
unreachable
}
define i32 @f(ptr %ptr) {
entry:
br label %loop.head
loop.head: ; preds = %cond.true, %entry
%x = phi ptr [ %ptr, %entry ], [ %ptr.i, %cond.true ] ; <ptr> [#uses=1]
%tmp3.i = icmp ne ptr %ptr, %x ; <i1> [#uses=1]
br i1 %tmp3.i, label %cond.true, label %exit
cond.true: ; preds = %loop.head
%ptr.i = getelementptr i8, ptr %ptr, i32 0 ; <ptr> [#uses=2]
store i8 0, ptr %ptr.i
br label %loop.head
exit: ; preds = %loop.head
ret i32 0
}
define i32 @f2(ptr %p, ptr %q) {
entry:
br label %loop.head
loop.head: ; preds = %cond.true, %entry
%tmp3.i = icmp eq ptr null, %q ; <i1> [#uses=1]
br i1 %tmp3.i, label %exit, label %cond.true
cond.true: ; preds = %loop.head
%ptr.i = getelementptr i8, ptr %p, i32 0 ; <ptr> [#uses=2]
store i8 0, ptr %ptr.i
br label %loop.head
exit: ; preds = %loop.head
ret i32 0
}
declare void @exit(i32)