[PATCH] [X86, AVX] instcombine vperm2 intrinsics with zero inputs into shuffles

Sanjay Patel spatel at rotateright.com
Tue Mar 24 10:11:24 PDT 2015


Patch updated based on email suggestion by Andrea (thanks!):
Rather than keeping the shuffle operand order fixed based on the inputs to the intrinsic, swap them as needed. This has 2 benefits:

1. It simplifies the zero vector replacement logic.
2. It creates a shuffle in a more canonical form; the x86 backend swaps shuffle operands to reduce accesses to the 2nd input in the low half of the result vector.


http://reviews.llvm.org/D8567

Files:
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  test/Transforms/InstCombine/x86-vperm2.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8567.22582.patch
Type: text/x-patch
Size: 7975 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150324/1ade7e86/attachment.bin>


More information about the llvm-commits mailing list