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

67 lines
3.2 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 2
; RUN: opt -passes='print<scalar-evolution>' -disable-output %s 2>&1 | FileCheck %s
define i64 @alloca_non_null() {
; CHECK-LABEL: 'alloca_non_null'
; CHECK-NEXT: Classifying expressions for: @alloca_non_null
; CHECK-NEXT: %alloca = alloca i32, align 4
; CHECK-NEXT: --> %alloca U: [4,-7) S: [-9223372036854775808,9223372036854775805)
; CHECK-NEXT: %int = ptrtoint ptr %alloca to i64
; CHECK-NEXT: --> (ptrtoint ptr %alloca to i64) U: [4,-7) S: [-9223372036854775808,9223372036854775805)
; CHECK-NEXT: Determining loop execution counts for: @alloca_non_null
;
%alloca = alloca i32, align 4
%int = ptrtoint ptr %alloca to i64
ret i64 %int
}
define i64 @alloca_maybe_null() {
; CHECK-LABEL: 'alloca_maybe_null'
; CHECK-NEXT: Classifying expressions for: @alloca_maybe_null
; CHECK-NEXT: %alloca = alloca i32, align 4, addrspace(1)
; CHECK-NEXT: --> %alloca U: [0,-7) S: [-9223372036854775808,9223372036854775805)
; CHECK-NEXT: %int = ptrtoint ptr addrspace(1) %alloca to i64
; CHECK-NEXT: --> (ptrtoint ptr addrspace(1) %alloca to i64) U: [0,-7) S: [-9223372036854775808,9223372036854775805)
; CHECK-NEXT: Determining loop execution counts for: @alloca_maybe_null
;
%alloca = alloca i32, align 4, addrspace(1)
%int = ptrtoint ptr addrspace(1) %alloca to i64
ret i64 %int
}
define void @alloca_icmp_null_exit_count() {
; CHECK-LABEL: 'alloca_icmp_null_exit_count'
; CHECK-NEXT: Classifying expressions for: @alloca_icmp_null_exit_count
; CHECK-NEXT: %alloca = alloca [3 x i32], align 4
; CHECK-NEXT: --> %alloca U: [4,-15) S: [-9223372036854775808,9223372036854775805)
; CHECK-NEXT: %alloca.end = getelementptr inbounds i32, ptr %alloca, i64 3
; CHECK-NEXT: --> (12 + %alloca)<nuw> U: [16,-3) S: [-9223372036854775808,9223372036854775805)
; CHECK-NEXT: %ptr = phi ptr [ %ptr.next, %loop ], [ %alloca, %entry ]
; CHECK-NEXT: --> {%alloca,+,4}<nuw><%loop> U: [4,-7) S: [-9223372036854775808,9223372036854775805) Exits: (8 + %alloca)<nuw> LoopDispositions: { %loop: Computable }
; CHECK-NEXT: %ptr.next = getelementptr i32, ptr %ptr, i64 1
; CHECK-NEXT: --> {(4 + %alloca)<nuw>,+,4}<nuw><%loop> U: [8,-3) S: [-9223372036854775808,9223372036854775805) Exits: (12 + %alloca)<nuw> LoopDispositions: { %loop: Computable }
; CHECK-NEXT: %and = and i1 %cmp1, %cmp2
; CHECK-NEXT: --> (%cmp2 umin %cmp1) U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %loop: Variant }
; CHECK-NEXT: Determining loop execution counts for: @alloca_icmp_null_exit_count
; CHECK-NEXT: Loop %loop: backedge-taken count is i64 2
; CHECK-NEXT: Loop %loop: constant max backedge-taken count is i64 2
; CHECK-NEXT: Loop %loop: symbolic max backedge-taken count is i64 2
; CHECK-NEXT: Loop %loop: Trip multiple is 3
;
entry:
%alloca = alloca [3 x i32], align 4
%alloca.end = getelementptr inbounds i32, ptr %alloca, i64 3
br label %loop
loop:
%ptr = phi ptr [ %ptr.next, %loop ], [ %alloca, %entry ]
%ptr.next = getelementptr i32, ptr %ptr, i64 1
%cmp1 = icmp ne ptr %ptr.next, %alloca.end
%cmp2 = icmp ne ptr %ptr.next, null
%and = and i1 %cmp1, %cmp2
br i1 %and, label %loop, label %exit
exit:
ret void
}