Skip to content

Commit da8e07e

Browse files
maarquitos14jsji
authored andcommitted
Prevent unnecessary copy (#2926)
Original commit: KhronosGroup/SPIRV-LLVM-Translator@112caf9cb94fa47
1 parent a280b11 commit da8e07e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: llvm-spirv/lib/SPIRV/SPIRVWriter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4314,7 +4314,7 @@ SPIRVValue *LLVMToSPIRVBase::transIntrinsicInst(IntrinsicInst *II,
43144314
static_cast<std::vector<SPIRVValue *>::size_type>(VecSize);
43154315
auto *ElemOne = BM->addConstant(ElemTy, 1);
43164316
auto *ElemZero = BM->addConstant(ElemTy, 0);
4317-
auto *ElemMinusOne = BM->addConstant(ElemTy, MinusOneValue);
4317+
auto *ElemMinusOne = BM->addConstant(ElemTy, std::move(MinusOneValue));
43184318
std::vector<SPIRVValue *> ElemsOne(ElemCount, ElemOne);
43194319
std::vector<SPIRVValue *> ElemsZero(ElemCount, ElemZero);
43204320
std::vector<SPIRVValue *> ElemsMinusOne(ElemCount, ElemMinusOne);

0 commit comments

Comments
 (0)