diff options
author | Nikita Popov <npopov@redhat.com> | 2023-06-29 10:28:28 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2023-07-07 09:56:33 +0200 |
commit | 336d7281ad61fbd4a14fa2ef3d2bde5a63d10417 (patch) | |
tree | 86c03e94589b5d568c0a75fbb9aeca1741076685 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 99074aafc31593c9935da483edab1333d6ce5a5b (diff) | |
download | llvm-336d7281ad61fbd4a14fa2ef3d2bde5a63d10417.zip llvm-336d7281ad61fbd4a14fa2ef3d2bde5a63d10417.tar.gz llvm-336d7281ad61fbd4a14fa2ef3d2bde5a63d10417.tar.bz2 |
[InstCombine] Preserve inbounds when folding select of GEP
The select base, (gep base, offset) to gep base, select (0, offset)
fold used to drop inbounds, because the gep base, 0 this introduces
might not be inbounds. After the semantics change in D154051, such
a GEP is always considered inbounds, in which allows us to preserve
the flag here.
As the PhaseOrdering test demonstrates, this can result in major
optimization improvements in some cases.
Differential Revision: https://reviews.llvm.org/D154055
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions