Files
clang-p2996/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
Nikita Popov 57a8ea8553 [InstCombine] Avoid infinite loop in insert/extract combine
Fix the infinite loop reported on https://reviews.llvm.org/D151807#4420467.

collectShuffleElements() will widen vectors and replace extracts
via replaceExtractElements(), to allow the next call of
collectShuffleElements() to fold. However, it's possible for another
fold to run first, and break the expected sequence again. To ensure
this does not happen, directly rerun the collectShuffleElements()
fold if we have adjusted extracts.
2023-06-14 14:58:49 +02:00

126 KiB