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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 6 23:57:47 PST 2022


nikic added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:3902
+                                         bool PoisonSafe) {
+  return getMinMaxExpr(PoisonSafe ? scSafeUMinExpr : scUMinExpr, Ops);
 }
----------------
getMinMaxExpr() currently assumes that the operands are commutative, e.g. in GroupByComplexity. Some of the folds would have to be skipped or done differently for "safe umin".


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