diff options
author | Dan Gohman <dev@sunfishcode.online> | 2024-12-10 06:28:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-10 06:28:09 -0800 |
commit | e665e781dc3f8fac0400f6ac8e168805b0cdf74a (patch) | |
tree | 558107080321426f94606558bb6d8fd37aef35bb /llvm/lib/Transforms/Utils/LoopRotationUtils.cpp | |
parent | 0ee5924d9bc01c5625a41833dd9d88b89c98d986 (diff) | |
download | llvm-e665e781dc3f8fac0400f6ac8e168805b0cdf74a.zip llvm-e665e781dc3f8fac0400f6ac8e168805b0cdf74a.tar.gz llvm-e665e781dc3f8fac0400f6ac8e168805b0cdf74a.tar.bz2 |
[SelectionDAG] Use the nuw flag when expanding loads. (#119288)
When expanding a load into two loads, use nuw for the add that computes
the offset from the base of the second load, because the original load
doesn't straddle the address space.
It turns out there's already a dedicated helper function for doing this,
`getObjectPtrOffset`.
This is in target-independent code, however in practice it only seems to
affact WebAssembly code, because WebAssembly load and store
instructions' constant offsets don't perform wrapping, so constant
folding often depends on the nuw flag being present.
This was noticed in the development of #119204.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
0 files changed, 0 insertions, 0 deletions