[PATCH] D73647: [InstCombine] Support non-splat vectors in icmp eq + add/sub fold

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 29 12:07:56 PST 2020


nikic marked 2 inline comments as done.
nikic added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:2933
-    if (match(BOp1, m_APInt(BOC))) {
-      if (BO->hasOneUse()) {
-        Constant *SubC = ConstantExpr::getSub(RHS, cast<Constant>(BOp1));
----------------
lebedev.ri wrote:
> :/
IIRC that one actually has a somewhat sensible motivation... it prevents post-inc IVs from being converted to pre-inc IVs, which LSR cannot always recover.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73647





More information about the llvm-commits mailing list