IR: Disallow complicated function-local metadata

Disallow complex types of function-local metadata.  The only valid
function-local metadata is an `MDNode` whose sole argument is a
non-metadata function-local value.

Part of PR21532.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223564 91177308-0d34-0410-b5e6-96231b3b80d8
SelectionDAG switch lowering: Replace unreachable default with most popular case.

This can significantly reduce the size of the switch, allowing for more
efficient lowering.

I also worked with the idea of exploiting unreachable defaults by
omitting the range check for jump tables, but always ended up with a
non-neglible binary size increase. It might be worth looking into some more.

SimplifyCFG currently does this transformation, but I'm working towards changing
that so we can optimize harder based on unreachable defaults.

Differential Revision: http://reviews.llvm.org/D6510

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223566 91177308-0d34-0410-b5e6-96231b3b80d8
[X86] Refactor PMOV[SZ]Xrm to add missing AVX2 patterns.

Most patterns will go away once the extload legalization changes land.

Differential Revision: http://reviews.llvm.org/D6125


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223567 91177308-0d34-0410-b5e6-96231b3b80d8
llvm/test/CodeGen/X86/switch-jump-table.ll: Add explicit triple. Local labels have a prefix "." for targeting i686-cygming.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223570 91177308-0d34-0410-b5e6-96231b3b80d8
Add a proper triple to switch-jump-table.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223571 91177308-0d34-0410-b5e6-96231b3b80d8
Fix typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223572 91177308-0d34-0410-b5e6-96231b3b80d8
LLVMInstrumentation requires MC since r223532.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223573 91177308-0d34-0410-b5e6-96231b3b80d8