PNaCl SIMD: don't perform constant propagation in expand-shufflevector

Using the IR builder leads to extra optimizations which usually would be useful,
but in the case of shufflevector they make reconstructing the shuffles harder
when translating. This change therefore uses manual instruction insertion, and
adjusts the tests accordingly.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3893
TEST= (cd ./toolchain_build/out/llvm_i686_linux_work/ && ninja check)
R=dschuff@chromium.org

Review URL: https://codereview.chromium.org/365503004

(cherry picked from commit 6d1bf2a1a5448b52a6626418f6d63e3d9e907515)
Revert "ExpandTls: Directly expand GEP instructions. Additionally handle constantexpr bitcasts."

This reverts commit 463273ca8e1a3eaa5c4fe33439073b1af0000142.

Conflicts:
	lib/Transforms/NaCl/ExpandTls.cpp
Revert "NaCl Transforms: Add a light amount of instruction folding in some strategic places."

This reverts commit f6387d7f8bd7f7e612299e0836b79a127db01870.
Don't implicitly run -nacl-expand-tls-constant-expr in -nacl-expand-tls.
PNaCl: run constantmerge after globalizing constant vectors

This should help reduce the number of global constants, thereby reducing the
pexe size.

R=jvoung@chromium.org
BUG= none

Review URL: https://codereview.chromium.org/325913003

(cherry picked from commit 134ec52c2feeacde3734ac0bf6d3981c62ae658d)
PNaCl: Remove the TLS layout and llvm.nacl.target.arch intrinsics

I have removed the uses of these intrinsics in other changes.

This removes some localmods that would otherwise have required
updating for SelectionDAG changes when merging LLVM 3.4.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3760
TEST=PNaCl toolchain trybots
R=jvoung@chromium.org

Review URL: https://codereview.chromium.org/131673005

(cherry picked from commit b9e2d83229ce37c16febc84f738c2460b8ef9fe9)

Conflicts:
	include/llvm/CodeGen/ISDOpcodes.h
	lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
	lib/Target/ARM/ARMISelLowering.cpp
	lib/Target/Mips/MipsISelLowering.cpp
	lib/Target/X86/X86ISelLowering.cpp
	lib/Transforms/NaCl/ExpandTls.cpp
	test/NaCl/PNaClABI/intrinsics.ll
PNaCl ABI module verifier doesn't accept ConstantDataVector

The check on isSimpleElement already precludes anything that isn't an
ArrayType, it seems like a simple oversight to check for
ConstantDataSequential (the supertype of ConstantDataArray and
ConstantDataVector).

R=mseaborn@chromium.org, jvoung@chromium.org
TEST= none
BUG= none

Review URL: https://codereview.chromium.org/209083002

(cherry picked from commit d4846c775c6287dcab0ba7b4fee52098dcd561f2)
PNaCl: Don't try to expand extractvalue instructions that reference cmpxchg instructions.
Fix a use-after free issue caused by overzealous use of std::unique_ptr.
DebugIR: Set the debug info version if unset.