blob: 5ff2684d7b0001cf84e02885afe5a840639516d2 [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
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +00004; RUN: llvm-as < %s | llc -march=ppc32 -mattr=+64bit | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00005; RUN: grep fcfid
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +00006; RUN: llvm-as < %s | llc -march=ppc32 -mattr=+64bit | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007; RUN: grep fctidz
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +00008; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009; RUN: grep fcfid
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +000010; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011; RUN: grep fctidz
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +000012; RUN: llvm-as < %s | llc -march=ppc32 -mattr=-64bit | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +000013; RUN: not grep fcfid
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +000014; RUN: llvm-as < %s | llc -march=ppc32 -mattr=-64bit | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +000015; RUN: not grep fctidz
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +000016; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g4 | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +000017; RUN: not grep fcfid
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +000018; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g4 | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +000019; RUN: not grep fctidz
20
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +000021define double @X(double %Y) {
22 %A = fptosi double %Y to i64 ; <i64> [#uses=1]
23 %B = sitofp i64 %A to double ; <double> [#uses=1]
24 ret double %B
Dan Gohmanf17a25c2007-07-18 16:29:46 +000025}
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +000026