[SLP] Fix infinite loop in isUndefVector.
authorFlorian Hahn <flo@fhahn.com>
Sun, 19 Feb 2023 21:42:04 +0000 (21:42 +0000)
committerFlorian Hahn <flo@fhahn.com>
Sun, 19 Feb 2023 21:42:24 +0000 (21:42 +0000)
commitf61c9b75690e8c374a99332b9b837bf8f77bfc90
tree09a7ff1c02c7347294c4c356e0fb60e66f3ef2d8
parentd41a73aa94cb8945dcd0f2906992c2fcea6ed001
[SLP] Fix infinite loop in isUndefVector.

This fixes an infinite loop if isa<T>(II->getOperand(1)) is true.
Update Base at the top of the loop, before the continue.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D144292
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/AArch64/insertelement.ll