[PATCH] [X86, AVX] recognize shufflevector with zero input as a vperm2 (PR22984)
Sanjay Patel
spatel at rotateright.com
Mon Mar 23 13:45:00 PDT 2015
Forgot to mention - the codegen difference looks like this:
vxorps %ymm1, %ymm1, %ymm1
vinsertf128 $1, %xmm0, %ymm1, %ymm0
becomes:
vperm2f128 $40, %ymm0, %ymm0, %ymm0
Or this:
vxorps %ymm1, %ymm1, %ymm1
vperm2f128 $33, %ymm1, %ymm0, %ymm0
becomes:
vperm2f128 $129, %ymm0, %ymm0, %ymm0
I didn't include negative test cases because I think those are thoroughly covered by existing tests for vinsertf128, vblend, and vperm2f128.
http://reviews.llvm.org/D8563
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list