[Inliner] Teach inliner to merge 'min-legal-vector-width' function attribute
authorCraig Topper <craig.topper@intel.com>
Tue, 24 Jul 2018 18:49:00 +0000 (18:49 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 24 Jul 2018 18:49:00 +0000 (18:49 +0000)
commit1d504f777e10de18e361d631a7e3a91588718e6c
tree16854248f7de55d53755c655bae0d63e1e070b27
parent1296c622df31722a39a912f139e2e818dd9e40cf
[Inliner] Teach inliner to merge 'min-legal-vector-width' function attribute

When we inline a function with a min-legal-vector-width attribute we need to make sure the caller also ends up with at least that vector width.

This patch is necessary to make always_inline functions like intrinsics propagate their min-legal-vector-width. Though nothing uses min-legal-vector-width yet.

A future patch will add heuristics to preventing inlining with different vector width mismatches. But that code would need to be in inline cost analysis which is separate from the code added here.

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

llvm-svn: 337844
llvm/include/llvm/IR/Attributes.td
llvm/lib/IR/Attributes.cpp