diff options
author | Ramkumar Ramachandra <ramkumar.ramachandra@codasip.com> | 2024-10-22 09:55:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-22 09:55:51 +0100 |
commit | f719cfa8685a30a3f4115cc0ce446262daf81244 (patch) | |
tree | 65f06768522d2566b40ffab50788ffb3ea7d530d /llvm/lib/CodeGen/CodeGen.cpp | |
parent | d15559d69d519cae203508b1ffe3adbdd29ab387 (diff) | |
download | llvm-f719cfa8685a30a3f4115cc0ce446262daf81244.zip llvm-f719cfa8685a30a3f4115cc0ce446262daf81244.tar.gz llvm-f719cfa8685a30a3f4115cc0ce446262daf81244.tar.bz2 |
LAA: be less conservative in isNoWrap (#112553)
isNoWrap has exactly one caller which handles Assume = true separately,
but too conservatively. Instead, pass Assume to isNoWrap, so it is
threaded into getPtrStride, which has the correct handling for the
Assume flag. Also note that the Stride == 1 check in isNoWrap is
incorrect: getPtrStride returns Strides == 1 or -1, except when
isNoWrapAddRec or Assume are true, assuming ShouldCheckWrap is true; we
can include the case of -1 Stride, and when isNoWrapAddRec is true. With
this change, passing Assume = true to getPtrStride could return a
non-unit stride, and we correctly handle that case as well.
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions