1; RUN: opt < %s -aa-pipeline=basic-aa -passes=aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s 2 3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 4 5%struct = type { i32, i32, i32 } 6 7; CHECK-LABEL: test_simple 8 9; CHECK-DAG: MustAlias: %struct* %st, %struct* %sta 10 11; CHECK-DAG: MayAlias: %struct* %st, i32* %x 12; CHECK-DAG: MayAlias: %struct* %st, i32* %y 13; CHECK-DAG: MayAlias: %struct* %st, i32* %z 14 15; CHECK-DAG: NoAlias: i32* %x, i32* %y 16; CHECK-DAG: NoAlias: i32* %x, i32* %z 17; CHECK-DAG: NoAlias: i32* %y, i32* %z 18 19; CHECK-DAG: MayAlias: %struct* %st, %struct* %y_12 20; CHECK-DAG: MayAlias: i32* %x, %struct* %y_12 21; CHECK-DAG: MayAlias: i32* %x, i80* %y_10 22 23; CHECK-DAG: MayAlias: %struct* %st, i64* %y_8 24; CHECK-DAG: MayAlias: i64* %y_8, i32* %z 25; CHECK-DAG: NoAlias: i32* %x, i64* %y_8 26 27; CHECK-DAG: MustAlias: i32* %y, %struct* %y_12 28; CHECK-DAG: MustAlias: i32* %y, i64* %y_8 29; CHECK-DAG: MustAlias: i32* %y, i80* %y_10 30 31define void @test_simple(%struct* %st, i64 %i, i64 %j, i64 %k) { 32 %x = getelementptr inbounds %struct, %struct* %st, i64 %i, i32 0 33 %y = getelementptr inbounds %struct, %struct* %st, i64 %j, i32 1 34 %sta = call %struct* @func2(%struct* %st) 35 %z = getelementptr inbounds %struct, %struct* %sta, i64 %k, i32 2 36 %y_12 = bitcast i32* %y to %struct* 37 %y_10 = bitcast i32* %y to i80* 38 %ya = call i32* @func1(i32* %y) 39 %y_8 = bitcast i32* %ya to i64* 40 load %struct, %struct* %st 41 load %struct, %struct* %sta 42 load i32, i32* %x 43 load i32, i32* %y 44 load i32, i32* %z 45 load %struct, %struct* %y_12 46 load i80, i80* %y_10 47 load i64, i64* %y_8 48 ret void 49} 50 51declare i32* @func1(i32* returned) nounwind 52declare %struct* @func2(%struct* returned) nounwind 53 54