[PATCH] Use broadcasts to optimize overall size when loading constant splat vectors (x86-64 with AVX or AVX2)

Sanjay Patel spatel at rotateright.com
Mon Sep 15 09:23:04 PDT 2014


Hi Elena -

Thank you for the feedback. This function is already guarded against non-AVX CPUs. I've made that more explicit in the updated patch.

> You can take the broadcast to ymm as well.
> VBROADCASTSD ymm1,m64

This patch generates that - please see the testcases for expected output in both the AVX and AVX2 cases. Let me know if I missed something. I've tried to match the correct broadcast instruction with the vector element type in all cases, unless the ISA does not allow it.

http://reviews.llvm.org/D5347

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/splat-for-size.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5347.13713.patch
Type: text/x-patch
Size: 9277 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140915/82e5af94/attachment.bin>


More information about the llvm-commits mailing list