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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 22 02:51:10 PST 2023


nikic added a comment.

I think modelling selects in SCEV makes sense, and from a brief look the patch is pretty straightforward.

What I didn't really understand are your examples in the patch description. The referenced godbolt examples don't contain select instructions, and the input program also doesn't look like it should involve selects, so I'm a bit unclear on the relation these examples have to the patch.

Looking at the test diffs, I'm wondering whether the canonical form for logical and should be `%a umin_seq %b` or `select %a, %b, false`. I can see arguments in favor of both (the former has symmetry with bitwise and `%a umin %b`, the latter is more in line with IR and extends to logical or, where we don't have `umax_seq`). Probably doesn't matter much either way (I don't think we particularly care about modelling of i1 values in SCEV).


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