[PATCH] D111186: [SCEV] Infer flags from add/gep in any block

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 6 10:05:41 PDT 2021


nikic added a comment.

Compile-time impact looks acceptable: https://llvm-compile-time-tracker.com/compare.php?from=91d15aa0b8bff10bd1ccf279418560d17fea52ff&to=e9112b9b93ef7d96468bae3168c0d96c35d190c3&stat=instructions

> The comment is also suspect as well in that we're in the middle of constructing a SCEV for I. As such, we're going to visit all operands *anyways*.

I can only make a guess here, but what this might be referring to is the fact that SCEV construction from IR will coalesce add/sub and mul expressions into a single call of getAddExpr/getMulExpr rather than building up a chain of binary adds/muls. Effectively, the change you do here defeats that (for the case where the IR instruction has flags, even if they are inapplicable), because you will end up calling getSCEV on each individual add due to the operand fetch in the poison check.



================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/consecutive-access.ll:14
 ; that would hopefully be fixed. For now, check that this isn't
 ; vectorized.
 ; Function Attrs: nounwind ssp uwtable
----------------
Comment needs update.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111186/new/

https://reviews.llvm.org/D111186



More information about the llvm-commits mailing list