[PATCH] D62871: [Codegen] (X & (C l>>/<< Y)) ==/!= 0 --> ((X <</l>> Y) & C) ==/!= 0 fold

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 14:30:37 PDT 2019


efriedma added a comment.

LGTM with one minor change.



================
Comment at: include/llvm/CodeGen/TargetLowering.h:538
+  /// Return true if the target has a bit-test instruction:
+  ///   (X & (1 << Y)) ==/!= 0
+  virtual bool hasBitTest(SDValue X, SDValue Y) const { return false; }
----------------
Maybe worth clarifying here that the point of this hook is to prevent DAGCombine from breaking the pattern?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62871





More information about the llvm-commits mailing list