blob: e0c2edc4c2378e0c4c8f9767bab63001723ccf2b [file] [log] [blame]
Dan Gohman3c7d3082009-09-11 18:01:28 +00001; RUN: opt < %s -anders-aa -gvn -instcombine -S \
Tanya Lattnera695f012008-02-14 06:56:27 +00002; RUN: | grep {ret i1 true}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003
Tanya Lattnera695f012008-02-14 06:56:27 +00004@G = internal global i32* null
5declare i32 *@ext()
Dan Gohmanf17a25c2007-07-18 16:29:46 +00006
Tanya Lattnera695f012008-02-14 06:56:27 +00007define i1 @bar() {
8 %V1 = load i32** @G
9 %X2 = call i32 *@ext()
10 %V2 = load i32** @G
11 store i32* %X2, i32** @G
12
13 %C = icmp eq i32* %V1, %V2
14 ret i1 %C
Dan Gohmanf17a25c2007-07-18 16:29:46 +000015}