[llvm-commits] [llvm] r43205 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Dale Johannesen dalej at apple.com
Sat Oct 20 18:07:44 PDT 2007


Author: johannes
Date: Sat Oct 20 20:07:44 2007
New Revision: 43205

URL: http://llvm.org/viewvc/llvm-project?rev=43205&view=rev
Log:
Allow for copysign having f80 second argument.
Fixes 5550319.


Modified:
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=43205&r1=43204&r2=43205&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sat Oct 20 20:07:44 2007
@@ -4040,6 +4040,15 @@
     SrcVT = VT;
     SrcTy = MVT::getTypeForValueType(SrcVT);
   }
+  // And if it is bigger, shrink it first.
+  if (MVT::getSizeInBits(SrcVT) > MVT::getSizeInBits(VT)) {
+    Op1 = DAG.getNode(ISD::FP_ROUND, VT, Op1);
+    SrcVT = VT;
+    SrcTy = MVT::getTypeForValueType(SrcVT);
+  }
+
+  // At this point the operands and the result should have the same
+  // type, and that won't be f80 since that is not custom lowered.
 
   // First get the sign bit of second operand.
   std::vector<Constant*> CV;





More information about the llvm-commits mailing list