diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -54615,7 +54615,7 @@ SmallVector Ops; EVT VT = V.getValueType(); EVT EltVT = VT.getVectorElementType(); - for (auto Op : V->op_values()) { + for (auto &Op : V->op_values()) { if (auto *Cst = dyn_cast(Op)) { Ops.push_back(DAG.getConstantFP(-Cst->getValueAPF(), SDLoc(Op), EltVT)); } else { @@ -54637,7 +54637,7 @@ // 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()) { + for (auto &op : V->op_values()) { if (auto *Cst = dyn_cast(op)) { if (Cst->isNegative()) return SDValue();