diff options
author | Nikita Popov <npopov@redhat.com> | 2022-01-04 15:24:14 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-01-11 09:25:29 +0100 |
commit | 2d1b55ebea88547d153fcd980b88c946cffc5ca5 (patch) | |
tree | 751b469ab43b0c22b9a0d6ec394b8d1b3c792962 /llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp | |
parent | 065e0324e5e4a281abc199d6e4e45d7bc852a486 (diff) | |
download | llvm-2d1b55ebea88547d153fcd980b88c946cffc5ca5.zip llvm-2d1b55ebea88547d153fcd980b88c946cffc5ca5.tar.gz llvm-2d1b55ebea88547d153fcd980b88c946cffc5ca5.tar.bz2 |
[CodeGen] Make element type in emitArrayDestroy() predictable
When calling emitArrayDestroy(), the pointer will usually have
ConvertTypeForMem(EltType) as the element type, as one would expect.
However, globals with initializers sometimes don't use the same
types as values normally would, e.g. here the global uses
{ double, i32 } rather than %struct.T as element type.
Add an early cast to the global destruction path to avoid this
special case. The cast would happen lateron anyway, it only gets
moved to an earlier point.
Differential Revision: https://reviews.llvm.org/D116219
Diffstat (limited to 'llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp')
0 files changed, 0 insertions, 0 deletions