For PR1319: Upgrade to new test harness.
[oota-llvm.git] / test / CodeGen / PowerPC / fsqrt.ll
1 ; fsqrt should be generated when the fsqrt feature is enabled, but not 
2 ; otherwise.
3
4 ; RUN: llvm-upgrade < %s | llvm-as | \
5 ; RUN:   llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=+fsqrt | \
6 ; RUN:   grep {fsqrt f1, f1}
7 ; RUN: llvm-upgrade < %s | llvm-as | \
8 ; RUN:  llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g5 | \
9 ; RUN:  grep {fsqrt f1, f1}
10 ; RUN: llvm-upgrade < %s | llvm-as | \
11 ; RUN:   llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-fsqrt | \
12 ; RUN:   not grep {fsqrt f1, f1}
13 ; RUN: llvm-upgrade < %s | llvm-as | \
14 ; RUN:   llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g4 | \
15 ; RUN:   not grep {fsqrt f1, f1}
16
17 declare double %llvm.sqrt.f64(double)
18 double %X(double %Y) {
19         %Z = call double %llvm.sqrt.f64(double %Y)
20         ret double %Z
21 }