[PATCH] D46047: [SCEV] Introduce bulk umin creation utilities
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 25 09:54:50 PDT 2018
sanjoy accepted this revision.
sanjoy added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/Analysis/ScalarEvolution.cpp:3552
// ~smax(~x, ~y) == smin(x, y).
return getNotSCEV(getSMaxExpr(getNotSCEV(LHS), getNotSCEV(RHS)));
}
----------------
Please also change these binary functions to call into the general n-ary `getSMinExpr` etc (like we do for e.g. `getAddExpr`).
================
Comment at: lib/Analysis/ScalarEvolution.cpp:6715
+ for (unsigned i = 0; i < Ops.size(); i++)
+ Ops[i] = SE->getNoopOrZeroExtend(Ops[i], MaxType);
+
----------------
Probably better to also add an n-ary version of `getUMinFromMismatchedTypes` instead of repeating the logic here?
https://reviews.llvm.org/D46047
More information about the llvm-commits
mailing list