[PATCH] D116766: [SCEV] Poison-safe `UMin` expression

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 7 01:13:46 PST 2022


aqjune added a comment.

Since `x == 0 ? x : umin(x, y)` cannot be represented using the current SCEV operations (at least using the ops in `SCEVTypes`). I believe the new ops in this patch are necessary.
Another approach to support such expressions would be adding a ternary operator and comparisons to SCEV, but it would require bigger changes, I guess?

On the other hand, I think operations in SCEV must be clear about how it deals with poison values.
Can we assume that inputs/outputs of operations in SCEV can be poison in general, or it is allowed only for certain operations like `SafeUMinExpr`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116766



More information about the llvm-commits mailing list