blob: 93ca94745f97db8fe3f1f572c3554fa19f4cd370 [file] [log] [blame]
Chris Lattner257bedb2006-03-01 04:56:33 +00001; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 &&
2; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | not grep r1
3
4double %test1(double %X) {
5 %Y = cast double %X to long
6 %Z = cast long %Y to double
7 ret double %Z
8}
9
10float %test2(double %X) {
11 %Y = cast double %X to long
12 %Z = cast long %Y to float
13 ret float %Z
14}
15
16double %test3(float %X) {
17 %Y = cast float %X to long
18 %Z = cast long %Y to double
19 ret double %Z
20}
21
22float %test4(float %X) {
23 %Y = cast float %X to long
24 %Z = cast long %Y to float
25 ret float %Z
26}
27