1 ; RUN: opt -basic-aa -memoryssa -enable-new-pm=0 -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
4 ; Ensures that llvm.experimental.noalias.scope.decl is treated as not reading or writing memory.
6 declare void @llvm.experimental.noalias.scope.decl(metadata)
8 define i32 @foo(i32* %a, i32* %b, i1 %c) {
9 ; CHECK: 1 = MemoryDef(liveOnEntry)
10 ; CHECK-NEXT: store i32 4
11 store i32 4, i32* %a, align 4
12 ; CHECK-NOT: MemoryDef
13 ; CHECK: call void @llvm.experimental.noalias.scope.decl
14 call void @llvm.experimental.noalias.scope.decl(metadata !0)
16 ; CHECK-NEXT: %1 = load i32
17 %1 = load i32, i32* %a, align 4
23 !1 = distinct !{ !1, !2, !"foo: var" }
24 !2 = distinct !{ !2, !"foo" }