[PATCH] D81327: [X86] Teach combineBitcastvxi1 to prefer movmsk on avx512 in more cases

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 23:16:24 PDT 2020


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

If the input to the bitcast is a sign bit test, it makes sense to
directly use vpmovmskb or vmovmskps/pd. This removes the need to
copy the sign bits to a k-register and then to a GPR.

Fixes PR46200.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81327

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/avx512bwvl-intrinsics-upgrade.ll
  llvm/test/CodeGen/X86/avx512dqvl-intrinsics-upgrade.ll
  llvm/test/CodeGen/X86/bitcast-setcc-256.ll
  llvm/test/CodeGen/X86/bitcast-vector-bool.ll
  llvm/test/CodeGen/X86/movmsk-cmp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81327.268996.patch
Type: text/x-patch
Size: 16775 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200606/b7109d7d/attachment.bin>


More information about the llvm-commits mailing list