[PATCH] D133788: [InstCombine] try multi-use demanded bits folds for 'add'
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 13 12:46:43 PDT 2022
nikic added a comment.
> The 2nd part avoids computing known bits for every other multi-use add (giving the small improvement in compile-time). That also results in the test diffs that show large unsigned constants becoming small negative numbers. That should make analysis easier and codegen better in most cases.
I think it might make sense to separate these two changes if we can do so reasonably cheaply. Rather then calling computeKnownBits on the add, which will unnecessarily repeat the two recursive calls, can we call KnownBits::computeForAddSub() on the computed results? I expect that would be about compile-time neutral, while retaining existing behavior.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133788/new/
https://reviews.llvm.org/D133788
More information about the llvm-commits
mailing list