Skip to content

Commit

Permalink
Prevent unnecessary copy (KhronosGroup#2926)
Browse files Browse the repository at this point in the history
  • Loading branch information
maarquitos14 authored Dec 16, 2024
1 parent 4a85dd8 commit 112caf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/SPIRV/SPIRVWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4319,7 +4319,7 @@ SPIRVValue *LLVMToSPIRVBase::transIntrinsicInst(IntrinsicInst *II,
static_cast<std::vector<SPIRVValue *>::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<SPIRVValue *> ElemsOne(ElemCount, ElemOne);
std::vector<SPIRVValue *> ElemsZero(ElemCount, ElemZero);
std::vector<SPIRVValue *> ElemsMinusOne(ElemCount, ElemMinusOne);
Expand Down

0 comments on commit 112caf9

Please sign in to comment.