Commit Graph

129346 Commits

Author SHA1 Message Date
Douglas Katzman
1b2b1b25eb Sparc: silently ignore .proc assembler directive
Differential Revision: http://reviews.llvm.org/D18463

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264579 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 14:00:11 +00:00
Jacques Pienaar
cf0b01d7ec [lanai] Add Lanai backend.
Add the Lanai backend to lib/Target.

General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend" (http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html).

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264578 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 13:09:54 +00:00
Hal Finkel
01605e4cf2 [SROA] Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264573 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 11:23:21 +00:00
Hal Finkel
a87cc23f87 C++11 is required, remove some preprocessor checks for it
We require C++11 to build, so remove a few remaining preprocessor checks for
'__cplusplus >= 201103L'. This should always be true.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264572 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 11:13:03 +00:00
Chuang-Yu Cheng
005c5a33b6 [Power9] Implement new altivec instructions: bcd* series
This patch implements the following altivec instructions:

- Decimal Convert From/to National/Zoned/Signed-QWord:
    bcdcfn. bcdcfz. bcdctn. bcdctz. bcdcfsq. bcdctsq.

- Decimal Copy-Sign/Set-Sign:
    bcdcpsgn. bcdsetsgn.

- Decimal Shift/Unsigned-Shift/Shift-and-Round:
    bcds. bcdus. bcdsr.

- Decimal (Unsigned) Truncate:
    bcdtrunc. bcdutrunc.

Total 13 instructions

Thanks Amehsan's advice! Thanks Kit's great help!
Reviewers: hal, nemanja, kbarton, tjablin, amehsan

http://reviews.llvm.org/D17838

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264568 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 09:04:23 +00:00
Chuang-Yu Cheng
8187457176 [Power9] Implement new vsx instructions: insert, extract, test data class, min/max, reverse, permute, splat
This change implements the following vsx instructions:

- Scalar Insert/Extract
    xsiexpdp xsiexpqp xsxexpdp xsxsigdp xsxexpqp xsxsigqp

- Vector Insert/Extract
    xviexpdp xviexpsp xvxexpdp xvxexpsp xvxsigdp xvxsigsp
    xxextractuw xxinsertw

- Scalar/Vector Test Data Class
    xststdcdp xststdcsp xststdcqp
    xvtstdcdp xvtstdcsp

- Maximum/Minimum
    xsmaxcdp xsmaxjdp
    xsmincdp xsminjdp

- Vector Byte-Reverse/Permute/Splat
    xxbrd xxbrh xxbrq xxbrw
    xxperm xxpermr
    xxspltib

30 instructions

Thanks Nemanja for invaluable discussion! Thanks Kit's great help!
Reviewers: hal, nemanja, kbarton, tjablin, amehsan

http://reviews.llvm.org/D16842

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264567 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 08:34:28 +00:00
Elena Demikhovsky
ebc3cb93f0 AVX-512: Fixed ICMP instruction selection for i1 operands
ICMP instruction selection fails on SKX and KNL for i1 operand.
I use XOR to resolve:
(A == B) is equivalent to (A xor B) == 0

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264566 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 07:47:58 +00:00
Chuang-Yu Cheng
fe3f9efc0a [Power9] Implement new vsx instructions: quad-precision move, fp-arithmetic
This change implements the following vsx instructions:

- quad-precision move
    xscpsgnqp, xsabsqp, xsnegqp, xsnabsqp

- quad-precision fp-arithmetic
    xsaddqp(o) xsdivqp(o) xsmulqp(o) xssqrtqp(o) xssubqp(o)
    xsmaddqp(o) xsmsubqp(o) xsnmaddqp(o) xsnmsubqp(o)

22 instructions

Thanks Nemanja and Kit for careful review and invaluable discussion!
Reviewers: hal, nemanja, kbarton, tjablin, amehsan

