[llvm-commits] [llvm] r72980 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp

Eli Friedman eli.friedman at gmail.com
Fri Jun 5 20:27:55 PDT 2009


Author: efriedma
Date: Fri Jun  5 22:27:50 2009
New Revision: 72980

URL: http://llvm.org/viewvc/llvm-project?rev=72980&view=rev
Log:
Make SINT_TO_FP/UINT_TO_FP vector legalization queries query on the 
integer type to be consistent with normal operation legalization.  No visible
change because nothing is actually using this at the moment.


Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp?rev=72980&r1=72979&r2=72980&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp Fri Jun  5 22:27:50 2009
@@ -129,6 +129,7 @@
   if (!HasVectorValue)
     return TranslateLegalizeResults(Op, Result);
 
+  MVT QueryType;
   switch (Op.getOpcode()) {
   default:
     return TranslateLegalizeResults(Op, Result);
@@ -162,8 +163,6 @@
   case ISD::ANY_EXTEND:
   case ISD::TRUNCATE:
   case ISD::SIGN_EXTEND:
-  case ISD::SINT_TO_FP:
-  case ISD::UINT_TO_FP:
   case ISD::FP_TO_SINT:
   case ISD::FP_TO_UINT:
   case ISD::FNEG:
@@ -183,10 +182,15 @@
   case ISD::FRINT:
   case ISD::FNEARBYINT:
   case ISD::FFLOOR:
+    QueryType = Node->getValueType(0);
+    break;
+  case ISD::SINT_TO_FP:
+  case ISD::UINT_TO_FP:
+    QueryType = Node->getOperand(0).getValueType();
     break;
   }
 
-  switch (TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0))) {
+  switch (TLI.getOperationAction(Node->getOpcode(), QueryType)) {
   case TargetLowering::Promote:
     // "Promote" the operation by bitcasting
     Result = PromoteVectorOp(Op);





More information about the llvm-commits mailing list