blob: 0d4fd965e8e0f31a2e7e0e6bc07f5c539cc2799e [file] [log] [blame]
Chris Lattner24714032006-03-01 07:13:56 +00001; RUN: llvm-as < %s | llc &&
2; RUN: llvm-as < %s | llc | not grep ori &&
3; RUN: llvm-as < %s | llc | not grep rlwimi
4
5int %test1(sbyte* %P) { ;; or -> lwzx
6 %tmp.2.i = cast sbyte* %P to uint
7 %tmp.4.i = and uint %tmp.2.i, 4294901760
8 %tmp.10.i = shr uint %tmp.2.i, ubyte 5
9 %tmp.11.i = and uint %tmp.10.i, 2040
10 %tmp.13.i = or uint %tmp.11.i, %tmp.4.i
11 %tmp.14.i = cast uint %tmp.13.i to int*
12 %tmp.3 = load int* %tmp.14.i
13 ret int %tmp.3
14}
15
16int %test2(int %P) { ;; or -> lwz
17 %tmp.2 = shl int %P, ubyte 4
18 %tmp.3 = or int %tmp.2, 2
19 %tmp.4 = cast int %tmp.3 to int*
20 %tmp.5 = load int* %tmp.4
21 ret int %tmp.5
22}
23