[PATCH] D141653: [X86] Improve instruction ordering of constant `srl/shl` with `and` to get better and-masks

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 29 18:19:09 PST 2023


pengfei added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:4013-4015
+  /// @param Shift1 outer shift Node
+  /// @param Op to combine shifts across
+  /// @param Shift2 inner shift Node
----------------
Is `Shift1` inner and `Shift2` outer?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9414
   return SDValue();
-}
+  }
 
----------------
pengfei wrote:
> Unintended change.
This still no changed.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:56685-56686
+bool X86TargetLowering::isDesirableToCombineShiftsAcross(
+    const SDNode *Shift1, const SDNode *Op, SDNode *Shift2,
+    CombineLevel Level) const {
+  return true;
----------------
The arguments are not used. Leave it `void` for now?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141653



More information about the llvm-commits mailing list