[PATCH] D130075: [InstCombine] Try not to demand low order bits for Add
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 19 04:08:18 PDT 2022
foad added a comment.
This is still WIP because I need to write a better test for it.
Related to D129844 <https://reviews.llvm.org/D129844>.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:519-521
+ unsigned NTZ = (~DemandedMask & RHSKnown.Zero).countTrailingOnes();
+ APInt DemandedFromLHS = DemandedFromOps;
+ DemandedFromLHS.clearLowBits(NTZ);
----------------
This is the important change. The rest is just refactoring.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130075/new/
https://reviews.llvm.org/D130075
More information about the llvm-commits
mailing list