aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGen.cpp
diff options
context:
space:
mode:
authorRamkumar Ramachandra <ramkumar.ramachandra@codasip.com>2024-10-22 09:55:51 +0100
committerGitHub <noreply@github.com>2024-10-22 09:55:51 +0100
commitf719cfa8685a30a3f4115cc0ce446262daf81244 (patch)
tree65f06768522d2566b40ffab50788ffb3ea7d530d /llvm/lib/CodeGen/CodeGen.cpp
parentd15559d69d519cae203508b1ffe3adbdd29ab387 (diff)
downloadllvm-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