Dan Gohman | 3c7d308 | 2009-09-11 18:01:28 +0000 | [diff] [blame^] | 1 | ; RUN: opt < %s -anders-aa -gvn -instcombine -S \ |
Tanya Lattner | a695f01 | 2008-02-14 06:56:27 +0000 | [diff] [blame] | 2 | ; RUN: | grep {ret i1 true} |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 3 | |
Tanya Lattner | a695f01 | 2008-02-14 06:56:27 +0000 | [diff] [blame] | 4 | @G = internal global i32* null |
| 5 | declare i32 *@ext() |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 6 | |
Tanya Lattner | a695f01 | 2008-02-14 06:56:27 +0000 | [diff] [blame] | 7 | define 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 Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 15 | } |