From 6336b70541204d1a8377ec1f33748a7260e0a31d Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Wed, 27 Aug 2008 18:58:30 +0000 Subject: [PATCH] Use TargetLowering to get the types in fast isel, which handles pointer types correctly for our purposes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55428 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/FastISel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index 6e2bd4b7f57..7d40405bd53 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -197,8 +197,8 @@ bool FastISel::SelectGetElementPtr(Instruction *I, bool FastISel::SelectCast(Instruction *I, ISD::NodeType Opcode, DenseMap &ValueMap) { - MVT SrcVT = MVT::getMVT(I->getOperand(0)->getType()); - MVT DstVT = MVT::getMVT(I->getType()); + MVT SrcVT = TLI.getValueType(I->getOperand(0)->getType()); + MVT DstVT = TLI.getValueType(I->getType()); if (SrcVT == MVT::Other || !SrcVT.isSimple() || DstVT == MVT::Other || !DstVT.isSimple() || @@ -231,8 +231,8 @@ bool FastISel::SelectBitCast(Instruction *I, } // Bitcasts of other values become reg-reg copies or BIT_CONVERT operators. - MVT SrcVT = MVT::getMVT(I->getOperand(0)->getType()); - MVT DstVT = MVT::getMVT(I->getType()); + MVT SrcVT = TLI.getValueType(I->getOperand(0)->getType()); + MVT DstVT = TLI.getValueType(I->getType()); if (SrcVT == MVT::Other || !SrcVT.isSimple() || DstVT == MVT::Other || !DstVT.isSimple() ||