[PATCH] D108601: [SCEV] Infer nsw/nuw from nw for addrecs
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 24 09:16:29 PDT 2021
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:2393-2394
+ // <0,+,nonnegative><nw> is also nuw
+ // <INT_MIN,+,nonnegative><nw> is also nsw
+ if (Type == scAddRecExpr && ScalarEvolution::hasFlags(Flags, SCEV::FlagNW) &&
----------------
Comment implies that the step must be non-negative in both cases,
but enforces that only in the first case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108601/new/
https://reviews.llvm.org/D108601
More information about the llvm-commits
mailing list