http://reviews.llvm.org/D16110

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264565 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 07:38:01 +00:00
NAKAMURA Takumi
6c373cab49 llvm/test/Transforms/FunctionImport/funcimport.ll: -stats REQUIRES +Asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264561 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 02:14:49 +00:00
Vedant Kumar
9c51ac3626 [Coverage] Fix the way we load "<unknown>:func" records
When emitting coverage mappings for functions with local linkage and an
unknown filename, we use "<unknown>:func" for the PGO function name. The
problem is that we don't strip "<unknown>" from the name when loading
coverage data, like we do for other file names. Fix that and add a test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264559 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 01:16:12 +00:00
Duncan P. N. Exon Smith
e0157e2632 BitcodeWriter: Replace dead code with an assertion, NFC
The caller of ValueEnumerator::EnumerateOperandType never sends in
metadata.  Assert that, and remove the unnecessary logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264558 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 00:03:12 +00:00
Duncan P. N. Exon Smith
4c4ad19ff6 BitcodeWriter: Reuse writeMetadataRecords, NFC
Change writeFunctionMetadata to call writeMetadataRecords.  For now
there's no functionality change, but makes it easy to serialize other
types of metadata in the function block in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264557 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 23:59:32 +00:00
Duncan P. N. Exon Smith
5a6e171b5e BitcodeWriter: Rename some functions for consistency, NFC
To match writeMetadataRecords, writeNamedMetadata and
writeMetadataStrings, change:

    WriteModuleMetadata        => writeModuleMetadata
    WriteFunctionLocalMetadata => writeFunctionMetadata
    Write##CLASS               => write##CLASS

The only major change is "FunctionLocal" => "Function".  The point is to
be less specific, in preparation for emitting normal metadata records
inside function metadata blocks (currently we only emit
`LocalAsMetadata` there).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264556 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 23:56:04 +00:00
Duncan P. N. Exon Smith
310a953967 BitcodeWriter: Split out writeMetadataRecords, NFC
Besides being a nice cleanup, this is preparation for reusing the code
in function metadata blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264555 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 23:53:30 +00:00
Duncan P. N. Exon Smith
50f34b80ff BitcodeWriter: Restructure WriteFunctionLocalMetadata, NFC
Use an early return to simplify logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264554 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 23:38:36 +00:00
Duncan P. N. Exon Smith
bd2e7848ab Bitcode: Fix MSVC bot failure from r264549
make_unique => llvm::make_unique

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264553 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 23:36:55 +00:00
Duncan P. N. Exon Smith
e693a56e9b BitcodeWriter: Simplify tracking of function-local metadata, NFC
We don't really need a separate vector here; instead, point at a range
inside the main MDs array.  This matches how r264551 references the
ranges of strings and non-strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264552 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 23:22:31 +00:00
Duncan P. N. Exon Smith
a73e509bf8 Reapply ~"Bitcode: Collect all MDString records into a single blob"
Spiritually reapply commit r264409 (reverted in r264410), albeit with a
bit of a redesign.

Firstly, avoid splitting the big blob into multiple chunks of strings.

r264409 imposed an arbitrary limit to avoid a massive allocation on the
shared 'Record' SmallVector.  The bug with that commit only reproduced
when there were more than "chunk-size" strings.  A test for this would
have been useless long-term, since we're liable to adjust the chunk-size
in the future.

Thus, eliminate the motivation for chunk-ing by storing the string sizes
in the blob.  Here's the layout:

    vbr6: # of strings
    vbr6: offset-to-blob
    blob:
       [vbr6]: string lengths
       [char]: concatenated strings

Secondly, make the output of llvm-bcanalyzer readable.

I noticed when debugging r264409 that llvm-bcanalyzer was outputting a
massive blob all in one line.  Past a small number, the strings were
impossible to split in my head, and the lines were way too long.  This
version adds support in llvm-bcanalyzer for pretty-printing.

    <STRINGS abbrevid=4 op0=3 op1=9/> num-strings = 3 {
      'abc'
      'def'
      'ghi'
    }

From the original commit:

Inspired by Mehdi's similar patch, http://reviews.llvm.org/D18342, this
should (a) slightly reduce bitcode size, since there is less record
overhead, and (b) greatly improve reading speed, since blobs are super
cheap to deserialize.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264551 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 23:17:54 +00:00
Duncan P. N. Exon Smith
15b99e0369 BitcodeWriter: Simplify and test writing blobs, NFC
Split helper out of EmitRecordWithAbbrevImpl called emitBlob to reduce
code duplication, and add a few tests for it.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264550 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 23:04:04 +00:00
Duncan P. N. Exon Smith
fbf768a4d3 Support: Implement StreamingMemoryObject::getPointer
The implementation is fairly obvious.  This is preparation for using
some blobs in bitcode.

