blob: 87203273178a2bff77293cf5094005445a3742f5 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; fcfid and fctid should be generated when the 64bit feature is enabled, but not
2; otherwise.
3
4; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=+64bit | \
5; RUN: grep fcfid
6; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=+64bit | \
7; RUN: grep fctidz
8; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | \
9; RUN: grep fcfid
10; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | \
11; RUN: grep fctidz
12; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=-64bit | \
13; RUN: not grep fcfid
14; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=-64bit | \
15; RUN: not grep fctidz
16; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g4 | \
17; RUN: not grep fcfid
18; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g4 | \
19; RUN: not grep fctidz
20
21double %X(double %Y) {
22 %A = cast double %Y to long
23 %B = cast long %A to double
24 ret double %B
25}