[x86] use an insert op to put one variable element into a constant of vectors
authorSanjay Patel <spatel@rotateright.com>
Thu, 26 Oct 2017 18:27:55 +0000 (18:27 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 26 Oct 2017 18:27:55 +0000 (18:27 +0000)
commitac50f3e9071eaeef20104ec4bb8a4ad588d55443
treef1f80e2c90dee80b72d233d460d3e17d5f2cbb78
parent1c45b09add3b9a254af8b85c9cbc37f16fc34f92
[x86] use an insert op to put one variable element into a constant of vectors

Instead of loading (a potential ton of) scalar constants, load those as a vector and then insert into it.

Differential Revision: https://reviews.llvm.org/D38756

llvm-svn: 316685
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/buildvec-insertvec.ll
llvm/test/CodeGen/X86/insert-into-constant-vector.ll