summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/fp-int-fp.ll
blob: 93ca94745f97db8fe3f1f572c3554fa19f4cd370 (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
27
; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 &&
; RUN: llvm-as < %s | 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
}