[PATCH] D142292: [SCEV] Introduce `SCEVSelectExpr`

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 13:59:51 PST 2023


nikic added inline comments.


================
Comment at: llvm/test/Analysis/ScalarEvolution/exit-count-select-safe.ll:577
 ; CHECK-NEXT:    %cond = select i1 %cond_p0, i1 %cond_p1, i1 false
-; CHECK-NEXT:    --> (%cond_p0 umin %cond_p1) U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %loop: Variant }
+; CHECK-NEXT:    --> (select %cond_p0, %cond_p1, false) U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %loop: Variant }
 ; CHECK-NEXT:  Determining loop execution counts for: @logical_and_implies_poison1
----------------
nikic wrote:
> Regression, here and below. I think the regression itself isn't even particularly important, more that this loses most of our test coverage for implied poison reasoning in SCEV.
This is my only blocking concern, rest are suggestions. This can be addressed by either a) canonicalizing to umin_seq, b) duplicating the implied poison reasoning for selects or c) duplicating the implied poison test coverage to work with umin_seq between exit counts (which will definitely use a proper umin_seq, not a select). As said, I'm more concerned about the test coverage here than the fold for booleans specifically.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142292



More information about the llvm-commits mailing list