diff --git a/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp b/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp index dc2909e146dcd..8f0db457a982e 100644 --- a/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp +++ b/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp @@ -1486,7 +1486,7 @@ InstructionCost ARMTTIImpl::getArithmeticInstrCost( auto IsExtInst = [](const Value *V) -> bool { return isa(V) || isa(V); }; - auto IsExtensionFromHalf = [&, IsExtInst](const Value *V) -> bool { + auto IsExtensionFromHalf = [](const Value *V) -> bool { return cast(V)->getOperand(0)->getType()->isIntegerTy(16); };