Using Inst->setMetadata(..., NULL) should be safe to remove metadata even when
there is non of that type to remove. This fixes a crasher in the particular
case where the instruction has metadata but no metadata storage in the context
(this is only possible if the instruction has !dbg but no other metadata info).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147285 91177308-0d34-0410-b5e6-96231b3b80d8
Teach simplifycfg to recompute branch weights when merging some branches, and
to discard weights when appropriate. Still more to do (and a new TODO), but
it's a start!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147286 91177308-0d34-0410-b5e6-96231b3b80d8
Add handling of x86_avx2_pmovmskb to computeMaskedBitsForTargetNode for consistency. Add comments and an assert for BMI instructions to PerformXorCombine since the enabling of the combine is conditional on it, but the function itself isn't.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147287 91177308-0d34-0410-b5e6-96231b3b80d8
Clean up some Release build warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147289 91177308-0d34-0410-b5e6-96231b3b80d8
Turn cos(-x) into cos(x). Patch by Alexander Malyshev!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147291 91177308-0d34-0410-b5e6-96231b3b80d8
Use false not zero, as a bool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147292 91177308-0d34-0410-b5e6-96231b3b80d8
Switch StringMap from an array of structures to a structure of arrays.

- -25% memory usage of the main table on x86_64 (was wasted in struct padding).
- no significant performance change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147294 91177308-0d34-0410-b5e6-96231b3b80d8
PR11642 has been fixed, enable -fvisibility-inlines-hidden everywhere.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147307 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed a bug in LowerVECTOR_SHUFFLE and LowerBUILD_VECTOR.
Matching MOVLP mask for AVX (265-bit vectors) was wrong.
The failure was detected by conformance tests.



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

Promotion of the mask operand needs to be done using PromoteTargetBoolean, and not padded with garbage.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147309 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for mipsel in configure. Fixes PR11669. Patch by Sylvestre Ledru.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147312 91177308-0d34-0410-b5e6-96231b3b80d8
Update OCaml bindings for the new half float type.
Patch by Jonathan Ragan-Kelley!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147314 91177308-0d34-0410-b5e6-96231b3b80d8
Fix type-checking for load transformation which is not legal on floating-point types.  PR11674.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147323 91177308-0d34-0410-b5e6-96231b3b80d8
Change CaptureTracking to pass a Use* instead of a Value* when a value is
captured. This allows the tracker to look at the specific use, which may be
especially interesting for function calls.

Use this to fix 'nocapture' deduction in FunctionAttrs. The existing one does
not iterate until a fixpoint and does not guarantee that it produces the same
result regardless of iteration order. The new implementation builds up a graph
of how arguments are passed from function to function, and uses a bottom-up walk
on the argument-SCCs to assign nocapture. This gets us nocapture more often, and
does so rather efficiently and independent of iteration order.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147327 91177308-0d34-0410-b5e6-96231b3b80d8
Fix grammar error noticed by Duncan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147333 91177308-0d34-0410-b5e6-96231b3b80d8
Remove trailing spaces. Fix an assert to use && instead of || before string. Add same assert on similar code path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147335 91177308-0d34-0410-b5e6-96231b3b80d8
Remove some elses after returns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147336 91177308-0d34-0410-b5e6-96231b3b80d8
Make LowerBUILD_VECTOR keep node vector types consistent when creating MOVL for v16i16 and v32i8.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147337 91177308-0d34-0410-b5e6-96231b3b80d8
Make SSE42 and SSE4A not imply POPCNT. POPCNT should be able to be disabled on its own without disabling SSE4.2 or SSE4A.

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