2009-09-12 02:01:28 +08:00
|
|
|
; RUN: opt < %s -anders-aa -gvn -instcombine -S \
|
2008-02-14 14:56:27 +08:00
|
|
|
; RUN: | grep {ret i1 true}
|
2005-04-05 06:22:30 +08:00
|
|
|
|
2008-02-14 14:56:27 +08:00
|
|
|
@G = internal global i32* null
|
|
|
|
declare i32 *@ext()
|
2005-04-05 06:22:30 +08:00
|
|
|
|
2008-02-14 14:56:27 +08:00
|
|
|
define i1 @bar() {
|
|
|
|
%V1 = load i32** @G
|
|
|
|
%X2 = call i32 *@ext()
|
|
|
|
%V2 = load i32** @G
|
|
|
|
store i32* %X2, i32** @G
|
|
|
|
|
|
|
|
%C = icmp eq i32* %V1, %V2
|
|
|
|
ret i1 %C
|
2005-04-05 06:22:30 +08:00
|
|
|
}
|