[PATCH] D150294: [X86] Transforming `(x*C0)&C1`->`(-x<<log2(C0&(-C0)))&C1`

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 08:20:34 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:50299-50301
+  //    (and (shl (sub 0, x), C0), C1)
+  // to
+  //    (and (mul x, (Pow2_Ceil(C1) - (1 << C0))), C1)
----------------
pengfei wrote:
> The comments don't match description. Maybe change one side.
hmm? Think its correct although it may be confusing because its talking about the transform we are undoing, not what we are doing. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150294



More information about the llvm-commits mailing list