[PATCH] D111896: [indvars] Canonicalize exit conditions to unsigned using range info

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 15 10:58:28 PDT 2021


nikic added a comment.

My main question here would be why we need this in IndVars. This doesn't really seem to be related to IV or loop based reasoning, but is a generic range based transform. Even InstCombine can handle this (based on known bits): https://godbolt.org/z/drGfM4K9o And as Roman mentioned on the other review, CVP could do this based on ranges as well.

Now, if this case simply fell out of existing code (i.e. if the "visiting more users" approach worked) I'd understand, but it's not super clear to me why we need to go out of the way to handle this here. Is this addressing some kind of phase ordering issue?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111896



More information about the llvm-commits mailing list