blob: ddc10e1dc0f248d62a6e65d8fa9e0d0d942db2a4 [file] [log] [blame]
Eli Friedmanba7dd482008-02-13 06:55:57 +00001; RUN: llvm-as < %s | opt -gvn | llvm-dis | not grep load
2
3%struct.anon = type { i32, i8, i8, i8, i8 }
4
5define i32 @a() {
6entry:
7 %c = alloca %struct.anon ; <%struct.anon*> [#uses=2]
8 %tmp = getelementptr %struct.anon* %c, i32 0, i32 0 ; <i32*> [#uses=1]
9 %tmp1 = getelementptr i32* %tmp, i32 1 ; <i32*> [#uses=2]
10 %tmp2 = load i32* %tmp1, align 4 ; <i32> [#uses=1]
11 %tmp3 = or i32 %tmp2, 11 ; <i32> [#uses=1]
12 %tmp4 = and i32 %tmp3, -21 ; <i32> [#uses=1]
13 store i32 %tmp4, i32* %tmp1, align 4
14 %call = call i32 (...)* @x( %struct.anon* %c ) ; <i32> [#uses=0]
15 ret i32 undef
16}
17
18
19declare i32 @x(...)