Reid Spencer | 69ccadd | 2006-12-02 04:23:10 +0000 | [diff] [blame] | 1 | ; 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] | 2 | |
| 3 | double %test1(double %X) { |
| 4 | %Y = cast double %X to long |
| 5 | %Z = cast long %Y to double |
| 6 | ret double %Z |
| 7 | } |
| 8 | |
| 9 | float %test2(double %X) { |
| 10 | %Y = cast double %X to long |
| 11 | %Z = cast long %Y to float |
| 12 | ret float %Z |
| 13 | } |
| 14 | |
| 15 | double %test3(float %X) { |
| 16 | %Y = cast float %X to long |
| 17 | %Z = cast long %Y to double |
| 18 | ret double %Z |
| 19 | } |
| 20 | |
| 21 | float %test4(float %X) { |
| 22 | %Y = cast float %X to long |
| 23 | %Z = cast long %Y to float |
| 24 | ret float %Z |
| 25 | } |
| 26 | |