aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-09 06:17:12 +0000
committerChris Lattner <sabre@nondot.org>2006-09-09 06:17:12 +0000
commit1e14289ef9ef10d438510e463e30a22ce3fe8c15 (patch)
tree915781f5a7e33cece505ed602cf588469dc20559
parent6ddf8ed6fe2d0aa5e15f7b9ad7e5049e2223bbd1 (diff)
downloadexternal_llvm-1e14289ef9ef10d438510e463e30a22ce3fe8c15.zip
external_llvm-1e14289ef9ef10d438510e463e30a22ce3fe8c15.tar.gz
external_llvm-1e14289ef9ef10d438510e463e30a22ce3fe8c15.tar.bz2
Add cbe support for powi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30226 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/CBackend/CBackend.cpp10
-rw-r--r--lib/Target/CBackend/Writer.cpp10
2 files changed, 20 insertions, 0 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index c50b5a4..330a7bc 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -1693,6 +1693,8 @@ void CWriter::lowerIntrinsics(Function &F) {
case Intrinsic::longjmp:
case Intrinsic::prefetch:
case Intrinsic::dbg_stoppoint:
+ case Intrinsic::powi_f32:
+ case Intrinsic::powi_f64:
// We directly implement these intrinsics
break;
default:
@@ -1785,6 +1787,14 @@ void CWriter::visitCallInst(CallInst &I) {
writeOperand(I.getOperand(1));
Out << ')';
return;
+ case Intrinsic::powi_f32:
+ case Intrinsic::powi_f64:
+ Out << "__builtin_powi(";
+ writeOperand(I.getOperand(1));
+ Out << ", ";
+ writeOperand(I.getOperand(2));
+ Out << ')';
+ return;
case Intrinsic::setjmp:
#if defined(HAVE__SETJMP) && defined(HAVE__LONGJMP)
Out << "_"; // Use _setjmp on systems that support it!
diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp
index c50b5a4..330a7bc 100644
--- a/lib/Target/CBackend/Writer.cpp
+++ b/lib/Target/CBackend/Writer.cpp
@@ -1693,6 +1693,8 @@ void CWriter::lowerIntrinsics(Function &F) {
case Intrinsic::longjmp:
case Intrinsic::prefetch:
case Intrinsic::dbg_stoppoint:
+ case Intrinsic::powi_f32:
+ case Intrinsic::powi_f64:
// We directly implement these intrinsics
break;
default:
@@ -1785,6 +1787,14 @@ void CWriter::visitCallInst(CallInst &I) {
writeOperand(I.getOperand(1));
Out << ')';
return;
+ case Intrinsic::powi_f32:
+ case Intrinsic::powi_f64:
+ Out << "__builtin_powi(";
+ writeOperand(I.getOperand(1));
+ Out << ", ";
+ writeOperand(I.getOperand(2));
+ Out << ')';
+ return;
case Intrinsic::setjmp:
#if defined(HAVE__SETJMP) && defined(HAVE__LONGJMP)
Out << "_"; // Use _setjmp on systems that support it!