1 ; RUN: opt < %s -S -debugify -mldst-motion -o - | FileCheck %s
3 %struct.S = type { i32 }
5 define dso_local void @foo(%struct.S* %this, i32 %bar) {
7 %this.addr = alloca %struct.S*, align 8
8 %bar.addr = alloca i32, align 4
9 store %struct.S* %this, %struct.S** %this.addr, align 8
10 store i32 %bar, i32* %bar.addr, align 4
11 %this1 = load %struct.S*, %struct.S** %this.addr, align 8
12 %0 = load i32, i32* %bar.addr, align 4
13 %tobool = icmp ne i32 %0, 0
14 br i1 %tobool, label %if.then, label %if.else
16 if.then: ; preds = %entry
17 %foo = getelementptr inbounds %struct.S, %struct.S* %this1, i32 0, i32 0
18 store i32 1, i32* %foo, align 4
21 if.else: ; preds = %entry
22 %foo2 = getelementptr inbounds %struct.S, %struct.S* %this1, i32 0, i32 0
23 store i32 0, i32* %foo2, align 4
26 if.end: ; preds = %if.else, %if.then
31 ; CHECK: if.end: ; preds = %if.else, %if.then
32 ; CHECK-NEXT: %.sink = phi {{.*}} !dbg ![[DBG:[0-9]+]]
33 ; CHECK: ![[DBG]] = !DILocation(line: 0,