For PR1070:
[oota-llvm.git] / test / CodeGen / PowerPC / fp-int-fp.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep r1
3
4 double %test1(double %X) {
5         %Y = cast double %X to long
6         %Z = cast long %Y to double
7         ret double %Z
8 }
9
10 float %test2(double %X) {
11         %Y = cast double %X to long
12         %Z = cast long %Y to float
13         ret float %Z
14 }
15
16 double %test3(float %X) {
17         %Y = cast float %X to long
18         %Z = cast long %Y to double
19         ret double %Z
20 }
21
22 float %test4(float %X) {
23         %Y = cast float %X to long
24         %Z = cast long %Y to float
25         ret float %Z
26 }
27