llvm-project/llvm/test/Analysis/Andersens/modreftest.ll

16 lines
308 B
LLVM
Raw Normal View History

; RUN: llvm-as < %s | opt -anders-aa -gvn -instcombine | llvm-dis \
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
}