diff options
author | Nikita Popov <npopov@redhat.com> | 2024-09-13 10:38:34 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2024-09-13 11:15:22 +0200 |
commit | 1c298c927498983dee29037ed1d3e71b72ca0082 (patch) | |
tree | 22039f87c04937ce18d89a8f6cf8556409b9de4d /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | a0f88901a4e6a6618c3ec02108103d0415e28834 (diff) | |
download | llvm-1c298c927498983dee29037ed1d3e71b72ca0082.zip llvm-1c298c927498983dee29037ed1d3e71b72ca0082.tar.gz llvm-1c298c927498983dee29037ed1d3e71b72ca0082.tar.bz2 |
[InstCombine] Preserve nuw flags when merging geps
These transforms all perform a variant of (gep (gep p, x), y)
to (gep p, (x + y)). We can preserve both inbounds and nuw
during such transforms (https://alive2.llvm.org/ce/z/Stu4cN), but
not nusw, which would require proving that the new add is nsw.
For the constant offset case, I've conservatively retained the
logic that checks for negative intermediate offsets, though I'm
not sure it's still reachable nowadays.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions