diff options
author | ed <ed@FreeBSD.org> | 2009-06-06 08:20:29 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-06 08:20:29 +0000 |
commit | 2361a5c2bfbaef476824e51fa72712e334219c7b (patch) | |
tree | 8a1bbd1a5b838080d31e5c93a1817006b8c62318 /lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | |
parent | 1941b8772a36a33c7b86cb67163cd735b3d57221 (diff) | |
download | FreeBSD-src-2361a5c2bfbaef476824e51fa72712e334219c7b.zip FreeBSD-src-2361a5c2bfbaef476824e51fa72712e334219c7b.tar.gz |
Import LLVM, at r72995.
We should now have support for #pragma weak.
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp b/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp index df9af21..335c73c 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp +++ b/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); |