From ccce8bae14a8539e7c9e8d694e2126dd30dc774f Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 5 Jan 2010 13:12:22 +0000 Subject: Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer. llvm-svn: 92726 --- llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp') diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp index 404f3b64b5d..36d5d46eaa2 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp @@ -1027,7 +1027,7 @@ static Value *LookThroughFPExtensions(Value *V) { // See if the value can be truncated to float and then reextended. if (Value *V = FitsInFPType(CFP, APFloat::IEEEsingle)) return V; - if (CFP->getType() == Type::getDoubleTy(V->getContext())) + if (CFP->getType()->isDoubleTy()) return V; // Won't shrink. if (Value *V = FitsInFPType(CFP, APFloat::IEEEdouble)) return V; -- cgit v1.2.3