1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/test/CodeGen/XCore/float-intrinsics.ll
Stephen Lin 7e501cf4c3 Mass update to CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change and all updated tests passed locally.
This update was done with the following bash script:

  find test/CodeGen -name "*.ll" | \
  while read NAME; do
    echo "$NAME"
    if ! grep -q "^; *RUN: *llc.*debug" $NAME; then
      TEMP=`mktemp -t temp`
      cp $NAME $TEMP
      sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \
      while read FUNC; do
        sed -i '' "s/;\(.*\)\([A-Za-z0-9_-]*\):\( *\)$FUNC: *\$/;\1\2-LABEL:\3$FUNC:/g" $TEMP
      done
      sed -i '' "s/;\(.*\)-LABEL-LABEL:/;\1-LABEL:/" $TEMP
      sed -i '' "s/;\(.*\)-NEXT-LABEL:/;\1-NEXT:/" $TEMP
      sed -i '' "s/;\(.*\)-NOT-LABEL:/;\1-NOT:/" $TEMP
      sed -i '' "s/;\(.*\)-DAG-LABEL:/;\1-DAG:/" $TEMP
      mv $TEMP $NAME
    fi
  done

llvm-svn: 186280
2013-07-14 06:24:09 +00:00

172 lines
3.8 KiB
LLVM

; RUN: llc < %s -march=xcore | FileCheck %s
declare double @llvm.cos.f64(double)
declare double @llvm.exp.f64(double)
declare double @llvm.exp2.f64(double)
declare double @llvm.log.f64(double)
declare double @llvm.log10.f64(double)
declare double @llvm.log2.f64(double)
declare double @llvm.pow.f64(double, double)
declare double @llvm.powi.f64(double, i32)
declare double @llvm.sin.f64(double)
declare double @llvm.sqrt.f64(double)
define double @cos(double %F) {
; CHECK-LABEL: cos:
; CHECK: bl cos
%result = call double @llvm.cos.f64(double %F)
ret double %result
}
declare float @llvm.cos.f32(float)
; CHECK-LABEL: cosf:
; CHECK: bl cosf
define float @cosf(float %F) {
%result = call float @llvm.cos.f32(float %F)
ret float %result
}
define double @exp(double %F) {
; CHECK-LABEL: exp:
; CHECK: bl exp
%result = call double @llvm.exp.f64(double %F)
ret double %result
}
declare float @llvm.exp.f32(float)
define float @expf(float %F) {
; CHECK-LABEL: expf:
; CHECK: bl expf
%result = call float @llvm.exp.f32(float %F)
ret float %result
}
define double @exp2(double %F) {
; CHECK-LABEL: exp2:
; CHECK: bl exp2
%result = call double @llvm.exp2.f64(double %F)
ret double %result
}
declare float @llvm.exp2.f32(float)
define float @exp2f(float %F) {
; CHECK-LABEL: exp2f:
; CHECK: bl exp2f
%result = call float @llvm.exp2.f32(float %F)
ret float %result
}
define double @log(double %F) {
; CHECK-LABEL: log:
; CHECK: bl log
%result = call double @llvm.log.f64(double %F)
ret double %result
}
declare float @llvm.log.f32(float)
define float @logf(float %F) {
; CHECK-LABEL: logf:
; CHECK: bl logf
%result = call float @llvm.log.f32(float %F)
ret float %result
}
define double @log10(double %F) {
; CHECK-LABEL: log10:
; CHECK: bl log10
%result = call double @llvm.log10.f64(double %F)
ret double %result
}
declare float @llvm.log10.f32(float)
define float @log10f(float %F) {
; CHECK-LABEL: log10f:
; CHECK: bl log10f
%result = call float @llvm.log10.f32(float %F)
ret float %result
}
define double @log2(double %F) {
; CHECK-LABEL: log2:
; CHECK: bl log2
%result = call double @llvm.log2.f64(double %F)
ret double %result
}
declare float @llvm.log2.f32(float)
define float @log2f(float %F) {
; CHECK-LABEL: log2f:
; CHECK: bl log2f
%result = call float @llvm.log2.f32(float %F)
ret float %result
}
define double @pow(double %F, double %power) {
; CHECK-LABEL: pow:
; CHECK: bl pow
%result = call double @llvm.pow.f64(double %F, double %power)
ret double %result
}
declare float @llvm.pow.f32(float, float)
define float @powf(float %F, float %power) {
; CHECK-LABEL: powf:
; CHECK: bl powf
%result = call float @llvm.pow.f32(float %F, float %power)
ret float %result
}
define double @powi(double %F, i32 %power) {
; CHECK-LABEL: powi:
; CHECK: bl __powidf2
%result = call double @llvm.powi.f64(double %F, i32 %power)
ret double %result
}
declare float @llvm.powi.f32(float, i32)
define float @powif(float %F, i32 %power) {
; CHECK-LABEL: powif:
; CHECK: bl __powisf2
%result = call float @llvm.powi.f32(float %F, i32 %power)
ret float %result
}
define double @sin(double %F) {
; CHECK-LABEL: sin:
; CHECK: bl sin
%result = call double @llvm.sin.f64(double %F)
ret double %result
}
declare float @llvm.sin.f32(float)
define float @sinf(float %F) {
; CHECK-LABEL: sinf:
; CHECK: bl sinf
%result = call float @llvm.sin.f32(float %F)
ret float %result
}
define double @sqrt(double %F) {
; CHECK-LABEL: sqrt:
; CHECK: bl sqrt
%result = call double @llvm.sqrt.f64(double %F)
ret double %result
}
declare float @llvm.sqrt.f32(float)
define float @sqrtf(float %F) {
; CHECK-LABEL: sqrtf:
; CHECK: bl sqrtf
%result = call float @llvm.sqrt.f32(float %F)
ret float %result
}