Scalarizer: fix an opaque pointer bug
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 5 Dec 2022 17:21:59 +0000 (18:21 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 8 Dec 2022 19:48:14 +0000 (20:48 +0100)
commit6c379cb318d74dfd63667dc62c026a5819f0b934
tree18ff2c6fb876683624982d77217c82f6a72c2a39
parent1a78c64654cde1960be70fe532e999aff2aaa5bc
Scalarizer: fix an opaque pointer bug

With opaque pointers, it's possible for the same pointer value to be
used to store different vector types (both number and type of elements),
so we need to take that into account when caching the scattering.

Differential Revision: https://reviews.llvm.org/D139359
llvm/lib/Transforms/Scalar/Scalarizer.cpp
llvm/test/Transforms/Scalarizer/opaque-ptr-bug.ll [new file with mode: 0644]