[PATCH] D140087: [X86] Replace (31/63 -/^ X) with (NOT X) and ignore (32/64 ^ X) when computing shift count
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 29 14:08:46 PST 2022
goldstein.w.n marked 2 inline comments as done.
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:4023-4025
+ // ISelLowering will convert this to NOT already.
+ if (ConstValOp->isAllOnes())
+ return false;
----------------
lebedev.ri wrote:
> Since we are already here, why not just do it ourselves?
> That would be less LOC even.
Done.
================
Comment at: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:4028
+ NewShiftAmt = CurDAG->getNOT(DL, Add0C == nullptr ? Add0 : Add1, OpVT);
+
+ insertDAGNode(*CurDAG, OrigShiftAmt, NewShiftAmt);
----------------
lebedev.ri wrote:
> Remove newline
Done.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140087/new/
https://reviews.llvm.org/D140087
More information about the llvm-commits
mailing list