Sanjoy Das | 5ce3272 | 2016-04-08 00:48:30 +0000 | [diff] [blame] | 1 | ; RUN: opt < %s -basicaa -globals-aa -gvn -S | FileCheck %s |
2 | |||||
3 | ; See PR26774 | ||||
4 | |||||
5 | @X = internal global i32 4 | ||||
6 | |||||
7 | define i32 @test(i32* %P) { | ||||
8 | ; CHECK: @test | ||||
9 | ; CHECK-NEXT: store i32 12, i32* @X | ||||
10 | ; CHECK-NEXT: call void @doesnotmodX() | ||||
11 | ; CHECK-NEXT: %V = load i32, i32* @X | ||||
12 | ; CHECK-NEXT: ret i32 %V | ||||
13 | store i32 12, i32* @X | ||||
14 | call void @doesnotmodX( ) | ||||
15 | %V = load i32, i32* @X | ||||
16 | ret i32 %V | ||||
17 | } | ||||
18 | |||||
19 | define linkonce_odr void @doesnotmodX() { | ||||
20 | ret void | ||||
21 | } |