For clarity (and perhaps future-proofing?), I moved the call to
JumpToBit in BitstreamCursor::readRecord ahead of calling
MemoryObject::getPointer, since JumpToBit can theoretically (a) read
bytes, which (b) invalidates the blob pointer.

This isn't strictly necessary the two memory objects we have:

  - The return of RawMemoryObject::getPointer is valid until the memory
    object is destroyed.

  - StreamingMemoryObject::getPointer is valid until the next chunk is
    read from the stream.  Since the JumpToBit call is only going ahead
    to a word boundary, we'll never load another chunk.

However, reordering makes it clear by inspection that the blob returned
by BitstreamCursor::readRecord will be valid.

I added some tests for StreamingMemoryObject::getPointer and
BitstreamCursor::readRecord.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264549 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 23:00:59 +00:00
Duncan P. N. Exon Smith
b341866e2c Support: Move StreamingMemoryObject{,Test}.cpp, NFC
Change the filename to indicate this is a test, rename the tests, move
them into an anonymous namespace, and rename some variables.  All to
match our usual style before making further changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264548 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 22:55:19 +00:00
Duncan P. N. Exon Smith
a115062beb Bitcode: Add SimpleBitstreamCursor::setArtificialByteLimit
Allow users of SimpleBitstreamCursor to limit the number of bytes
available to the cursor.  This is preparation for instantiating a cursor
that isn't allowed to load more bytes from a StreamingMemoryObject (just
move around the ones already-loaded).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264547 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 22:49:32 +00:00
Duncan P. N. Exon Smith
2e87e9ef90 Bitcode: Add SimpleBitstreamCursor::getPointerToByte, etc.
Add API to SimpleBitstreamCursor to allow users to translate between
byte addresses and pointers.

  - jumpToPointer: move the bit position to a particular pointer.
  - getPointerToByte: get the pointer for a particular byte.
  - getPointerToBit: get the pointer for the byte of the current bit.
  - getCurrentByteNo: convenience function for assertions and tests.

Mainly adds unit tests (getPointerToBit/Byte already has a use), but
also preparation for eventually using jumpToPointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264546 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 22:45:25 +00:00
Duncan P. N. Exon Smith
f05c78c2b2 Bitcode: Split out SimpleBitstreamCursor
Split out SimpleBitstreamCursor from BitstreamCursor, which is a
lower-level cursor with no knowledge of bitcode blocks, abbreviations,
or records.  It just knows how to read bits and navigate the stream.

This is mainly organizational, to separate the API for manipulating raw
bits from that for bitcode concepts like Record and Block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264545 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 22:40:55 +00:00
JF Bastien
ce54d8e195 Revert "isPodLike: more precise"
This reverts commit c45f2afac5.

Looks like it may be causing a failure, I'll revert for now.

                 from
lib/CodeGen/AsmPrinter/DwarfDebug.cpp:14:
/usr/include/c++/4.9.2/bits/stl_pair.h: In instantiation of
                 'std::pair<_T1, _T2>& std::pair<_T1,
                 _T2>::operator=(const std::pair<_T1, _T2>&) [with _T1 =
                 std::unique_ptr<llvm::DwarfTypeUnit>; _T2 = const
                 llvm::DICompositeType*]':

/usr/include/c++/4.9.2/bits/stl_pair.h:160:8: error: use of deleted
function 'std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp,
_Dp>::operator=(const std::unique_ptr<_Tp, _Dp>&) [with _Tp =
llvm::DwarfTypeUnit; _Dp = std::default_delete<llvm::DwarfTypeUnit>]'
  first = __p.first;
        ^

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264544 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 20:50:05 +00:00
Sanjay Patel
044daf4379 workaround for an IR variable named %.
(which SimplifyCFG can produce...)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264543 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 20:44:35 +00:00
Sanjay Patel
a21dabc498 add scrubber for excessive leading whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264542 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 20:43:02 +00:00
JF Bastien
c45f2afac5 isPodLike: more precise
I tried to use isPodLike in:
  http://reviews.llvm.org/D18483

That failed because !is_class is too strict on platforms which don't yet
have is_trivially_copyable. This update tries to make isPodLike smarter
for platforms which don't have is_trivially_copyable, and AFAICT it
Should Just Work on all of them. I'll revert if the bots disagree with
me.

