llvm.org GIT mirror llvm / c7d855e
new testcases git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26420 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 14 years ago
1 changed file(s) with 30 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
0
1 ; RUN: llvm-as < %s | llc -march=ppc32 &&
2 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'extsh\|rlwinm'
3
4 declare short %foo()
15
26 int %test1(short %X) {
37 %Y = cast short %X to int ;; dead
2226 ret void
2327 }
2428
25 declare short %foo()
29 uint %test4(ushort* %P) {
30 %tmp.1 = load ushort* %P
31 %tmp.2 = cast ushort %tmp.1 to uint
32 %tmp.3 = and uint %tmp.2, 255
33 ret uint %tmp.3
34 }
35
36 uint %test5(short* %P) {
37 %tmp.1 = load short* %P
38 %tmp.2 = cast short %tmp.1 to ushort
39 %tmp.3 = cast ushort %tmp.2 to uint
40 %tmp.4 = and uint %tmp.3, 255
41 ret uint %tmp.4
42 }
43
44 uint %test6(uint* %P) {
45 %tmp.1 = load uint* %P
46 %tmp.2 = and uint %tmp.1, 255
47 ret uint %tmp.2
48 }
49
50 ushort %test7(float %a) {
51 %tmp.1 = cast float %a to ushort
52 ret ushort %tmp.1
53 }
54