Skip to content

Commit 0ea7f0c

Browse files
Update llvm/include/llvm/CodeGen/BasicTTIImpl.h
Co-authored-by: Alexey Bataev <[email protected]>
1 parent cff0b6a commit 0ea7f0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/CodeGen/BasicTTIImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
798798
if (!DemandedElts[i])
799799
continue;
800800
if (Insert) {
801-
Value *InsertedVal = VL.size() ? VL[i] : nullptr;
801+
Value *InsertedVal = VL.empty() ? nullptr : VL[i];
802802
Cost += thisT()->getVectorInstrCost(Instruction::InsertElement, Ty,
803803
CostKind, i, nullptr, InsertedVal);
804804
}

0 commit comments

Comments
 (0)