aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/PowerPC/fp-int-fp.ll
blob: 63ebc494eb809f1390e5c63b7716973dcd6daf75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep r1

double %test1(double %X) {
        %Y = cast double %X to long
        %Z = cast long %Y to double
        ret double %Z
}

float %test2(double %X) {
        %Y = cast double %X to long
        %Z = cast long %Y to float
        ret float %Z
}

double %test3(float %X) {
        %Y = cast float %X to long
        %Z = cast long %Y to double
        ret double %Z
}

float %test4(float %X) {
        %Y = cast float %X to long
        %Z = cast long %Y to float
        ret float %Z
}