diff --git a/lib/SPIRV/SPIRVWriter.cpp b/lib/SPIRV/SPIRVWriter.cpp index 769ce42bc..7a4461327 100644 --- a/lib/SPIRV/SPIRVWriter.cpp +++ b/lib/SPIRV/SPIRVWriter.cpp @@ -4319,7 +4319,7 @@ SPIRVValue *LLVMToSPIRVBase::transIntrinsicInst(IntrinsicInst *II, static_cast::size_type>(VecSize); auto *ElemOne = BM->addConstant(ElemTy, 1); auto *ElemZero = BM->addConstant(ElemTy, 0); - auto *ElemMinusOne = BM->addConstant(ElemTy, MinusOneValue); + auto *ElemMinusOne = BM->addConstant(ElemTy, std::move(MinusOneValue)); std::vector ElemsOne(ElemCount, ElemOne); std::vector ElemsZero(ElemCount, ElemZero); std::vector ElemsMinusOne(ElemCount, ElemMinusOne);