llvm.org GIT mirror llvm / 20c6b7a
Pull out repeated CI->getCalledFunction() calls. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360070 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 1 year, 5 months ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
10741074 /// Shrink double -> float functions.
10751075 static Value *optimizeDoubleFP(CallInst *CI, IRBuilder<> &B,
10761076 bool isBinary, bool isPrecise = false) {
1077 if (!CI->getType()->isDoubleTy() || !CI->getCalledFunction())
1077 Function *CalleeFn = CI->getCalledFunction();
1078 if (!CI->getType()->isDoubleTy() || !CalleeFn)
10781079 return nullptr;
10791080
10801081 // If not all the uses of the function are converted to float, then bail out.
10941095 if (!V[0] || (isBinary && !V[1]))
10951096 return nullptr;
10961097
1097 Function *CalleeFn = CI->getCalledFunction();
10981098 StringRef CalleeNm = CalleeFn->getName();
10991099 AttributeList CalleeAt = CalleeFn->getAttributes();
11001100 bool CalleeIn = CalleeFn->isIntrinsic();