[PATCH] [X86, AVX] recognize shufflevector with zero input as a vperm2 (PR22984)

Sanjay Patel spatel at rotateright.com
Mon Mar 23 13:29:51 PDT 2015


Hi mkuper, andreadb, RKSimon, chandlerc,

vperm2x128 instructions have the special ability (aka free hardware capability) to shuffle zero values into a vector. 

This patch recognizes that type of shuffle and generates the appropriate control byte.

Note: I have a follow-on patch to convert vperm2 intrinsics with zero masks into generic shuffles. That should close the loop on this special-purpose x86 permute.

https://llvm.org/bugs/show_bug.cgi?id=22984

http://reviews.llvm.org/D8563

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/avx-vperm2x128.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8563.22511.patch
Type: text/x-patch
Size: 8778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150323/4f7a9646/attachment.bin>


More information about the llvm-commits mailing list