[PATCH] D52426: [X86] Move X86DAGToDAGISel::matchBEXTRFromAnd() into X86ISelLowering

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 10 17:52:10 PDT 2018


craig.topper added a comment.

For the PR we're trying to fix, perhaps we should be looking at these 3 similar functions in X86ISelDAGToDAG.cpp that are called when an address computation comes from a SHL+AND

  if (!foldMaskAndShiftToExtract(*CurDAG, N, Mask, Shift, X, AM))
    return false;
  
  // Try to fold the mask and shift directly into the scale.
  if (!foldMaskAndShiftToScale(*CurDAG, N, Mask, Shift, X, AM))
    return false;
  
  // Try to swap the mask and shift to place shifts which can be done as
  // a scale on the outside of the mask.
  if (!foldMaskedShiftToScaledMask(*CurDAG, N, Mask, Shift, X, AM))
    return false;


Repository:
  rL LLVM

https://reviews.llvm.org/D52426





More information about the llvm-commits mailing list