Skip to content

Commit 9ebb6e4

Browse files
committed
update comment
1 parent f27edf3 commit 9ebb6e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,8 @@ bool VectorCombine::foldInsExtFNeg(Instruction &I) {
685685
if (!SrcVecTy || DstVecScalarTy != SrcVecTy->getScalarType())
686686
return false;
687687

688-
// Ignore bogus insert/extract index.
688+
// Ignore if insert/extract index is out of bounds or destination vector has
689+
// one element
689690
unsigned NumDstElts = DstVecTy->getNumElements();
690691
unsigned NumSrcElts = SrcVecTy->getNumElements();
691692
if (InsIdx >= NumDstElts || ExtIdx >= NumSrcElts || NumDstElts == 1)

0 commit comments

Comments
 (0)