I'll also rename isPodLike to isTriviallyCopyable if this all works out,
since that's what the standard calls it now and one day we'll be rid of
isPodLike.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264541 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 20:32:21 +00:00
Teresa Johnson
23130dbc32 Use DAG check to try to appease bot
Try to appease
http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/34772. This was
the only check that didn't use DAG and it wasn't found.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264538 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 15:36:43 +00:00
Teresa Johnson
f07837bf85 [ThinLTO] Add optional import message and statistics
Summary:
Add a statistic to count the number of imported functions. Also, add a
new -print-imports option to emit a trace of imported functions, that
works even for an NDEBUG build.

Note that emitOptimizationRemark does not work for the above printing as
it expects a Function object and DebugLoc, neither of which we have
with summary-based importing.

This is part 2 of D18487, the first part was committed separately as
r264536.

Reviewers: joker.eph

Subscribers: llvm-commits, joker.eph

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264537 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 15:27:30 +00:00
Teresa Johnson
2a771565ac [ThinLTO] Don't try to import alias unless aliasee can be imported
With r264503, aliases are now being added to the GlobalsToImport set
even when their aliasees can't be imported due to their linkage type.
While the importing worked correctly (the aliases imported as
declarations) due to the logic in doImportAsDefinition, there is no
point to adding them to the GlobalsToImport set.

Additionally, with D18487 it was resulting in incorrectly printing a
message indicating that the alias was imported.

To avoid this, delay adding aliases to the GlobalsToImport set until
after the linkage type of the aliasee is checked.

This patch is part of D18487.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264536 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 15:01:11 +00:00
Hal Finkel
68e74bdd60 [PowerPC] Map max/minnum intrinsics and fmax/fmin to ISD nodes for CTR-based loop legality
Intrinsic::maxnum and Intrinsic::minnum, along with the associated libc
function calls (fmax[f], etc.) generally map to function calls after lowering.
For some vector types with QPX at least, however, we can legally lower these,
and we don't need to prohibit CTR-based loops on their account.

