[PATCH] D44102: Teach CorrelatedValuePropagation to reduce the width of udiv/urem instructions.
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 5 13:22:44 PST 2018
spatel added reviewers: anna, davide, reames.
spatel added a comment.
I think this is the right approach, but I don't know much about CVP, so adding more potential reviewers.
Context: This is part of improving udiv/urem IR as discussed in the latest comments on https://reviews.llvm.org/D37121.
Motivation: Narrowing the width of these ops improves bit-tracking / analysis and potentially enables further IR transforms.
Bonus: It also aligns with codegen transforms such as the magic number division mentioned by Justin and improves perf for targets that have faster narrow div/rem instructions.
We have basic div/rem narrowing folds in instcombine, but we want to handle cases like this where edge info and/or computeKnownBits would also allow narrowing. Is it preferred to use ValueTracking here to get the single BB case or should that be added to InstCombine?
https://reviews.llvm.org/D44102
More information about the llvm-commits
mailing list