diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp index 1446c84ef733..238f06fbd33c 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp @@ -4284,7 +4284,7 @@ static std::pair BitOp3_Op(SDValue In, SmallVector Backup(Src.begin(), Src.end()); if (!getOperandBits(LHS, LHSBits) || !getOperandBits(RHS, RHSBits)) { - Src = Backup; + Src = std::move(Backup); return std::make_pair(0, 0); } diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp index e239e6f56cb4..bf1a032ea0f3 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp @@ -4100,7 +4100,7 @@ static std::pair BitOp3_Op(Register R, SmallVector Backup(Src.begin(), Src.end()); if (!getOperandBits(LHS, LHSBits) || !getOperandBits(RHS, RHSBits)) { - Src = Backup; + Src = std::move(Backup); return std::make_pair(0, 0); } diff --git a/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp b/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp index 464d67d2a06c..82e937cdc4ed 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp @@ -311,14 +311,14 @@ void SetOfRulesForOpcode::addFastRuleDivergent(UniformityLLTOpPredicateID Ty, RegBankLLTMapping RuleApplyIDs) { int Slot = getFastPredicateSlot(Ty); assert(Slot != -1 && "Ty unsupported in this FastRulesTypes"); - Div[Slot] = RuleApplyIDs; + Div[Slot] = std::move(RuleApplyIDs); } void SetOfRulesForOpcode::addFastRuleUniform(UniformityLLTOpPredicateID Ty, RegBankLLTMapping RuleApplyIDs) { int Slot = getFastPredicateSlot(Ty); assert(Slot != -1 && "Ty unsupported in this FastRulesTypes"); - Uni[Slot] = RuleApplyIDs; + Uni[Slot] = std::move(RuleApplyIDs); } int SetOfRulesForOpcode::getFastPredicateSlot( diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.cpp b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.cpp index 093c85ecabab..63437779121a 100644 --- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.cpp +++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.cpp @@ -455,7 +455,7 @@ static void unaryOpKnownBitsMapHelper(const MCExpr *Expr, KnownBitsMap &KBM, return; case MCUnaryExpr::Opcode::Minus: { KB.makeNegative(); - KBM[Expr] = KB; + KBM[Expr] = std::move(KB); return; } case MCUnaryExpr::Opcode::Not: { @@ -466,7 +466,7 @@ static void unaryOpKnownBitsMapHelper(const MCExpr *Expr, KnownBitsMap &KBM, } case MCUnaryExpr::Opcode::Plus: { KB.makeNonNegative(); - KBM[Expr] = KB; + KBM[Expr] = std::move(KB); return; } } @@ -488,7 +488,7 @@ static void targetOpKnownBitsMapHelper(const MCExpr *Expr, KnownBitsMap &KBM, knownBitsMapHelper(Arg, KBM, Depth + 1); KB |= KBM[Arg]; } - KBM[Expr] = KB; + KBM[Expr] = std::move(KB); return; } case AMDGPUMCExpr::VariantKind::AGVK_Max: { @@ -498,7 +498,7 @@ static void targetOpKnownBitsMapHelper(const MCExpr *Expr, KnownBitsMap &KBM, knownBitsMapHelper(Arg, KBM, Depth + 1); KB = KnownBits::umax(KB, KBM[Arg]); } - KBM[Expr] = KB; + KBM[Expr] = std::move(KB); return; } case AMDGPUMCExpr::VariantKind::AGVK_ExtraSGPRs: diff --git a/llvm/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp b/llvm/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp index d2a204ed9791..9e1a97e95dc2 100644 --- a/llvm/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp +++ b/llvm/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp @@ -222,8 +222,8 @@ MachineInstr *R600VectorRegMerger::RebuildVector( // Update RSI RSI->Instr = NewMI; - RSI->RegToChan = UpdatedRegToChan; - RSI->UndefReg = UpdatedUndef; + RSI->RegToChan = std::move(UpdatedRegToChan); + RSI->UndefReg = std::move(UpdatedUndef); return NewMI; } diff --git a/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp b/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp index 074c40434923..8782fc5fc9bb 100644 --- a/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp +++ b/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp @@ -1013,7 +1013,7 @@ void SIFixSGPRCopies::analyzeVGPRToSGPRCopy(MachineInstr* MI) { AnalysisWorklist.push_back(U); } } - V2SCopies[Info.ID] = Info; + V2SCopies[Info.ID] = std::move(Info); } // The main function that computes the VGPR to SGPR copy score diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp index c819c5641dbc..af3226d4d944 100644 --- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp +++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp @@ -692,7 +692,7 @@ convertArgumentInfo(const AMDGPUFunctionArgInfo &ArgInfo, if (Arg.isMasked()) SA.Mask = Arg.getMask(); - A = SA; + A = std::move(SA); return true; }; diff --git a/llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp b/llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp index 2f3ad39c75fc..fb0c7e6c917b 100644 --- a/llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp +++ b/llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp @@ -922,7 +922,7 @@ void SIScheduleBlockCreator::colorEndsAccordingToDependencies() { // combination of children. PendingColoring[SU->NodeNum] = NextNonReservedID++; } - CurrentColoring = PendingColoring; + CurrentColoring = std::move(PendingColoring); }