Reid Spencer | 69ccadd | 2006-12-02 04:23:10 +0000 | [diff] [blame^] | 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 |
Chris Lattner | 257bedb | 2006-03-01 04:56:33 +0000 | [diff] [blame] | 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 | |