1 ; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
3 ; This testcase is reduced from SingleSource/Benchmarks/Misc/fbench.c
4 ; It is testing to make sure that the MemorySSA use optimizer
5 ; comes up with right answers when dealing with multiple MemoryLocations
6 ; over different blocks. See PR28880 for more details.
7 @global = external hidden unnamed_addr global double, align 8
8 @global.1 = external hidden unnamed_addr global double, align 8
10 ; Function Attrs: nounwind ssp uwtable
11 define hidden fastcc void @hoge() unnamed_addr #0 {
13 br i1 undef, label %bb1, label %bb2
16 ; These accesses should not conflict.
17 ; CHECK: 1 = MemoryDef(liveOnEntry)
18 ; 1 = MemoryDef(liveOnEntry)
19 ; CHECK-NEXT: store double undef, ptr @global, align 8
20 store double undef, ptr @global, align 8
21 ; CHECK: MemoryUse(liveOnEntry)
22 ; MemoryUse(liveOnEntry)
23 ; CHECK-NEXT: %tmp = load double, ptr @global.1, align 8
24 %tmp = load double, ptr @global.1, align 8
31 br i1 undef, label %bb4, label %bb6
34 ; These accesses should conflict.
35 ; CHECK: 2 = MemoryDef(liveOnEntry)
36 ; 2 = MemoryDef(liveOnEntry)
37 ; CHECK-NEXT: store double 0.000000e+00, ptr @global.1, align 8
38 store double 0.000000e+00, ptr @global.1, align 8
41 ; CHECK-NEXT: %tmp5 = load double, ptr @global.1, align 8
42 %tmp5 = load double, ptr @global.1, align 8
49 attributes #0 = { nounwind ssp uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="core2" "target-features"="+cx16,+fxsr,+mmx,+sse,+sse2,+sse3,+ssse3" "unsafe-fp-math"="false" "use-soft-float"="false" }