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