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
85 lines
3.0 KiB
LLVM
85 lines
3.0 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
|
|
; RUN: opt -passes='require<profile-summary>,function(codegenprepare)' -mtriple=arm64_32-apple-ios %s -S -o - | FileCheck %s
|
|
|
|
define void @test_simple_sink(ptr %base, i64 %offset) {
|
|
; CHECK-LABEL: define void @test_simple_sink(
|
|
; CHECK-SAME: ptr [[BASE:%.*]], i64 [[OFFSET:%.*]]) {
|
|
; CHECK-NEXT: [[ADDR:%.*]] = getelementptr i1, ptr [[BASE]], i64 [[OFFSET]]
|
|
; CHECK-NEXT: [[TST:%.*]] = load i1, ptr [[ADDR]], align 1
|
|
; CHECK-NEXT: br i1 [[TST]], label [[NEXT:%.*]], label [[END:%.*]]
|
|
; CHECK: next:
|
|
; CHECK-NEXT: [[SUNKADDR:%.*]] = trunc i64 [[OFFSET]] to i32
|
|
; CHECK-NEXT: [[SUNKADDR1:%.*]] = getelementptr i8, ptr [[BASE]], i32 [[SUNKADDR]]
|
|
; CHECK-NEXT: [[TMP1:%.*]] = load volatile i1, ptr [[SUNKADDR1]], align 1
|
|
; CHECK-NEXT: ret void
|
|
; CHECK: end:
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%addr = getelementptr i1, ptr %base, i64 %offset
|
|
%tst = load i1, ptr %addr
|
|
br i1 %tst, label %next, label %end
|
|
|
|
next:
|
|
load volatile i1, ptr %addr
|
|
ret void
|
|
|
|
end:
|
|
ret void
|
|
}
|
|
|
|
define void @test_inbounds_sink(ptr %base, i64 %offset) {
|
|
; CHECK-LABEL: define void @test_inbounds_sink(
|
|
; CHECK-SAME: ptr [[BASE:%.*]], i64 [[OFFSET:%.*]]) {
|
|
; CHECK-NEXT: [[ADDR:%.*]] = getelementptr inbounds i1, ptr [[BASE]], i64 [[OFFSET]]
|
|
; CHECK-NEXT: [[TST:%.*]] = load i1, ptr [[ADDR]], align 1
|
|
; CHECK-NEXT: br i1 [[TST]], label [[NEXT:%.*]], label [[END:%.*]]
|
|
; CHECK: next:
|
|
; CHECK-NEXT: [[SUNKADDR:%.*]] = trunc i64 [[OFFSET]] to i32
|
|
; CHECK-NEXT: [[SUNKADDR1:%.*]] = getelementptr inbounds i8, ptr [[BASE]], i32 [[SUNKADDR]]
|
|
; CHECK-NEXT: [[TMP1:%.*]] = load volatile i1, ptr [[SUNKADDR1]], align 1
|
|
; CHECK-NEXT: ret void
|
|
; CHECK: end:
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%addr = getelementptr inbounds i1, ptr %base, i64 %offset
|
|
%tst = load i1, ptr %addr
|
|
br i1 %tst, label %next, label %end
|
|
|
|
next:
|
|
load volatile i1, ptr %addr
|
|
ret void
|
|
|
|
end:
|
|
ret void
|
|
}
|
|
|
|
; No address derived via an add can be guaranteed inbounds
|
|
define void @test_add_sink(ptr %base, i64 %offset) {
|
|
; CHECK-LABEL: define void @test_add_sink(
|
|
; CHECK-SAME: ptr [[BASE:%.*]], i64 [[OFFSET:%.*]]) {
|
|
; CHECK-NEXT: [[BASE64:%.*]] = ptrtoint ptr [[BASE]] to i64
|
|
; CHECK-NEXT: [[ADDR64:%.*]] = add nuw nsw i64 [[BASE64]], [[OFFSET]]
|
|
; CHECK-NEXT: [[ADDR:%.*]] = inttoptr i64 [[ADDR64]] to ptr
|
|
; CHECK-NEXT: [[TST:%.*]] = load i1, ptr [[ADDR]], align 1
|
|
; CHECK-NEXT: br i1 [[TST]], label [[NEXT:%.*]], label [[END:%.*]]
|
|
; CHECK: next:
|
|
; CHECK-NEXT: [[TMP1:%.*]] = inttoptr i64 [[ADDR64]] to ptr
|
|
; CHECK-NEXT: [[TMP2:%.*]] = load volatile i1, ptr [[TMP1]], align 1
|
|
; CHECK-NEXT: ret void
|
|
; CHECK: end:
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%base64 = ptrtoint ptr %base to i64
|
|
%addr64 = add nsw nuw i64 %base64, %offset
|
|
%addr = inttoptr i64 %addr64 to ptr
|
|
%tst = load i1, ptr %addr
|
|
br i1 %tst, label %next, label %end
|
|
|
|
next:
|
|
load volatile i1, ptr %addr
|
|
ret void
|
|
|
|
end:
|
|
ret void
|
|
}
|