[llvm-commits] [llvm] r41112 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp test/CodeGen/ARM/fpowi.ll
Lauro Ramos Venancio
lauro.venancio at gmail.com
Wed Aug 15 15:13:28 PDT 2007
Author: laurov
Date: Wed Aug 15 17:13:27 2007
New Revision: 41112
URL: http://llvm.org/viewvc/llvm-project?rev=41112&view=rev
Log:
Implement FPOWI ExpandOp.
Fix PR1287.
Added:
llvm/trunk/test/CodeGen/ARM/fpowi.ll
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=41112&r1=41111&r2=41112&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Aug 15 17:13:27 2007
@@ -5604,6 +5604,11 @@
case ISD::FP_ROUND:
Lo = ExpandLibCall(TLI.getLibcallName(RTLIB::FPROUND_F64_F32),Node,true,Hi);
break;
+ case ISD::FPOWI:
+ Lo = ExpandLibCall(TLI.getLibcallName((VT == MVT::f32)
+ ? RTLIB::POWI_F32 : RTLIB::POWI_F64),
+ Node, false, Hi);
+ break;
case ISD::FSQRT:
case ISD::FSIN:
case ISD::FCOS: {
Added: llvm/trunk/test/CodeGen/ARM/fpowi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fpowi.ll?rev=41112&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/fpowi.ll (added)
+++ llvm/trunk/test/CodeGen/ARM/fpowi.ll Wed Aug 15 17:13:27 2007
@@ -0,0 +1,16 @@
+; RUN: llvm-as < %s | llc -mtriple=arm-linux-gnueabi | grep powidf2
+; PR1287
+
+; ModuleID = '<stdin>'
+target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
+target triple = "arm-linux-gnueabi"
+
+define double @_ZSt3powdi(double %__x, i32 %__i) {
+entry:
+ %tmp3 = call double @llvm.powi.f64( double 0.000000e+00, i32 0 ) ; <double> [#uses=1]
+ store double %tmp3, double* null, align 8
+ unreachable
+}
+
+declare double @llvm.powi.f64(double, i32)
+
More information about the llvm-commits
mailing list