[PATCH] [X86, SSE] instcombine common cases of insertps intrinsics into shuffles

Sanjay Patel spatel at rotateright.com
Sat Apr 4 14:22:01 PDT 2015


Hi andreadb, craig.topper, RKSimon,

This is very similar to D8486 (vperm2). If we treat insertps intrinsics as shufflevectors, we can optimize them better.

I've left all but the full zero case of the zero mask variants out of this patch. I don't think those can be converted into a single shuffle in all cases, but I'd be happy to be proven wrong as I was for vperm2f128.

Either way, we'd need to support whatever sequence we come up with for those cases in the backend before converting them here.

http://reviews.llvm.org/D8833

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

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8833.23251.patch
Type: text/x-patch
Size: 7226 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150404/2f748d60/attachment.bin>


More information about the llvm-commits mailing list