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
68 lines
2.3 KiB
LLVM
68 lines
2.3 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
|
|
; RUN: opt -S -passes=globalopt -o - < %s | FileCheck %s
|
|
|
|
; No malloc promotion with non-null check.
|
|
|
|
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
@_ZL3g_i = internal global ptr null, align 8
|
|
@_ZL3g_j = global ptr null, align 8
|
|
@.str = private unnamed_addr constant [2 x i8] c"0\00", align 1
|
|
@.str.1 = private unnamed_addr constant [2 x i8] c"1\00", align 1
|
|
|
|
define dso_local i32 @main() {
|
|
; CHECK-LABEL: define {{[^@]+}}@main() local_unnamed_addr {
|
|
; CHECK-NEXT: bb:
|
|
; CHECK-NEXT: store ptr null, ptr @_ZL3g_i, align 8
|
|
; CHECK-NEXT: call fastcc void @_ZL13PutsSomethingv()
|
|
; CHECK-NEXT: ret i32 0
|
|
;
|
|
bb:
|
|
store ptr null, ptr @_ZL3g_i, align 8
|
|
call void @_ZL13PutsSomethingv()
|
|
ret i32 0
|
|
}
|
|
|
|
define internal void @_ZL13PutsSomethingv() {
|
|
; CHECK-LABEL: define {{[^@]+}}@_ZL13PutsSomethingv() unnamed_addr {
|
|
; CHECK-NEXT: bb:
|
|
; CHECK-NEXT: [[I:%.*]] = load ptr, ptr @_ZL3g_i, align 8
|
|
; CHECK-NEXT: [[I1:%.*]] = load ptr, ptr @_ZL3g_j, align 8
|
|
; CHECK-NEXT: [[CMP:%.*]] = icmp eq ptr [[I]], [[I1]]
|
|
; CHECK-NEXT: br i1 [[CMP]], label [[BB2:%.*]], label [[BB6:%.*]]
|
|
; CHECK: bb2:
|
|
; CHECK-NEXT: [[I3:%.*]] = call noalias ptr @malloc(i64 4)
|
|
; CHECK-NEXT: store ptr [[I3]], ptr @_ZL3g_i, align 8
|
|
; CHECK-NEXT: [[I5:%.*]] = call i32 @puts(ptr @.str)
|
|
; CHECK-NEXT: br label [[BB8:%.*]]
|
|
; CHECK: bb6:
|
|
; CHECK-NEXT: [[I7:%.*]] = call i32 @puts(ptr @.str.1)
|
|
; CHECK-NEXT: br label [[BB8]]
|
|
; CHECK: bb8:
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
bb:
|
|
%i = load ptr, ptr @_ZL3g_i, align 8
|
|
%i1 = load ptr, ptr @_ZL3g_j, align 8
|
|
%cmp = icmp eq ptr %i, %i1
|
|
br i1 %cmp, label %bb2, label %bb6
|
|
|
|
bb2: ; preds = %bb
|
|
%i3 = call noalias ptr @malloc(i64 4)
|
|
store ptr %i3, ptr @_ZL3g_i, align 8
|
|
%i5 = call i32 @puts(ptr @.str)
|
|
br label %bb8
|
|
|
|
bb6: ; preds = %bb
|
|
%i7 = call i32 @puts(ptr @.str.1)
|
|
br label %bb8
|
|
|
|
bb8: ; preds = %bb6, %bb2
|
|
ret void
|
|
}
|
|
|
|
declare dso_local noalias ptr @malloc(i64)
|
|
|
|
declare dso_local i32 @puts(ptr nocapture readonly)
|