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

80 lines
3.0 KiB
LLVM

; RUN: opt < %s -aa-pipeline=basic-aa -passes=aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
@G = global [10 x i32] zeroinitializer, align 4
define void @select_in_gep1(i1 %c, i64 %x) {
entry:
; CHECK-LABEL: Function: select_in_gep1
; CHECK: NoAlias: i32* %arrayidx1, i32* %arrayidx2
%add1_ = add nsw i64 %x, 1
%add2_ = add nsw i64 %x, 2
%select_ = select i1 %c, i64 %add1_, i64 %add2_
%arrayidx1 = getelementptr inbounds [10 x i32], ptr @G, i64 0, i64 %select_
store i32 42, ptr %arrayidx1, align 4
%arrayidx2 = getelementptr inbounds [10 x i32], ptr @G, i64 0, i64 %x
store i32 43, ptr %arrayidx2, align 4
ret void
}
define void @select_in_gep2(i1 %c, i64 %x) {
entry:
; TODO: should be "NoAlias" here as well.
; CHECK-LABEL: Function: select_in_gep2
; CHECK: MayAlias: i32* %arrayidx1, i32* %arrayidx2
%add1_ = add nsw i64 %x, 1
%add2_ = add nsw i64 %x, 2
%add3_ = add nsw i64 %x, 3
%select_ = select i1 %c, i64 %add1_, i64 %add2_
%arrayidx1 = getelementptr inbounds [10 x i32], ptr @G, i64 0, i64 %select_
store i32 42, ptr %arrayidx1, align 4
%arrayidx2 = getelementptr inbounds [10 x i32], ptr @G, i64 0, i64 %add3_
store i32 43, ptr %arrayidx2, align 4
ret void
}
define void @two_selects_in_gep_same_cond(i1 %c, i64 %x) {
entry:
; CHECK-LABEL: Function: two_selects_in_gep_same_cond
; CHECK: NoAlias: i32* %arrayidx1, i32* %arrayidx2
%add1_ = add nsw i64 %x, 1
%add2_ = add nsw i64 %x, 2
%select1_ = select i1 %c, i64 %x, i64 %add1_
%select2_ = select i1 %c, i64 %add2_, i64 %x
%arrayidx1 = getelementptr inbounds [10 x i32], ptr @G, i64 0, i64 %select1_
store i32 42, ptr %arrayidx1, align 4
%arrayidx2 = getelementptr inbounds [10 x i32], ptr @G, i64 0, i64 %select2_
store i32 43, ptr %arrayidx2, align 4
ret void
}
define void @two_selects_in_gep_different_cond1(i1 %c1, i1 %c2, i64 %x) {
entry:
; CHECK-LABEL: Function: two_selects_in_gep_different_cond1
; CHECK: NoAlias: i32* %arrayidx1, i32* %arrayidx2
%add1_ = add nsw i64 %x, 1
%add2_ = add nsw i64 %x, 2
%add3_ = add nsw i64 %x, 3
%add4_ = add nsw i64 %x, 4
%select1_ = select i1 %c1, i64 %add1_, i64 %add2_
%select2_ = select i1 %c2, i64 %add3_, i64 %add4_
%arrayidx1 = getelementptr inbounds [10 x i32], ptr @G, i64 0, i64 %select1_
store i32 42, ptr %arrayidx1, align 4
%arrayidx2 = getelementptr inbounds [10 x i32], ptr @G, i64 0, i64 %select2_
store i32 43, ptr %arrayidx2, align 4
ret void
}
define void @two_selects_in_gep_different_cond2(i1 %c1, i1 %c2, i64 %x) {
entry:
; CHECK-LABEL: Function: two_selects_in_gep_different_cond2
; CHECK: MayAlias: i32* %arrayidx1, i32* %arrayidx2
%add1_ = add nsw i64 %x, 1
%add2_ = add nsw i64 %x, 2
%select1_ = select i1 %c1, i64 %x, i64 %add1_
%select2_ = select i1 %c2, i64 %x, i64 %add2_
%arrayidx1 = getelementptr inbounds [10 x i32], ptr @G, i64 0, i64 %select1_
store i32 42, ptr %arrayidx1, align 4
%arrayidx2 = getelementptr inbounds [10 x i32], ptr @G, i64 0, i64 %select2_
store i32 43, ptr %arrayidx2, align 4
ret void
}