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; Ensures that volatile stores/loads count as MemoryDefs 5 6define i32 @foo() { 7 %1 = alloca i32, align 4 8; CHECK: 1 = MemoryDef(liveOnEntry) 9; CHECK-NEXT: store volatile i32 4 10 store volatile i32 4, i32* %1, align 4 11; CHECK: 2 = MemoryDef(1) 12; CHECK-NEXT: store volatile i32 8 13 store volatile i32 8, i32* %1, align 4 14; CHECK: 3 = MemoryDef(2) 15; CHECK-NEXT: %2 = load volatile i32 16 %2 = load volatile i32, i32* %1, align 4 17; CHECK: 4 = MemoryDef(3) 18; CHECK-NEXT: %3 = load volatile i32 19 %3 = load volatile i32, i32* %1, align 4 20 %4 = add i32 %3, %2 21 ret i32 %4 22} 23