1 ; RUN: opt -basicaa -aa-eval -print-no-aliases -disable-output %s 2>&1 | FileCheck %s
3 %struct = type <{ [20 x i64] }>
5 ; CHECK-LABEL: Function: test_noalias: 4 pointers, 1 call sites
6 ; CHECK-NEXT: NoAlias: %struct* %ptr1, i64* %ptr2
7 ; CHECK-NEXT: NoAlias: %struct* %addr.ptr, i64* %ptr2
8 ; CHECK-NEXT: NoAlias: i64* %gep, i64* %ptr2
9 define void @test_noalias(%struct* noalias %ptr1, i64* %ptr2, i64 %offset) {
11 %addr.ptr = call %struct* @llvm.ptrmask.p0s_struct.p0s.struct.i64(%struct* %ptr1, i64 72057594037927928)
12 store i64 10, i64* %ptr2
13 %gep = getelementptr inbounds %struct, %struct* %addr.ptr, i64 0, i32 0, i64 %offset
14 store i64 1, i64* %gep, align 8
18 ; CHECK-NEXT: Function: test_alias: 4 pointers, 1 call sites
20 define void @test_alias(%struct* %ptr1, i64* %ptr2, i64 %offset) {
22 %addr.ptr = call %struct* @llvm.ptrmask.p0s_struct.p0s.struct.i64(%struct* %ptr1, i64 72057594037927928)
23 store i64 10, i64* %ptr2
24 %gep = getelementptr inbounds %struct, %struct* %addr.ptr, i64 0, i32 0, i64 %offset
25 store i64 1, i64* %gep, align 8
29 declare %struct* @llvm.ptrmask.p0s_struct.p0s.struct.i64(%struct*, i64)