[PATCH] D77301: [TargetLowering] Improve expansion of FSHL/FSHR

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 14:39:04 PDT 2020


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:6032
+  // fshl: X << (Z % BW) | Y >> 1 >> (BW - 1 - (Z % BW))
+  // fshr: X << 1 << (BW - 1 - (Z % BW)) | Y >> (Z % BW)
   SDValue X = Node->getOperand(0);
----------------
Incidently, DAGCombiner::MatchRotate doesn't currently recognise this pattern to CREATE funnel shifts / rotates - X86 handles it in combineOrShiftToFunnelShift, which is the last part that needs to be moved to DAGCombiner before we can close PR40081.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77301





More information about the llvm-commits mailing list