diff options
author | Nikita Popov <npopov@redhat.com> | 2022-04-04 12:59:17 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-04-04 13:04:27 +0200 |
commit | 3c9f3f76f105196cd354a34f597b1ce88bee9b5d (patch) | |
tree | 94437ad5b5821083a91e8534a6c204ccfa16bbec /llvm/lib/CodeGen/CodeGen.cpp | |
parent | d092df42f342be733678a7798454557f92fe27f1 (diff) | |
download | llvm-3c9f3f76f105196cd354a34f597b1ce88bee9b5d.zip llvm-3c9f3f76f105196cd354a34f597b1ce88bee9b5d.tar.gz llvm-3c9f3f76f105196cd354a34f597b1ce88bee9b5d.tar.bz2 |
[ConstantFold] Fold zero-index GEPs with opaque pointers
With opaque pointers, we can eliminate zero-index GEPs even if
they have multiple indices, as this no longer impacts the result
type of the GEP.
This optimization is already done for instructions in InstSimplify,
but we were missing the corresponding constant expression handling.
The constexpr transform is a bit more powerful, because it can
produce a vector splat constant and also handles undef values --
it is an extension of an existing single-index transform.
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions