brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 881a527 Raw
51 lines · plain
1; RUN: opt < %s -aa-pipeline=basic-aa -passes=aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s2 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_simple8 9; CHECK-DAG: MustAlias: %struct* %st, %struct* %sta10 11; CHECK-DAG: MayAlias: %struct* %st, i32* %x12; CHECK-DAG: MayAlias: %struct* %st, i32* %y13; CHECK-DAG: MayAlias: %struct* %st, i32* %z14 15; CHECK-DAG: NoAlias: i32* %x, i32* %y16; CHECK-DAG: NoAlias: i32* %x, i32* %z17; CHECK-DAG: NoAlias: i32* %y, i32* %z18 19; CHECK-DAG: MayAlias: %struct* %st, %struct* %y20; CHECK-DAG: MayAlias: i32* %x, %struct* %y21; CHECK-DAG: MayAlias: i32* %x, i80* %y22 23; CHECK-DAG: MayAlias: %struct* %st, i64* %ya24; CHECK-DAG: MayAlias: i64* %ya, i32* %z25; CHECK-DAG: NoAlias: i32* %x, i64* %ya26 27; CHECK-DAG: MustAlias: %struct* %y, i32* %y28; CHECK-DAG: MustAlias: i32* %y, i64* %ya29; CHECK-DAG: MustAlias: i80* %y, i32* %y30 31define void @test_simple(ptr %st, i64 %i, i64 %j, i64 %k) {32  %x = getelementptr inbounds %struct, ptr %st, i64 %i, i32 033  %y = getelementptr inbounds %struct, ptr %st, i64 %j, i32 134  %sta = call ptr @func2(ptr %st)35  %z = getelementptr inbounds %struct, ptr %sta, i64 %k, i32 236  %ya = call ptr @func1(ptr %y)37  load %struct, ptr %st38  load %struct, ptr %sta39  load i32, ptr %x40  load i32, ptr %y41  load i32, ptr %z42  load %struct, ptr %y43  load i80, ptr %y44  load i64, ptr %ya45  ret void46}47 48declare ptr @func1(ptr returned) nounwind49declare ptr @func2(ptr returned) nounwind50 51