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
93 lines
3.5 KiB
LLVM
93 lines
3.5 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: opt -passes='print<access-info>' -disable-output %s 2>&1 | FileCheck %s
|
|
|
|
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
|
|
|
; Note: The datalayout for the test specifies a 32 bit index type.
|
|
|
|
; No UB: accessing last valid byte, pointer after the object
|
|
; doesnt wrap (%p + 2147483647).
|
|
define void @pointer_after_object_does_not_wrap(i32 %y, ptr %s, ptr %p) {
|
|
; CHECK-LABEL: 'pointer_after_object_does_not_wrap'
|
|
; CHECK-NEXT: loop:
|
|
; CHECK-NEXT: Memory dependences are safe with run-time checks
|
|
; CHECK-NEXT: Dependences:
|
|
; CHECK-NEXT: Run-time memory checks:
|
|
; CHECK-NEXT: Check 0:
|
|
; CHECK-NEXT: Comparing group GRP0:
|
|
; CHECK-NEXT: %gep2.iv = getelementptr inbounds i8, ptr %p, i32 %iv
|
|
; CHECK-NEXT: Against group GRP1:
|
|
; CHECK-NEXT: %gep1.iv = getelementptr inbounds i8, ptr %s, i32 %iv
|
|
; CHECK-NEXT: Grouped accesses:
|
|
; CHECK-NEXT: Group GRP0:
|
|
; CHECK-NEXT: (Low: (%y + %p) High: (2147483647 + %p))
|
|
; CHECK-NEXT: Member: {(%y + %p),+,1}<nw><%loop>
|
|
; CHECK-NEXT: Group GRP1:
|
|
; CHECK-NEXT: (Low: (%y + %s) High: (2147483647 + %s))
|
|
; CHECK-NEXT: Member: {(%y + %s),+,1}<nw><%loop>
|
|
; CHECK-EMPTY:
|
|
; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop.
|
|
; CHECK-NEXT: SCEV assumptions:
|
|
; CHECK-EMPTY:
|
|
; CHECK-NEXT: Expressions re-written:
|
|
;
|
|
entry:
|
|
br label %loop
|
|
|
|
loop:
|
|
%iv = phi i32 [ %y, %entry ], [ %iv.next, %loop ]
|
|
%gep1.iv = getelementptr inbounds i8 , ptr %s, i32 %iv
|
|
%load = load i8, ptr %gep1.iv, align 4
|
|
%gep2.iv = getelementptr inbounds i8, ptr %p, i32 %iv
|
|
store i8 %load, ptr %gep2.iv, align 4
|
|
%iv.next = add nsw i32 %iv, 1
|
|
%c.2 = icmp slt i32 %iv.next, 2147483647
|
|
br i1 %c.2, label %loop, label %exit
|
|
|
|
exit:
|
|
ret void
|
|
}
|
|
|
|
; UB: accessing %p + 2147483646 and p + 2147483647.
|
|
; Pointer the past the object would wrap in signed.
|
|
define void @pointer_after_object_would_wrap(i32 %y, ptr %s, ptr %p) {
|
|
; CHECK-LABEL: 'pointer_after_object_would_wrap'
|
|
; CHECK-NEXT: loop:
|
|
; CHECK-NEXT: Memory dependences are safe with run-time checks
|
|
; CHECK-NEXT: Dependences:
|
|
; CHECK-NEXT: Run-time memory checks:
|
|
; CHECK-NEXT: Check 0:
|
|
; CHECK-NEXT: Comparing group GRP0:
|
|
; CHECK-NEXT: %gep2.iv = getelementptr inbounds i8, ptr %p, i32 %iv
|
|
; CHECK-NEXT: Against group GRP1:
|
|
; CHECK-NEXT: %gep1.iv = getelementptr inbounds i8, ptr %s, i32 %iv
|
|
; CHECK-NEXT: Grouped accesses:
|
|
; CHECK-NEXT: Group GRP0:
|
|
; CHECK-NEXT: (Low: (%y + %p) High: (-2147483648 + %p))
|
|
; CHECK-NEXT: Member: {(%y + %p),+,1}<nw><%loop>
|
|
; CHECK-NEXT: Group GRP1:
|
|
; CHECK-NEXT: (Low: (%y + %s) High: (-2147483648 + %s))
|
|
; CHECK-NEXT: Member: {(%y + %s),+,1}<nw><%loop>
|
|
; CHECK-EMPTY:
|
|
; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop.
|
|
; CHECK-NEXT: SCEV assumptions:
|
|
; CHECK-EMPTY:
|
|
; CHECK-NEXT: Expressions re-written:
|
|
;
|
|
entry:
|
|
br label %loop
|
|
|
|
loop:
|
|
%iv = phi i32 [ %y, %entry ], [ %iv.next, %loop ]
|
|
%gep1.iv = getelementptr inbounds i8 , ptr %s, i32 %iv
|
|
%load = load i16, ptr %gep1.iv, align 4
|
|
%gep2.iv = getelementptr inbounds i8, ptr %p, i32 %iv
|
|
store i16 %load, ptr %gep2.iv, align 4
|
|
%iv.next = add nsw i32 %iv, 1
|
|
%c.2 = icmp slt i32 %iv.next, 2147483647
|
|
br i1 %c.2, label %loop, label %exit
|
|
|
|
exit:
|
|
ret void
|
|
}
|