[PATCH] D42772: [X86] Allow KTEST instruction to be used for testing if a mask is all ones

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 17:37:19 PST 2018


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

The KTEST instruction sets the C flag if the result of anding both operands together is all 1s. We can use this to lower (icmp eq/ne (bitcast (vXi1 X), -1)


https://reviews.llvm.org/D42772

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/avx512-mask-op.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42772.132299.patch
Type: text/x-patch
Size: 3236 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180201/5f7b9c67/attachment.bin>


More information about the llvm-commits mailing list