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

Sanjay Patel spatel at rotateright.com
Sun Apr 5 15:40:36 PDT 2015

In http://reviews.llvm.org/D8833#151824, @RKSimon wrote:

> This is looking pretty good. If the reason you haven't used the zmask more is to avoid the need for multiple shuffle stages is it worthwhile checking if the zmask (only) overrides the insertion destination, or cases where the 2 operands point to the same variable?

I thought about the case where the zmask overrides the insert, but I figured that was pretty far-fetched. I didn't consider the case where both inputs are the same. Let me know if you think those are worth chasing as stand-alone cases or if it's better to just solve the zmask case in general in the backend. Even if the oddball cases are worthy, I'd prefer to solve them in a follow-on patch just for the sake of patch minimalism.



More information about the llvm-commits mailing list