-; RUN: opt -basic-aa -aa-eval -print-all-alias-modref-info %s 2>&1 | FileCheck %s
+; RUN: opt -basic-aa -aa-eval -print-all-alias-modref-info -disable-output %s 2>&1 | FileCheck %s
target datalayout = "p:64:64:64"
define void @may_overflow_mul_add_i8([16 x i8]* %ptr, i8 %idx) {
; CHECK-LABEL: Function: may_overflow_mul_add_i8: 3 pointers, 0 call sites
; CHECK-NEXT: MayAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.6
+; CHECK-NEXT: PartialAlias (off 6): [16 x i8]* %ptr, i8* %gep.6
; CHECK-NEXT: MayAlias: i8* %gep.6, i8* %gep.idx
;
%mul = mul i8 %idx, 5
define void @nuw_nsw_mul_add_i8([16 x i8]* %ptr, i8 %idx) {
; CHECK-LABEL: Function: nuw_nsw_mul_add_i8: 3 pointers, 0 call sites
; CHECK-NEXT: MayAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.6
+; CHECK-NEXT: PartialAlias (off 6): [16 x i8]* %ptr, i8* %gep.6
; CHECK-NEXT: NoAlias: i8* %gep.6, i8* %gep.idx
;
%mul = mul nuw nsw i8 %idx, 5
define void @may_overflow_mul_sub_i8([16 x i8]* %ptr, i8 %idx) {
; CHECK-LABEL: Function: may_overflow_mul_sub_i8: 3 pointers, 0 call sites
; CHECK-NEXT: MayAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.3
+; CHECK-NEXT: PartialAlias (off 3): [16 x i8]* %ptr, i8* %gep.3
; CHECK-NEXT: MayAlias: i8* %gep.3, i8* %gep.idx
;
%mul = mul i8 %idx, 5
define void @nuw_nsw_mul_sub_i8([16 x i8]* %ptr, i8 %idx) {
; CHECK-LABEL: Function: nuw_nsw_mul_sub_i8: 3 pointers, 0 call sites
; CHECK-NEXT: MayAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.3
+; CHECK-NEXT: PartialAlias (off 3): [16 x i8]* %ptr, i8* %gep.3
; CHECK-NEXT: NoAlias: i8* %gep.3, i8* %gep.idx
;
%mul = mul nuw nsw i8 %idx, 5
define void @may_overflow_mul_sub_i64([16 x i8]* %ptr, i64 %idx) {
; CHECK-LABEL: Function: may_overflow_mul_sub_i64: 3 pointers, 0 call sites
; CHECK-NEXT: MayAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.3
+; CHECK-NEXT: PartialAlias (off 3): [16 x i8]* %ptr, i8* %gep.3
; CHECK-NEXT: NoAlias: i8* %gep.3, i8* %gep.idx
;
%mul = mul i64 %idx, 5
define void @nuw_nsw_mul_sub_i64([16 x i8]* %ptr, i64 %idx) {
; CHECK-LABEL: Function: nuw_nsw_mul_sub_i64: 3 pointers, 0 call sites
; CHECK-NEXT: MayAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.3
+; CHECK-NEXT: PartialAlias (off 3): [16 x i8]* %ptr, i8* %gep.3
; CHECK-NEXT: NoAlias: i8* %gep.3, i8* %gep.idx
;
%mul = mul nuw nsw i64 %idx, 5
define void @only_nsw_mul_sub_i64([16 x i8]* %ptr, i64 %idx) {
; CHECK-LABEL: Function: only_nsw_mul_sub_i64: 3 pointers, 0 call sites
; CHECK-NEXT: MayAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.3
+; CHECK-NEXT: PartialAlias (off 3): [16 x i8]* %ptr, i8* %gep.3
; CHECK-NEXT: NoAlias: i8* %gep.3, i8* %gep.idx
;
%mul = mul nsw i64 %idx, 5
define void @only_nuw_mul_sub_i64([16 x i8]* %ptr, i64 %idx) {
; CHECK-LABEL: Function: only_nuw_mul_sub_i64: 3 pointers, 0 call sites
; CHECK-NEXT: MayAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.3
+; CHECK-NEXT: PartialAlias (off 3): [16 x i8]* %ptr, i8* %gep.3
; CHECK-NEXT: NoAlias: i8* %gep.3, i8* %gep.idx
;
%mul = mul nuw i64 %idx, 5
define void @may_overflow_mul_pow2_sub_i64([16 x i8]* %ptr, i64 %idx) {
; CHECK-LABEL: Function: may_overflow_mul_pow2_sub_i64: 3 pointers, 0 call sites
; CHECK-NEXT: MayAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.3
+; CHECK-NEXT: PartialAlias (off 3): [16 x i8]* %ptr, i8* %gep.3
; CHECK-NEXT: NoAlias: i8* %gep.3, i8* %gep.idx
;
%mul = mul i64 %idx, 8
define void @mul_pow2_sub_nsw_nuw_i64([16 x i8]* %ptr, i64 %idx) {
; CHECK-LABEL: Function: mul_pow2_sub_nsw_nuw_i64: 3 pointers, 0 call sites
; CHECK-NEXT: MayAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.3
+; CHECK-NEXT: PartialAlias (off 3): [16 x i8]* %ptr, i8* %gep.3
; CHECK-NEXT: NoAlias: i8* %gep.3, i8* %gep.idx
;
%mul = mul i64 %idx, 8
define void @may_overflow_shl_sub_i64([16 x i8]* %ptr, i64 %idx) {
; CHECK-LABEL: Function: may_overflow_shl_sub_i64: 3 pointers, 0 call sites
; CHECK-NEXT: MayAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.3
+; CHECK-NEXT: PartialAlias (off 3): [16 x i8]* %ptr, i8* %gep.3
; CHECK-NEXT: MayAlias: i8* %gep.3, i8* %gep.idx
;
%mul = shl i64 %idx, 2
define void @shl_sub_nsw_nuw_i64([16 x i8]* %ptr, i64 %idx) {
; CHECK-LABEL: Function: shl_sub_nsw_nuw_i64: 3 pointers, 0 call sites
; CHECK-NEXT: MayAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.3
+; CHECK-NEXT: PartialAlias (off 3): [16 x i8]* %ptr, i8* %gep.3
; CHECK-NEXT: NoAlias: i8* %gep.3, i8* %gep.idx
;
%mul = shl i64 %idx, 3
define void @may_overflow_i32_sext([16 x i8]* %ptr, i32 %idx) {
; CHECK-LABEL: Function: may_overflow_i32_sext: 3 pointers, 0 call sites
; CHECK-NEXT: MayAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.3
+; CHECK-NEXT: PartialAlias (off 3): [16 x i8]* %ptr, i8* %gep.3
; CHECK-NEXT: MayAlias: i8* %gep.3, i8* %gep.idx
;
%mul = mul i32 %idx, 678152731
define void @nuw_nsw_i32_sext([16 x i8]* %ptr, i32 %idx) {
; CHECK-LABEL: Function: nuw_nsw_i32_sext: 3 pointers, 0 call sites
; CHECK-NEXT: NoAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.3
+; CHECK-NEXT: PartialAlias (off 3): [16 x i8]* %ptr, i8* %gep.3
; CHECK-NEXT: NoAlias: i8* %gep.3, i8* %gep.idx
;
%mul = mul nuw nsw i32 %idx, 678152731
define void @may_overflow_i32_zext([16 x i8]* %ptr, i32 %idx) {
; CHECK-LABEL: Function: may_overflow_i32_zext: 3 pointers, 0 call sites
; CHECK-NEXT: MayAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.3
+; CHECK-NEXT: PartialAlias (off 3): [16 x i8]* %ptr, i8* %gep.3
; CHECK-NEXT: MayAlias: i8* %gep.3, i8* %gep.idx
;
%mul = mul i32 %idx, 678152731
define void @nuw_nsw_i32_zext([16 x i8]* %ptr, i32 %idx) {
; CHECK-LABEL: Function: nuw_nsw_i32_zext: 3 pointers, 0 call sites
; CHECK-NEXT: NoAlias: [16 x i8]* %ptr, i8* %gep.idx
-; CHECK-NEXT: PartialAlias: [16 x i8]* %ptr, i8* %gep.3
+; CHECK-NEXT: PartialAlias (off 3): [16 x i8]* %ptr, i8* %gep.3
; CHECK-NEXT: NoAlias: i8* %gep.3, i8* %gep.idx
;
%mul = mul nuw nsw i32 %idx, 678152731
; CHECK-LABEL: Function: notmust: 6 pointers, 0 call sites
; CHECK: MustAlias: [2 x i32]* %tab, i8* %0
-; CHECK: PartialAlias: [2 x i32]* %tab, i32* %arrayidx
+; CHECK: PartialAlias (off 4): [2 x i32]* %tab, i32* %arrayidx
; CHECK: NoAlias: i32* %arrayidx, i8* %0
; CHECK: MustAlias: [2 x i32]* %tab, i32* %arrayidx1
; CHECK: MustAlias: i32* %arrayidx1, i8* %0
; CHECK: MustAlias: [10 x i32]* %tab, i8* %0
; CHECK: MustAlias: [10 x i32]* %tab, i32* %arrayidx
; CHECK: MustAlias: i32* %arrayidx, i8* %0
-; CHECK: PartialAlias: [10 x i32]* %tab, i32* %arrayidx1
+; CHECK: PartialAlias (off 36): [10 x i32]* %tab, i32* %arrayidx1
; CHECK: NoAlias: i32* %arrayidx1, i8* %0
; CHECK: NoAlias: i32* %arrayidx, i32* %arrayidx1
; CHECK: MayAlias: [10 x i32]* %tab, i32* %p.addr.05.i
; CHECK-LABEL: Function: negative: 6 pointers, 1 call sites
; CHECK: NoAlias: [3 x i16]* %int_arr.10, i16** %argv.6.par
; CHECK: NoAlias: i16* %_tmp1, i16** %argv.6.par
-; CHECK: PartialAlias: [3 x i16]* %int_arr.10, i16* %_tmp1
+; CHECK: PartialAlias (off 4): [3 x i16]* %int_arr.10, i16* %_tmp1
; CHECK: NoAlias: i16* %ls1.9.0, i16** %argv.6.par
; CHECK: MayAlias: [3 x i16]* %int_arr.10, i16* %ls1.9.0
; CHECK: MayAlias: i16* %_tmp1, i16* %ls1.9.0
; CHECK: MayAlias: i16* %_tmp1, i16* %_tmp7
; CHECK: NoAlias: i16* %_tmp7, i16* %ls1.9.0
; CHECK: NoAlias: i16* %_tmp11, i16** %argv.6.par
-; CHECK: PartialAlias: [3 x i16]* %int_arr.10, i16* %_tmp11
+; CHECK: PartialAlias (off 2): [3 x i16]* %int_arr.10, i16* %_tmp11
; CHECK: NoAlias: i16* %_tmp1, i16* %_tmp11
; CHECK: MayAlias: i16* %_tmp11, i16* %ls1.9.0
; CHECK: MayAlias: i16* %_tmp11, i16* %_tmp7