[PATCH] D121147: [x86] try harder to use shift instead of test if it can save some immediate bytes

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 9 16:06:03 PST 2022


MatzeB added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:5632
           ShiftAmt = countLeadingZeros(Mask);
         }
         if (ShiftOpcode != ISD::DELETED_NODE) {
----------------
MatzeB wrote:
> RKSimon wrote:
> > If we added shifted mask detection would we hit any of the folds that D121320 is targetting?
> Most likely yes. Let me try to put my transformation into this part of the code...
I changed D121320 now to update this part of the code. However I think the cases are different enough that we can discuss this diff and D121320 separately.


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

https://reviews.llvm.org/D121147



More information about the llvm-commits mailing list