[VectorUtils] Do not try to add indices matching tombstone/empty values.
authorFlorian Hahn <flo@fhahn.com>
Mon, 18 Jan 2021 10:34:21 +0000 (10:34 +0000)
committerFlorian Hahn <flo@fhahn.com>
Mon, 18 Jan 2021 11:18:28 +0000 (11:18 +0000)
commit83aa93e99542dbbfc5223130482ad6d7744d9a78
tree96a6d2e54f7e7d02206c6840726e70623fbaedcc
parent3bd24574c7d0187e69780540fe0681914d71794f
[VectorUtils] Do not try to add indices matching tombstone/empty values.

Keys matching the tombstone/empty special values cannot be inserted in a
DenseMap. Under some circumstances, LV tries to add members to an
interleave group that match the special values. Skip adding such
members. This is unlikely to have any impact in practice, because
interleave groups with such indices are very likely to not be
vectorized, due to gaps.

This issue has been surfaced by fuzzing, see
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11638
llvm/include/llvm/Analysis/VectorUtils.h
llvm/test/Transforms/LoopVectorize/X86/interleaved-accesses-large-gap.ll