blob: f7bceedfe79fa30ad0238416da90bad95c44ee08 [file] [log] [blame]
Evan Chenge41ebcc2006-05-10 19:53:05 +00001; RUN: llvm-as < %s | llc -march=x86 -relocation-model=static -sched-lower-defnuse &&
Evan Cheng506b94f2006-05-09 07:20:24 +00002; RUN: llvm-as < %s | llc -march=x86 -relocation-model=static -sched-lower-defnuse | not grep 'xorb $16, %cl'
3
4%A = external global ushort*
5%B = external global uint
6%C = external global uint
7
8void %test() {
9 %tmp = load ushort** %A
10 %tmp1 = getelementptr ushort* %tmp, int 1
11 %tmp = load ushort* %tmp1
12 %tmp3 = cast ushort %tmp to uint
13 %tmp = load uint* %B
14 %tmp4 = and uint %tmp, 16
15 %tmp5 = load uint* %C
16 %tmp6 = cast uint %tmp4 to ubyte
17 %tmp7 = shl uint %tmp5, ubyte %tmp6
18 %tmp9 = xor ubyte %tmp6, 16
19 %tmp11 = shr uint %tmp3, ubyte %tmp9
20 %tmp12 = or uint %tmp11, %tmp7
21 store uint %tmp12, uint* %C
22 ret void
23}