[PATCH] D150294: [X86] Transforming `(x*C0)&C1`->`(-x<<log2(C0&(-C0)))&C1`
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 11 08:26:53 PDT 2023
pengfei 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)
----------------
goldstein.w.n wrote:
> 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.
Just nitpick. I mean you use `C1/C2` in description but `C0/C1` here. Also `and/mul` vs. `&/*`.
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