Add cbe support for powi
authorChris Lattner <sabre@nondot.org>
Sat, 9 Sep 2006 06:17:12 +0000 (06:17 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 9 Sep 2006 06:17:12 +0000 (06:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30226 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp

index c50b5a40e95b6cc095a9886c0a10cd429fba3d66..330a7bc53f8ae922ef4a2d19354959fe79127441 100644 (file)
@@ -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!
index c50b5a40e95b6cc095a9886c0a10cd429fba3d66..330a7bc53f8ae922ef4a2d19354959fe79127441 100644 (file)
@@ -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!