blob: e97e38743ee16362e8ddda08743c18559defd5df [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; Coalescing from R32 to a subset R32_. Once another register coalescer bug is
2; fixed, the movb should go away as well.
3
4; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | \
Dan Gohman65fa0cd2007-08-15 13:45:35 +00005; RUN: grep movl
Dan Gohmanf17a25c2007-07-18 16:29:46 +00006
7%B = external global uint
8%C = external global ushort*
9
10void %test(uint %A) {
11 %A = cast uint %A to ubyte
12 %tmp2 = load uint* %B
13 %tmp3 = and ubyte %A, 16
14 %tmp4 = shl uint %tmp2, ubyte %tmp3
15 store uint %tmp4, uint* %B
16 %tmp6 = shr uint %A, ubyte 3
17 %tmp = load ushort** %C
18 %tmp8 = cast ushort* %tmp to uint
19 %tmp9 = add uint %tmp8, %tmp6
20 %tmp9 = cast uint %tmp9 to ushort*
21 store ushort* %tmp9, ushort** %C
22 ret void
23}