[llvm] [SCEV] Check AR's wrap flags when expanding in non-post increment loops. (PR #77827)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 11 13:06:48 PST 2024


nikic wrote:

Does this code need to care about post-inc addrecs at all? At this point, we're expanding the (normalized) pre-inc addrec. If we introduce a post-inc use, then we'll explicitly clear the nowrap flags if necessary here: https://github.com/llvm/llvm-project/blob/40f5f90507725c1f93779c0e6e8d5a13854b4a3f/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp#L1094-L1103 This makes me think that we'll automatically handle post-inc correctly via that code. (Note that this was introduced only after the referenced commit.)

https://github.com/llvm/llvm-project/pull/77827


More information about the llvm-commits mailing list