[PATCH] D140314: [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
Mon Dec 19 09:22:15 PST 2022
goldstein.w.n created this revision.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
goldstein.w.n requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Shift count is masked by hardware so these peepholes just extend
common patterns for NOT to the lower bits of shift count.
As well (32/64 ^ X) is masked off by the shift so can be safely
ignored.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D140314
Files:
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/test/CodeGen/X86/legalize-shift-64.ll
llvm/test/CodeGen/X86/not-shift.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140314.483986.patch
Type: text/x-patch
Size: 12060 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221219/fb08a668/attachment.bin>
More information about the llvm-commits
mailing list