[PATCH] D22038: [X86] Transform zext+seteq+cmp into shr+lzcnt on btver2 architecture.

pierre gousseau via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 03:08:41 PDT 2016


pgousseau created this revision.
pgousseau added reviewers: qcolombet, RKSimon, spatel, andreadb.
pgousseau added a subscriber: llvm-commits.

Hi All,

I would like to propose a change to turn zext+seteq+cmp into shr+lzcnt.
This optimisation is beneficial on Jaguar architecture only, where the lzcnt has a good reciprocal throughput.
Other architectures such as Intel's Haswell/Broadwell or AMD's Bulldozer/PileDriver do not benefit from it.
For this reason the change also add a "HasFastLZCNT" feature which gets enabled for Jaguar.

http://reviews.llvm.org/D22038

Files:
  lib/Target/X86/X86.td
  lib/Target/X86/X86InstrInfo.td
  lib/Target/X86/X86InstrShiftRotate.td
  lib/Target/X86/X86Subtarget.cpp
  lib/Target/X86/X86Subtarget.h
  test/CodeGen/X86/lzcnt-zext-cmp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22038.62837.patch
Type: text/x-patch
Size: 8268 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160706/61fca378/attachment.bin>


More information about the llvm-commits mailing list