[PATCH] D75961: [InstCombine] reduce demand-limited bool math to logic
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 10 16:26:21 PDT 2020
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:457
case Instruction::Add:
+ if (DemandedMask.isSignMask()) {
+ // Try to convert bool math to logic:
----------------
Wouldn't it be sufficient to check that the LSB is not demanded? I don't think we care that specifically the MSB is demanded, any of the top bits could be.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75961/new/
https://reviews.llvm.org/D75961
More information about the llvm-commits
mailing list