Lines Matching refs:NewFn
29 static bool UpgradeIntrinsicFunction1(Function *F, Function *&NewFn) {
43 NewFn = Intrinsic::getDeclaration(F->getParent(), Intrinsic::ctlz,
49 NewFn = Intrinsic::getDeclaration(F->getParent(), Intrinsic::cttz,
61 NewFn = 0;
75 bool llvm::UpgradeIntrinsicFunction(Function *F, Function *&NewFn) {
76 NewFn = 0;
77 bool Upgraded = UpgradeIntrinsicFunction1(F, NewFn);
80 if (NewFn)
81 F = NewFn;
95 void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) {
103 if (!NewFn) {
165 switch (NewFn->getIntrinsicID()) {
175 CI->replaceAllUsesWith(Builder.CreateCall2(NewFn, CI->getArgOperand(0),
189 Function *NewFn;
190 if (UpgradeIntrinsicFunction(F, NewFn)) {
191 if (NewFn != F) {
196 UpgradeIntrinsicCall(CI, NewFn);