[PATCH] D58197: [x86] vectorize more cast ops in lowering to avoid register file transfers

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 13 11:20:54 PST 2019


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

This is a follow-up to D56864 <https://reviews.llvm.org/D56864>.

If we're extracting from a non-zero index before casting to FP, then shuffle the vector and optionally narrow the vector before doing the cast:

  cast (extelt V, C) --> extelt (cast (extract_subv (shuffle V, [C...]))), 0

This might be enough to close PR39974:
https://bugs.llvm.org/show_bug.cgi?id=39974


https://reviews.llvm.org/D58197

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/known-signbits-vector.ll
  llvm/test/CodeGen/X86/vec_int_to_fp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58197.186701.patch
Type: text/x-patch
Size: 7916 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190213/ae483b21/attachment.bin>


More information about the llvm-commits mailing list