1; RUN: opt -basicaa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s 2; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s 3 4; Function Attrs: ssp uwtable 5define i32 @main() { 6entry: 7; CHECK: 1 = MemoryDef(liveOnEntry) 8; CHECK-NEXT: %call = call noalias i8* @_Znwm(i64 4) 9 %call = call noalias i8* @_Znwm(i64 4) 10 %0 = bitcast i8* %call to i32* 11; CHECK: 2 = MemoryDef(1) 12; CHECK-NEXT: %call1 = call noalias i8* @_Znwm(i64 4) 13 %call1 = call noalias i8* @_Znwm(i64 4) 14 %1 = bitcast i8* %call1 to i32* 15; CHECK: 3 = MemoryDef(2) 16; CHECK-NEXT: store i32 5, i32* %0, align 4 17 store i32 5, i32* %0, align 4 18; CHECK: 4 = MemoryDef(3) 19; CHECK-NEXT: store i32 7, i32* %1, align 4 20 store i32 7, i32* %1, align 4 21; CHECK: MemoryUse(3) MustAlias 22; CHECK-NEXT: %2 = load i32, i32* %0, align 4 23 %2 = load i32, i32* %0, align 4 24; CHECK: MemoryUse(4) MustAlias 25; CHECK-NEXT: %3 = load i32, i32* %1, align 4 26 %3 = load i32, i32* %1, align 4 27; CHECK: MemoryUse(3) MustAlias 28; CHECK-NEXT: %4 = load i32, i32* %0, align 4 29 %4 = load i32, i32* %0, align 4 30; CHECK: MemoryUse(4) MustAlias 31; CHECK-NEXT: %5 = load i32, i32* %1, align 4 32 %5 = load i32, i32* %1, align 4 33 %add = add nsw i32 %3, %5 34 ret i32 %add 35} 36 37declare noalias i8* @_Znwm(i64) 38