diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 18f9871b2bd0c..067676703141a 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -52816,7 +52816,7 @@ static SDValue getInvertedVectorForFMA(SDValue V, SelectionDAG &DAG) { SmallVector Ops; EVT VT = V.getValueType(); EVT EltVT = VT.getVectorElementType(); - for (auto Op : V->op_values()) { + for (const SDValue &Op : V->op_values()) { if (auto *Cst = dyn_cast(Op)) { Ops.push_back(DAG.getConstantFP(-Cst->getValueAPF(), SDLoc(Op), EltVT)); } else { @@ -52838,8 +52838,8 @@ static SDValue getInvertedVectorForFMA(SDValue V, SelectionDAG &DAG) { // prefer one of the values. We prefer a constant with a negative value on // the first place. // N.B. We need to skip undefs that may precede a value. - for (auto op : V->op_values()) { - if (auto *Cst = dyn_cast(op)) { + for (const SDValue &Op : V->op_values()) { + if (auto *Cst = dyn_cast(Op)) { if (Cst->isNegative()) return SDValue(); break;