[PATCH] D54707: [X86][SSE] Remove unnecessary bit-and in pshufb vector ctlz (PR39703)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 19 09:12:11 PST 2018


RKSimon created this revision.
RKSimon added reviewers: craig.topper, spatel, andreadb.

SSE PSHUFB vector ctlz lowering works at the i4 nibble level. As detailed in PR39703, we were masking the lower nibble off but we only actually use it in the case where the upper nibble is known to be zero, making it safe to remove the mask and save an instruction.


Repository:
  rL LLVM

https://reviews.llvm.org/D54707

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/combine-srl.ll
  test/CodeGen/X86/prefer-avx256-lzcnt.ll
  test/CodeGen/X86/vector-lzcnt-128.ll
  test/CodeGen/X86/vector-lzcnt-256.ll
  test/CodeGen/X86/vector-lzcnt-512.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54707.174626.patch
Type: text/x-patch
Size: 135844 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181119/14507339/attachment-0001.bin>


More information about the llvm-commits mailing list