diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2009-06-06 03:27:50 +0000 | 
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2009-06-06 03:27:50 +0000 | 
| commit | aea9b656684eaefebde46cc6a46569aeb4799d3f (patch) | |
| tree | 147a769ae6c2efae7b2b207573ad3a50c9b02c89 /llvm/lib/CodeGen/SelectionDAG | |
| parent | ebd9314f32a895a502956e402ed828964ce930f9 (diff) | |
| download | bcm5719-llvm-aea9b656684eaefebde46cc6a46569aeb4799d3f.tar.gz bcm5719-llvm-aea9b656684eaefebde46cc6a46569aeb4799d3f.zip | |
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.
llvm-svn: 72980
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | 10 | 
1 files changed, 7 insertions, 3 deletions
| diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp index df9af2147ca..335c73cd596 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp @@ -129,6 +129,7 @@ SDValue VectorLegalizer::LegalizeOp(SDValue Op) {    if (!HasVectorValue)      return TranslateLegalizeResults(Op, Result); +  MVT QueryType;    switch (Op.getOpcode()) {    default:      return TranslateLegalizeResults(Op, Result); @@ -162,8 +163,6 @@ SDValue VectorLegalizer::LegalizeOp(SDValue Op) {    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 @@ SDValue VectorLegalizer::LegalizeOp(SDValue Op) {    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); | 

