[PATCH] D111191: [SCEV] Search operand tree for scope bound when inferring flags from IR

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 6 13:26:14 PDT 2021


reames added a comment.

In D111191#3046317 <https://reviews.llvm.org/D111191#3046317>, @nikic wrote:

> Why does this not recover this regression? https://reviews.llvm.org/D109789#inline-1056586 I would have thought that looking through the mul/zext would have helped there.

Not sure, but it looks to be some negative interaction of PSE and LoopAccessAnalysis.  The actual SCEV's look fine.

$ ./opt -enable-new-pm=0 -analyze -scalar-evolution scev-reduced.ll 
Printing analysis 'Scalar Evolution Analysis' for function 'test1':
Classifying expressions for: @test1
....

  %arrayidx = getelementptr inbounds i32, i32* %a, i64 %idxprom
  -->  ((4 * (zext i32 {1,+,1}<%for.body> to i64))<nuw><nsw> + %a)<nuw> U: full-set S: full-set		Exits: <<Unknown>>		LoopDispositions: { %for.body: Computable }


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

https://reviews.llvm.org/D111191



More information about the llvm-commits mailing list