This patch implements .set dsp directive and sets appropriate feature bits.This directive is a counterpart of -mattr=dsp command line option with the exception that it does not influence elf header flags. The usage example is gives in test file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202966 91177308-0d34-0410-b5e6-96231b3b80d8
Enable integrated assembler on OpenBSD/PPC32 by default, too.
From Brad Smith.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202967 91177308-0d34-0410-b5e6-96231b3b80d8
[LangRef] Improve llvm.mem.parallel_loop_access example

The following changes have been applied:

  - Removed 'align 4'. We can simplify this away, as it does not provide useful
    information in the example.
  - Use named instructions instead of '%0'. This is nicer, but more importantly
    this makes the IR valid. Before we had two assignments to %0 in a single
    example.
  - Add a missing branch instruction to make the loop structure clear.
  - Move one access into outer.for.body to make it not look that empty.
  - The statments that are only in the outer loop body should not reference the
    inner loop metadata, but only the outer loop. Only statements in both loops
    should reference both surrounding loops.
  - Rename the array indexes to make them all independent. Before there were
    identical array indexes in the inner and the outer loop. We want to
    avoid this special case as it may lead to confusion.

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

A version of RefCountedBase that uses std::atomic_int to store its
reference count.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202984 91177308-0d34-0410-b5e6-96231b3b80d8
ARM: Correctly align arguments after a byval struct is passed on the stack



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202985 91177308-0d34-0410-b5e6-96231b3b80d8
Work around MSVC bug in IntrusiveRefCntPtr.h

The build was failing with:

  error C2664: 'std::atomic_int::atomic_int(const std::atomic_int &)' : cannot convert argument 1 from 'int' to 'const std::atomic_int &'

Apparently "std::atomic_int x(0)" doesn't work, but "std::atomic<int> x(0)"
does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202988 91177308-0d34-0410-b5e6-96231b3b80d8
Fix clang -Werror build break due to mismatched sign comparison.

Originally committed in r202985.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202992 91177308-0d34-0410-b5e6-96231b3b80d8
Lower AVX v4i64->v4i32 truncate to one shuffle.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202996 91177308-0d34-0410-b5e6-96231b3b80d8
ConstantFolding: Also fold the vector overloads of our math intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202997 91177308-0d34-0410-b5e6-96231b3b80d8
Fix an inconsistency in treatment of trailing / in path::const_iterator

When using a //net/ path, we were transforming the trailing / into a '.'
when the path was just the root path and we were iterating backwards.
Forwards iteration and other kinds of root path (C:\, /) were already
correct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202999 91177308-0d34-0410-b5e6-96231b3b80d8
Always print the implicit .text at the start of an asm file.

Before llvm-mc would print it, but llc was assuming that it would produce
another section changing directive before one was needed. That assumption is
false with inline asm.

Fixes PR19049.

Another option would be to always create the section, but in the asm printer
avoid printing sections changes during initialization. That would work, but
* We do use the fact that llvm-mc prints it in testing. The tests can be changed
  if needed.
* A quick poll on IRC suggest that most developers prefer the implicit .text to
  be printed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203001 91177308-0d34-0410-b5e6-96231b3b80d8
LoopVectorizer: Preserve fast-math flags

Fixes PR19045.

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

Provide triple and data layout as well as module names (or empty string) when there's a mismatch.

Differential Revision: http://llvm-reviews.chandlerc.com/D2971

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203009 91177308-0d34-0410-b5e6-96231b3b80d8
Fix datalayout test that I broke with my previous LinkModules warning improvement.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203013 91177308-0d34-0410-b5e6-96231b3b80d8
With PPC CR bit registers, handle int_to_fp on older cores

On cores without fpcvt support, we cannot promote int_to_fp i1 operations,
because there is nothing to promote them to. The most straightforward
implementation of this uses a select to choose between the two possible
resulting floating-point values (and that's what is done here).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203015 91177308-0d34-0410-b5e6-96231b3b80d8
Add a DIELocList class to handle pointers into the location list.
This enables us to figure out where in the debug_loc section our
locations are so that we can eventually hash them. It also helps
remove some special case code in emission. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203018 91177308-0d34-0410-b5e6-96231b3b80d8
Now that we don't use libtool, we don't need to upgrade it :-)

Thanks to Patrik Hägglund H for noticing it!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203019 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Testcase typo fix. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203020 91177308-0d34-0410-b5e6-96231b3b80d8
Attempt to unbreak little-endian buildbots.

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