It turned out, however, that the logic that checked the opcodes associated with
intrinsics was broken (it would set the Opcode variable, but that variable was
later checked only if set for some otherwise-external function call.

This fixes the latter problem and adds the FMAX/MINNUM mappings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264532 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 05:40:56 +00:00
Michael Kruse
6fde9c2db6 [Verifier] Reject PHIs using defs from own block.
Reject the following IR as malformed (assuming that %entry, %next are
not in a loop):

    next:
      %y = phi i32 [ 0, %entry ]
      %x = phi i32 [ %y, %entry ]

Such PHI nodes came up in PR26718. While there was no consensus on
whether or not this is valid IR, most opinions on that bug and in a
discussion on the llvm-dev mailing list tended towards a
"strict interpretation" (term by Joseph Tremoulet) of PHI node uses.
Also, the language reference explicitly states that "the use of each
incoming value is deemed to occur on the edge from the corresponding
predecessor block to the current block" and
`DominatorTree::dominates(Instruction*, Use&)` uses this definition as
well.

For the code mentioned in PR15384, clang does not compile to such PHIs
(anymore?). The test case still hangs when replacing `%tmp6` with `%tmp`
in revisions before r176366 (where PR15384 has been fixed). The
occurrence of %tmp6 therefore was probably unintentional. Its value is
not used except in other PHIs.

Reviewers: majnemer, reames, JosephTremoulet, bkramer, grosser, jdoerfert, kparzysz, sanjoy

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264528 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 23:32:57 +00:00
Sanjay Patel
cdc27238af [SimplifyCFG] propagate branch metadata when creating select (PR26636)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264527 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 23:30:50 +00:00
Sanjay Patel
992a592f0c minimize test cases
These are tests for store transforms. 
The loads, adds, and geps were irrelevant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264526 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 23:09:25 +00:00
David Blaikie
3bcdc18cae llvm-dwp: Include the dwo name (if available) when diagnosing duplicate CU IDs from dwp input files
If you're building dwps from other dwps, it can be hard to track down a
duplicate CU ID if it comes from two compilations of the same file in
different modes, etc. By including the .dwo path (which is hopefully
more unique than the file path) it can help track down where the
duplicates came from.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264520 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 20:32:14 +00:00
Simon Pilgrim
def1cb0575 [X86][AVX] Enabled SMUL_LOHI/UMUL_LOHI v8i32 vectors on AVX1 targets
Correct splitting of v8i32 vectors into v4i32 vectors to prevent scalarization

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264517 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 18:32:13 +00:00
JF Bastien
2b9ff6b8f4 Revert "NFC: static_assert instead of comment"
This reverts commit fa36fcff16.

Causes the following Windows failure:

  C:\Buildbot\Slave\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\lib\CodeGen\MachineInstr.cpp(762):
  error C2338: must be trivially copyable to memmove

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264516 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 18:20:02 +00:00
JF Bastien
fa36fcff16 NFC: static_assert instead of comment
Summary: isPodLike is as close as we have for is_trivially_copyable.

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264515 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 18:14:27 +00:00
Simon Pilgrim
3711520788 [X86][AVX] Enabled MULHS/MULHU v16i16 vectors on AVX1 targets
Correct splitting of v16i16 vectors into v8i16 vectors to prevent scalarization

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264512 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 15:44:55 +00:00
Simon Pilgrim
1ecfaf6f50 [X86][SSE] Add MULHS/MULHU custom lowering for i8 vectors
Currently this is to mainly to prevent scalarization of integer division by constants.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264511 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 15:27:20 +00:00
Simon Pilgrim
e1019f460b [X86][SSE] Added v64i8 vector integer multiply tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264510 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 09:50:06 +00:00
Simon Pilgrim
fac6a88e2b [X86][AVX512BW] AVX512BW can sign-extend v32i8 to v32i16 for simpler v32i8 multiplies.
Only pre-AVX512BW targets need to split v32i8 vectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264509 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 09:44:27 +00:00
David Majnemer
4fda227053 [PowerPC] Disable the CTR optimization in the presence of {min,max}num
The minnum and maxnum intrinsics get lowered to libcalls which
invalidates the CTR optimization.

This fixes PR27083.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264508 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 09:42:31 +00:00
Simon Pilgrim
e2ec01fe07 [X86][SSE] Refreshed vector integer multiply tests
Add all 256-bit vector tests.
Added AVX512F/AVX512BW test targets.
Renamed tests something more meaningful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264507 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 09:35:48 +00:00
Simon Pilgrim
1d7b585ec8 [X86][SSE] Don't duplicate Lower256IntArith functionality in LowerMul. NFC.
LowerMul v32i8 on AVX2 needs to split the 256-bit sources to allow sign-extension back to v16i16 to occur. Since this is basically the same as Lower256IntArith we simplify by using that here instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264506 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 09:29:04 +00:00
Junmo Park
72bdb5b384 Minor code cleanup. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264505 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 06:04:55 +00:00
Chuang-Yu Cheng
4f013a7ba6 [Power9] Implement new altivec instructions: permute, count zero, extend sign, negate, parity, shift/rotate, mul10
This change implements the following vector operations:
- vclzlsbb vctzlsbb vctzb vctzd vctzh vctzw
- vextsb2w vextsh2w vextsb2d vextsh2d vextsw2d
- vnegd vnegw
- vprtybd vprtybq vprtybw
- vbpermd vpermr
- vrlwnm vrlwmi vrldnm vrldmi vslv vsrv
- vmul10cuq vmul10uq vmul10ecuq vmul10euq

28 instructions

Thanks Nemanja, Kit for invaluable hints and discussion!
Reviewers: hal, nemanja, kbarton, tjablin, amehsan

Phabricator: http://reviews.llvm.org/D15887

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264504 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 05:46:11 +00:00
Mehdi Amini
5e8cf48d61 ThinLTO: use the callgraph from the combined index to drive the FunctionImporter
Summary:
Now that the summary contains the full reference/call graph, we can
replace the existing function importer that loads and inspect the IR
to iteratively walk the call graph by a traversal based purely on the
summary information. Decouple the actual importing decision from any
IR manipulation.

Reviewers: tejohnson

Subscribers: llvm-commits, joker.eph

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

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264503 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 05:40:34 +00:00
Matthias Braun
abcfbb3c69 abtest: Cleanup, improve comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264502 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 04:07:55 +00:00