]> granicus.if.org Git - llvm/log
llvm
9 years agoMake sure we have a Add/Remove/Has function for various thing that can have attribute.
Amaury Sechet [Sun, 12 Jun 2016 06:17:24 +0000 (06:17 +0000)]
Make sure we have a Add/Remove/Has function for various thing that can have attribute.

Summary: This also deprecated the get attribute function familly.

Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael, jyknight

Subscribers: axw, joker.eph, llvm-commits

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

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

9 years agoFactor out a helper. NFC
Sean Silva [Sun, 12 Jun 2016 05:44:51 +0000 (05:44 +0000)]
Factor out a helper. NFC

Prep for porting to new PM.

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

9 years ago[X86] Pre-allocate some of the shuffle mask SmallVectors in the auto upgrade code...
Craig Topper [Sun, 12 Jun 2016 04:48:00 +0000 (04:48 +0000)]
[X86] Pre-allocate some of the shuffle mask SmallVectors in the auto upgrade code instead of calling push_back in a loop. This removes the need to check if the vector needs to grow on each iteration.

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

9 years ago[AVX512] Remove the masked palignr intrinsics that I forgot to remove when I added...
Craig Topper [Sun, 12 Jun 2016 04:14:13 +0000 (04:14 +0000)]
[AVX512] Remove the masked palignr intrinsics that I forgot to remove when I added auto-upgrade code to turn them into shufflevectors and selects.

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

9 years ago[X86] Greatly simplify the llvm.x86.avx.vpermil.* auto-upgrade code. We can fully...
Craig Topper [Sun, 12 Jun 2016 03:10:47 +0000 (03:10 +0000)]
[X86] Greatly simplify the llvm.x86.avx.vpermil.* auto-upgrade code. We can fully derive everything using types of the intrinsic arguments rather than writing separate loops for each intrinsic. NFC

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

9 years ago[MergedLoadStoreMotion] Use correct helper for load hoist safety.
Eli Friedman [Sun, 12 Jun 2016 02:11:20 +0000 (02:11 +0000)]
[MergedLoadStoreMotion] Use correct helper for load hoist safety.

It isn't legal to hoist a load past a call which might not return;
even if it doesn't throw, it could, for example, call exit().

Fixes http://llvm.org/PR27953.

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

9 years ago[X86] Move tests for llvm.x86.avx.vpermil.* intrinsics to a -upgrade test since they...
Craig Topper [Sun, 12 Jun 2016 01:41:06 +0000 (01:41 +0000)]
[X86] Move tests for llvm.x86.avx.vpermil.* intrinsics to a -upgrade test since they are autoupgraded to shufflevector.

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

9 years ago[X86,IR] Make use of the CreateShuffleVector form that takes an ArrayRef<uint32_t...
Craig Topper [Sun, 12 Jun 2016 01:05:59 +0000 (01:05 +0000)]
[X86,IR] Make use of the CreateShuffleVector form that takes an ArrayRef<uint32_t> to avoid the need to manually create a bunch of Constants and a ConstantVector. NFC

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

9 years ago[IR] Require ArrayRef of 'uint32_t' instead of 'int' for the mask argument for one...
Craig Topper [Sun, 12 Jun 2016 00:41:19 +0000 (00:41 +0000)]
[IR] Require ArrayRef of 'uint32_t' instead of 'int' for the mask argument for one of the signatures of CreateShuffleVector. This better emphasises that you can't use it for the -1 as undef behavior.

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

9 years ago[LICM] Make isGuaranteedToExecute more accurate.
Eli Friedman [Sat, 11 Jun 2016 21:48:25 +0000 (21:48 +0000)]
[LICM] Make isGuaranteedToExecute more accurate.

Summary:
Make isGuaranteedToExecute use the
isGuaranteedToTransferExecutionToSuccessor helper, and make that helper
a bit more accurate.

There's a potential performance impact here from assuming that arbitrary
calls might not return. This probably has little impact on loads and
stores to a pointer because most things alias analysis can reason about
are dereferenceable anyway. The other impacts, like less aggressive
hoisting of sdiv by a variable and less aggressive hoisting around
volatile memory operations, are unlikely to matter for real code.

This also impacts SCEV, which uses the same helper.  It's a minor
improvement there because we can tell that, for example, memcpy always
returns normally. Strictly speaking, it's also introducing
a bug, but it's not any worse than everywhere else we assume readonly
functions terminate.

Fixes http://llvm.org/PR27857.

Reviewers: hfinkel, reames, chandlerc, sanjoy

Subscribers: broune, llvm-commits

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

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

9 years ago[X86] Updated test checks script to generalise LCPI symbol refs
Simon Pilgrim [Sat, 11 Jun 2016 20:39:21 +0000 (20:39 +0000)]
[X86] Updated test checks script to generalise LCPI symbol refs

The script now replace '.LCPI888_8' style asm symbols with the {{\.LCPI.*}} re pattern - this helps stop hardcoded symbols in 32-bit x86 tests changing with every edit of the file

Refreshed some tests to demonstrate the new check

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

9 years ago[CostModel][X86][SSE] Updated costs for vector BITREVERSE ops on SSSE3+ targets
Simon Pilgrim [Sat, 11 Jun 2016 19:23:02 +0000 (19:23 +0000)]
[CostModel][X86][SSE] Updated costs for vector BITREVERSE ops on SSSE3+ targets

To account for the fast PSHUFB implementation now available

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

9 years ago[MBP] Code cleanup /NFC
Xinliang David Li [Sat, 11 Jun 2016 18:35:40 +0000 (18:35 +0000)]
[MBP] Code cleanup /NFC

This is one of the patches to clean up the code so that
it is in a better form to make future enhancements easier.

In htis patch, the logic to collect viable successors are
extrated as a helper to unclutter the caller which gets very
large recenty. Also cleaned up BP adjustment code.

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

9 years ago[CMake] Allow LLVM to be embedded and built in a subfolder as part of another project.
Vassil Vassilev [Sat, 11 Jun 2016 17:20:53 +0000 (17:20 +0000)]
[CMake] Allow LLVM to be embedded and built in a subfolder as part of another project.

Patch by Bertrand Bellenot!

Reviewed by Chris Bieneman and me.

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

9 years agoDelay dominator updation while cloning loop.
Vikram TV [Sat, 11 Jun 2016 16:41:10 +0000 (16:41 +0000)]
Delay dominator updation while cloning loop.

Summary:
Dominator updation fails for a loop inserted with a new basicblock.

A block required by DT to set the IDom might not have been cloned yet. This is because there is no predefined ordering of loop blocks (except for the header block which should be the first block in the list).

The patch first creates DT nodes for the cloned blocks and then separately updates the DT in a follow-on loop.

Reviewers: anemet, dberlin

Subscribers: dberlin, llvm-commits

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

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

9 years ago[X86][SSSE3] Added PSHUFB LUT implementation of BITREVERSE
Simon Pilgrim [Sat, 11 Jun 2016 15:44:13 +0000 (15:44 +0000)]
[X86][SSSE3] Added PSHUFB LUT implementation of BITREVERSE

PSHUFB can speed up BITREVERSE of byte vectors by performing LUT on the low/high nibbles separately and ORing the results. Wider integer vector types are already BSWAP'd beforehand so also make use of this approach.

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

9 years agoStrip trailing whitespace. NFCI.
Simon Pilgrim [Sat, 11 Jun 2016 14:34:10 +0000 (14:34 +0000)]
Strip trailing whitespace. NFCI.

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

9 years ago[AVX512] Re-generate v8i64 shuffle test now that we use pshufd for some cases.
Craig Topper [Sat, 11 Jun 2016 13:57:08 +0000 (13:57 +0000)]
[AVX512] Re-generate v8i64 shuffle test now that we use pshufd for some cases.

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

9 years ago[AVX512] Lower v8i64 and v16i32 to pshufd when possible.
Craig Topper [Sat, 11 Jun 2016 13:43:21 +0000 (13:43 +0000)]
[AVX512] Lower v8i64 and v16i32 to pshufd when possible.

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

9 years ago[X86] Remove GCC builtin name from some intrinsics that are no longer used by clang...
Craig Topper [Sat, 11 Jun 2016 13:43:18 +0000 (13:43 +0000)]
[X86] Remove GCC builtin name from some intrinsics that are no longer used by clang. A future commit can remove the intrinsics entirely.

Some of these have been unused for a long time.

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

9 years ago[X86][SSE] Added PSLLDQ/PSRLDQ as a target shuffle type
Simon Pilgrim [Sat, 11 Jun 2016 13:38:28 +0000 (13:38 +0000)]
[X86][SSE] Added PSLLDQ/PSRLDQ as a target shuffle type

Ensure that PALIGNR/PSLLDQ/PSRLDQ are byte vectors so that they can be correctly decoded for target shuffle combining

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

9 years ago[X86][AVX2] Added PSLLDQ/PSRLDQ shuffle combining tests
Simon Pilgrim [Sat, 11 Jun 2016 13:18:21 +0000 (13:18 +0000)]
[X86][AVX2] Added PSLLDQ/PSRLDQ shuffle combining tests

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

9 years ago[X86][SSE] Use vXi8 return type for PSLLDQ/PSRLDQ instructions
Simon Pilgrim [Sat, 11 Jun 2016 12:54:37 +0000 (12:54 +0000)]
[X86][SSE] Use vXi8 return type for PSLLDQ/PSRLDQ instructions

These are byte shift instructions and it will make shuffle combining a lot more straightforward if we can assume a vXi8 vector of bytes so decoded shuffle masks match the return type's number of elements

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

9 years ago[X86][AVX512] Tidied up VSHUFF32x4/VSHUFF64x2/VSHUFI32x4/VSHUFI64x2 comment generation
Simon Pilgrim [Sat, 11 Jun 2016 11:18:38 +0000 (11:18 +0000)]
[X86][AVX512] Tidied up VSHUFF32x4/VSHUFF64x2/VSHUFI32x4/VSHUFI64x2 comment generation

Now matches other shuffles

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

9 years agoTry a bit harder to remove the signed and unsigned comparison warning.
Chandler Carruth [Sat, 11 Jun 2016 09:13:00 +0000 (09:13 +0000)]
Try a bit harder to remove the signed and unsigned comparison warning.
Hopefully this time it actually works and stays away.

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

9 years agoUse a two-level cast through an intptr_t, and make them C-style casts.
Chandler Carruth [Sat, 11 Jun 2016 08:19:59 +0000 (08:19 +0000)]
Use a two-level cast through an intptr_t, and make them C-style casts.
This shouldn't have any functional difference, but it appears to be the
pattern used for other methods on DynamicLibrary, and it should avoid
the -Wpedantic warning on one of the build bots about the direct
reinterpret_cast.

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

9 years agoAdd a using declaration so that the overrides don't hide some of the
Chandler Carruth [Sat, 11 Jun 2016 08:12:17 +0000 (08:12 +0000)]
Add a using declaration so that the overrides don't hide some of the
base class methods.

This was caught by GCC's -Woverloaded-virtual, not sure why it wasn't
caught by Clang's. =/

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

9 years agoCompare to an unsigned literal to avoid a -Wsign-compare warning.
Chandler Carruth [Sat, 11 Jun 2016 08:02:01 +0000 (08:02 +0000)]
Compare to an unsigned literal to avoid a -Wsign-compare warning.

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

9 years agoUse const_cast to cast away constness. This silences a warning.
Chandler Carruth [Sat, 11 Jun 2016 08:01:57 +0000 (08:01 +0000)]
Use const_cast to cast away constness. This silences a warning.

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

9 years agoDebugInfoPDBTests:MappedBlockStreamTest.TestWriteThenRead: Avoid assigning temporary...
NAKAMURA Takumi [Sat, 11 Jun 2016 06:37:28 +0000 (06:37 +0000)]
DebugInfoPDBTests:MappedBlockStreamTest.TestWriteThenRead: Avoid assigning temporary object to ArrayRef.

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

9 years ago[MCJIT] Update MCJIT and get the fibonacci example working again.
Lang Hames [Sat, 11 Jun 2016 05:47:04 +0000 (05:47 +0000)]
[MCJIT] Update MCJIT and get the fibonacci example working again.

MCJIT will now set the DataLayout on a module when it is added to the JIT,
rather than waiting until it is codegen'd, and the runFunction method will
finalize the module containing the function to be run before running it.

The fibonacci example has been updated to include and link against MCJIT.

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

9 years ago[AVX512] Add support for lowering v32i16 shuffles with repeated lanes. This allows...
Craig Topper [Sat, 11 Jun 2016 03:27:42 +0000 (03:27 +0000)]
[AVX512] Add support for lowering v32i16 shuffles with repeated lanes. This allows us to create 512-bit PSHUFLW/PSHUFHW.

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

9 years ago[AVX512] No need to check for BWI being enabled before lowering v32i16 and v64i8...
Craig Topper [Sat, 11 Jun 2016 03:27:37 +0000 (03:27 +0000)]
[AVX512] No need to check for BWI being enabled before lowering v32i16 and v64i8 shuffles. If we get this far the types are already legal which means BWI must be enabled.

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

9 years agoLiveIntervalAnalysis: findLastUseBefore() must ignore undef uses.
Matthias Braun [Sat, 11 Jun 2016 00:31:28 +0000 (00:31 +0000)]
LiveIntervalAnalysis: findLastUseBefore() must ignore undef uses.

undef uses are no real uses of a register and must be ignored by
findLastUseBefore() so that handleMove() does not produce invalid live
intervals in some cases.

This fixed http://llvm.org/PR28083

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

9 years ago[esan|cfrag] Handle complex GEP instr in the cfrag tool
Qin Zhao [Fri, 10 Jun 2016 22:28:55 +0000 (22:28 +0000)]
[esan|cfrag] Handle complex GEP instr in the cfrag tool

Summary:
Iterates all (except the first and the last) operands within each GEP
instruction for instrumentation.

Adds test struct_field_gep.ll.

Reviewers: aizatsky

Subscribers: vitalybuka, zhaoqin, kcc, eugenis, bruening, llvm-commits

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

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

9 years agoTry again to fix this endianness issue.
Zachary Turner [Fri, 10 Jun 2016 22:12:18 +0000 (22:12 +0000)]
Try again to fix this endianness issue.

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

9 years agoDon't try to rotate a loop more than once - we never do this anyway.
Michael Zolotukhin [Fri, 10 Jun 2016 22:03:56 +0000 (22:03 +0000)]
Don't try to rotate a loop more than once - we never do this anyway.

Summary:
I can't find a case where we can rotate a loop more than once, and it looks
like we never do this. To rotate a loop following conditions should be met:
1) its header should be exiting
2) its latch shouldn't be exiting

But after the first rotation the header becomes the new latch, so this
condition can never be true any longer.

Tested on with an assert on LNT testsuite and make check.

Reviewers: hfinkel, sanjoy

Subscribers: sebpop, sanjoy, llvm-commits, mzolotukhin

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

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

9 years ago[pdb] Fix issues with pdb writing.
Zachary Turner [Fri, 10 Jun 2016 21:47:26 +0000 (21:47 +0000)]
[pdb] Fix issues with pdb writing.

This fixes an alignment issue by forcing all cached allocations
to be 8 byte aligned, and also fixes an issue arising on big
endian systems by writing ulittle32_t's instead of uint32_t's
in the test.

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

9 years agoMemorySSA: fix memory access local dominance function for live on entry
Sebastian Pop [Fri, 10 Jun 2016 21:36:41 +0000 (21:36 +0000)]
MemorySSA: fix memory access local dominance function for live on entry

A memory access defined on function entry cannot be locally dominated by another memory access.
The patch was split from http://reviews.llvm.org/D19338 which exposes the problem.

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

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

9 years ago[STLExtras] Introduce and use llvm::count_if; NFC
Sanjoy Das [Fri, 10 Jun 2016 21:18:39 +0000 (21:18 +0000)]
[STLExtras] Introduce and use llvm::count_if; NFC

(This is split out from was D21115)

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

9 years ago[IRTranslator] Support the translation of or.
Quentin Colombet [Fri, 10 Jun 2016 20:50:35 +0000 (20:50 +0000)]
[IRTranslator] Support the translation of or.

Now or instructions get translated into G_OR.

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

9 years ago[IRTranslator] Rework the comments for the methods to translate.
Quentin Colombet [Fri, 10 Jun 2016 20:50:33 +0000 (20:50 +0000)]
[IRTranslator] Rework the comments for the methods to translate.

NFC.

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

9 years ago[IRTranslator] Refactor to expose a translateBinaryOp method.
Quentin Colombet [Fri, 10 Jun 2016 20:50:18 +0000 (20:50 +0000)]
[IRTranslator] Refactor to expose a translateBinaryOp method.

This method will be used for every binary operation.

NFC.

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

9 years ago[AArch64] Move comments closer to relevant check. NFC.
Chad Rosier [Fri, 10 Jun 2016 20:49:18 +0000 (20:49 +0000)]
[AArch64] Move comments closer to relevant check. NFC.

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

9 years ago[AArch64] Refactor a check earlier. NFC.
Chad Rosier [Fri, 10 Jun 2016 20:47:14 +0000 (20:47 +0000)]
[AArch64] Refactor a check earlier. NFC.

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

9 years ago[x86] enable bitcasted fabs/fneg transforms
Sanjay Patel [Fri, 10 Jun 2016 20:33:50 +0000 (20:33 +0000)]
[x86] enable bitcasted fabs/fneg transforms

The vector cases don't change because we already have folds in X86ISelLowering
to look through and remove bitcasts.

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

9 years ago[CodeGen] Fix PrologEpilogInserter to avoid duplicate allocation of SEH structs
Etienne Bergeron [Fri, 10 Jun 2016 20:24:38 +0000 (20:24 +0000)]
[CodeGen] Fix PrologEpilogInserter to avoid duplicate allocation of SEH structs

Summary:
When stack-protection is activated and WinEH exceptions is used,
the EHRegNode (exception handling registration) is allocated twice on the stack.

This was not breaking anything except loosing space on the stack.

```
D:\src\llvm\examples>llc exc2.ll  -debug-only=pei
alloc FI(0) at SP[-24]
alloc FI(1) at SP[-48]   <<-- Allocated
alloc FI(1) at SP[-72]   <<-- Allocated twice!?
alloc FI(2) at SP[-76]
alloc FI(4) at SP[-80]
alloc FI(3) at SP[-84]
```

Reviewers: rnk, majnemer

Subscribers: chrisha, llvm-commits

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

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

9 years agoRemove a few gendered pronouns.
Nico Weber [Fri, 10 Jun 2016 20:06:03 +0000 (20:06 +0000)]
Remove a few gendered pronouns.

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

9 years agoDisable MSan-hostile loop unswitching.
Evgeniy Stepanov [Fri, 10 Jun 2016 20:03:20 +0000 (20:03 +0000)]
Disable MSan-hostile loop unswitching.

Loop unswitching may cause MSan false positive when the unswitch
condition is not guaranteed to execute.

This is very similar to ASan and TSan special case in
llvm::isSafeToSpeculativelyExecute (they don't like speculative loads
and stores), but for branch instructions.

This is a workaround for PR28054.

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

9 years agoMove isGuaranteedToExecute out of LICM.
Evgeniy Stepanov [Fri, 10 Jun 2016 20:03:17 +0000 (20:03 +0000)]
Move isGuaranteedToExecute out of LICM.

Also rename LICMSafetyInfo to LoopSafetyInfo.
Both will be used in LoopUnswitch in a separate change.

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

9 years ago[SystemZ] Support Compare and Traps
Zhan Jun Liau [Fri, 10 Jun 2016 19:58:10 +0000 (19:58 +0000)]
[SystemZ] Support Compare and Traps

Support and generate Compare and Traps like CRT, CIT, etc.

Support Trap as legal DAG opcodes and generate "j .+2" for them by default.
Add support for Conditional Traps and use the If Converter to convert them into
the corresponding compare and trap opcodes.

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

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

9 years agoAMDGPU/SI: Don't use fixup_si_rodata for scratch rsrc relocations
Tom Stellard [Fri, 10 Jun 2016 19:26:38 +0000 (19:26 +0000)]
AMDGPU/SI: Don't use fixup_si_rodata for scratch rsrc relocations

Summary:
We need to set the fixup type to FK_Data_4 for the
SCRATCH_RSRC_DWORD[01] symbols, since these require absolute
relocations, and fixup_si_rodata is for relative relocations.

Reviewers: arsenm, kzhuravl

Subscribers: arsenm, kzhuravl, llvm-commits

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

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

9 years agoMove CodeGen test from Generic to X86 specific directory
Mehdi Amini [Fri, 10 Jun 2016 19:14:01 +0000 (19:14 +0000)]
Move CodeGen test from Generic to X86 specific directory

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

9 years agoInterprocedural Register Allocation (IPRA): add a Transformation Pass
Mehdi Amini [Fri, 10 Jun 2016 18:37:21 +0000 (18:37 +0000)]
Interprocedural Register Allocation (IPRA): add a Transformation Pass

Adds a MachineFunctionPass that scans the body to find calls, and
update the register mask with the one saved by the
RegUsageInfoCollector analysis in PhysicalRegisterUsageInfo.

Patch by Vivek Pandya <vivekvpandya@gmail.com>

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

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

9 years ago[x86] add test for PR28044
Sanjay Patel [Fri, 10 Jun 2016 18:05:55 +0000 (18:05 +0000)]
[x86] add test for PR28044

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

9 years agoAdd a period. NFC.
Chad Rosier [Fri, 10 Jun 2016 17:59:22 +0000 (17:59 +0000)]
Add a period. NFC.

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

9 years agoFix whitespace. NFC.
Chad Rosier [Fri, 10 Jun 2016 17:58:01 +0000 (17:58 +0000)]
Fix whitespace. NFC.

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

9 years agotest: split test into two files
Saleem Abdulrasool [Fri, 10 Jun 2016 17:33:28 +0000 (17:33 +0000)]
test: split test into two files

Split up the test cases into two inputs as per post-commit review comments from
Renato.  NFC.

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

9 years ago[X86] Add costs for SSE zext/sext to v4i64 to TTI
Michael Kuperstein [Fri, 10 Jun 2016 17:01:05 +0000 (17:01 +0000)]
[X86] Add costs for SSE zext/sext to v4i64 to TTI

The costs are somewhat hand-wavy, but should be much closer to the truth
than what we get from BasicTTI.

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

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

9 years agoInterprocedural Register Allocation (IPRA) Analysis
Mehdi Amini [Fri, 10 Jun 2016 16:19:46 +0000 (16:19 +0000)]
Interprocedural Register Allocation (IPRA) Analysis

Add an option to enable the analysis of MachineFunction register
usage to extract the list of clobbered registers.

When enabled, the CodeGen order is changed to be bottom up on the Call
Graph.

The analysis is split in two parts, RegUsageInfoCollector is the
MachineFunction Pass that runs post-RA and collect the list of
clobbered registers to produce a register mask.

An immutable pass, RegisterUsageInfo, stores the RegMask produced by
RegUsageInfoCollector, and keep them available. A future tranformation
pass will use this information to update every call-sites after
instruction selection.

Patch by Vivek Pandya <vivekvpandya@gmail.com>

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

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

9 years ago[AArch64] Add preferred alignments for Exynos M1
Evandro Menezes [Fri, 10 Jun 2016 16:00:18 +0000 (16:00 +0000)]
[AArch64] Add preferred alignments for Exynos M1

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

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

9 years ago[Hexagon] Remove incorrect offset scaling
Krzysztof Parzyszek [Fri, 10 Jun 2016 15:43:18 +0000 (15:43 +0000)]
[Hexagon] Remove incorrect offset scaling

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

9 years ago[x86] fix test attributes and autogenerate checks
Sanjay Patel [Fri, 10 Jun 2016 15:30:52 +0000 (15:30 +0000)]
[x86] fix test attributes and autogenerate checks

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

9 years ago[x86] add missing tests for fcmp ueq/one
Sanjay Patel [Fri, 10 Jun 2016 15:17:54 +0000 (15:17 +0000)]
[x86] add missing tests for fcmp ueq/one

Somehow, the codegen logic for these sequences has gone completely untested
until now (note the 2 compare instructions generated per test).

There's also an *Intel* AVX optimization opportunity exposed in these cases
and the existing tests. Intel's (but not AMD's) AVX spec shows that extra FP
predicates were added, so a single comparison should always be sufficient,
and operand commutation should never be necessary.

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

9 years ago[x86] regenerate checks
Sanjay Patel [Fri, 10 Jun 2016 14:48:50 +0000 (14:48 +0000)]
[x86] regenerate checks

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

9 years agoReapply "[TTI] Refine default cost for interleaved load groups with gaps"
Matthew Simpson [Fri, 10 Jun 2016 14:33:30 +0000 (14:33 +0000)]
Reapply "[TTI] Refine default cost for interleaved load groups with gaps"

This reapplies commit r272385 with a fix. The build was failing when compiled
with gcc, but not with clang. With the fix, we now get the data layout from the
current TTI implementation, which will hopefully solve the issue.

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

9 years agoTest commit
Roman Shirokiy [Fri, 10 Jun 2016 13:12:48 +0000 (13:12 +0000)]
Test commit

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

9 years ago[X86][SSE] Added target shuffle combine tests for byte shift/rotates (PSLLDQ/PSRLDQ...
Simon Pilgrim [Fri, 10 Jun 2016 13:03:22 +0000 (13:03 +0000)]
[X86][SSE] Added target shuffle combine tests for byte shift/rotates (PSLLDQ/PSRLDQ/PALIGNR)

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

9 years agoRevert "[TTI] Refine default cost for interleaved load groups with gaps"
Matthew Simpson [Fri, 10 Jun 2016 12:41:33 +0000 (12:41 +0000)]
Revert "[TTI] Refine default cost for interleaved load groups with gaps"

This reverts commit r272385. This commit broke the build. I'm temporarily
reverting to investigate.

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

9 years ago[TTI] Refine default cost for interleaved load groups with gaps
Matthew Simpson [Fri, 10 Jun 2016 11:27:51 +0000 (11:27 +0000)]
[TTI] Refine default cost for interleaved load groups with gaps

This patch refines the default cost for interleaved load groups having gaps. If
a load group has gaps, the legalized instructions corresponding to the unused
elements will be dead. Thus, we don't need to account for them in the cost
model. Instead, we only need to account for the fraction of legalized loads
that will actually be used.

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

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

9 years ago[AMDGPU] AsmParser: Support for sext() modifier in SDWA. Some code cleaning in AMDGPU...
Sam Kolton [Fri, 10 Jun 2016 09:57:59 +0000 (09:57 +0000)]
[AMDGPU] AsmParser: Support for sext() modifier in SDWA. Some code cleaning in AMDGPUOperand.

Summary:
sext() modifier is supported in SDWA instructions only for integer operands. Spec is unclear should integer operands support abs and neg modifiers with sext - for now they are not supported.
Renamed InputModsWithNoDefault to FloatInputMods. Added SextInputMods for operands that support sext() modifier.
Added AMDGPUOperand::Modifier struct to handle register and immediate modifiers.
Code cleaning in AMDGPUOperand class: organize method in groups (render-, predicate-methods...).

Reviewers: vpykhtin, artem.tamazov, tstellarAMD

Subscribers: arsenm, kzhuravl

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

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

9 years ago[X86][AVX512] Added VPSLLDQ/VPSRLDQ memory fold tests
Simon Pilgrim [Fri, 10 Jun 2016 09:56:20 +0000 (09:56 +0000)]
[X86][AVX512] Added VPSLLDQ/VPSRLDQ memory fold tests

Memory operand is new for AVX512 (SSE/AVX2 didn't support it).

Also dropped the 'mask' from the tests (VPSLLDQ/VPSRLDQ don't support masked operations).

Regenerated VPALIGNR test now that the shuffle comments work

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

9 years agoFix stale name in comment.
Sean Silva [Fri, 10 Jun 2016 08:48:49 +0000 (08:48 +0000)]
Fix stale name in comment.

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

9 years agotest commit: remove trailing whitespaces in README.txt
Roger Ferrer Ibanez [Fri, 10 Jun 2016 08:19:58 +0000 (08:19 +0000)]
test commit: remove trailing whitespaces in README.txt

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

9 years agoBug fix remove another illegal char from prof symbol name
Xinliang David Li [Fri, 10 Jun 2016 06:32:26 +0000 (06:32 +0000)]
Bug fix remove another illegal char from prof symbol name

End-end test with no integrated assembly should be added
at some point (not done now because some bots are not properly configured to
support -no-integrated-as)

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

9 years ago[LibFuzzer] Fix some unit test crashes on OSX.
Dan Liew [Fri, 10 Jun 2016 05:33:07 +0000 (05:33 +0000)]
[LibFuzzer] Fix some unit test crashes on OSX.

This fixes the following unit tests:

FuzzerDictionary.ParseOneDictionaryEntry
FuzzerDictionary.ParseDictionaryFile

The issue appears to be mixing non-ASan-ified code (LibFuzzer) and
ASan-ified code (the unittest) as the tests would pass fine if
everything was built with ASan enabled.

I believe the issue is that different implementations of std::vector<>
are being used in LibFuzzer and outside LibFuzzer (in the unittests).
For Libcxx (I've not seen the issue manifest for libstdc++) we can disable
the ASanified std::vector<> by definining the ``_LIBCPP_HAS_NO_ASAN`` macro.
Doing this fixes the tests on OSX.

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

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

9 years agoAdd missing include for r272369
Craig Topper [Fri, 10 Jun 2016 05:19:42 +0000 (05:19 +0000)]
Add missing include for r272369

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

9 years ago[AVX512] Add shuffle comment printing for masked VPERMPD/VPERMQ.
Craig Topper [Fri, 10 Jun 2016 05:12:40 +0000 (05:12 +0000)]
[AVX512] Add shuffle comment printing for masked VPERMPD/VPERMQ.

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

9 years agoMake PDBFile take a StreamInterface instead of a MemBuffer.
Zachary Turner [Fri, 10 Jun 2016 05:10:19 +0000 (05:10 +0000)]
Make PDBFile take a StreamInterface instead of a MemBuffer.

This is the next step towards being able to write PDBs.
MemoryBuffer is immutable, and StreamInterface is our replacement
which can be any combination of read-only, read-write, or write-only
depending on the particular implementation.

The one place where we were creating a PDBFile (in RawSession) is
updated to subclass ByteStream with a simple adapter that holds
a MemoryBuffer, and initializes the superclass with the buffer's
array, so that all the functionality of ByteStream works
transparently.

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

9 years agoAdd support for writing through StreamInterface.
Zachary Turner [Fri, 10 Jun 2016 05:09:12 +0000 (05:09 +0000)]
Add support for writing through StreamInterface.

This adds method and tests for writing to a PDB stream.  With
this, even a PDB stream which is discontiguous can be treated
as a sequential stream of bytes for the purposes of writing.

Reviewed By: ruiu
Differential Revision: http://reviews.llvm.org/D21157

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

9 years ago[AVX512] Fix shuffle comment printing to handle the masked versions of some shuffles...
Craig Topper [Fri, 10 Jun 2016 04:48:05 +0000 (04:48 +0000)]
[AVX512] Fix shuffle comment printing to handle the masked versions of some shuffles. Previously we were printing the mask operands as the register names.

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

9 years ago[lit] Only gather redirected files for command failures.
Daniel Dunbar [Fri, 10 Jun 2016 04:17:30 +0000 (04:17 +0000)]
[lit] Only gather redirected files for command failures.

 - The intended use of this was just in diagnostics, so we shouldn't pay the
   cost of reading these all the time.

 - This will avoid including the full output of each command in tests which
   fail, but the most important use case for this was to gather the output of
   the specific command which failed.

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

9 years agoAMDGPU: Fix trailing whitespace
Matt Arsenault [Fri, 10 Jun 2016 02:18:02 +0000 (02:18 +0000)]
AMDGPU: Fix trailing whitespace

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

9 years ago[esan|cfrag] Add the struct field offset array in StructInfo
Qin Zhao [Fri, 10 Jun 2016 02:10:06 +0000 (02:10 +0000)]
[esan|cfrag] Add the struct field offset array in StructInfo

Summary:
Adds the struct field offset array in struct StructInfo.

Updates test struct_field_count_basic.ll.

Reviewers: aizatsky

Subscribers: llvm-commits, bruening, eugenis, kcc, zhaoqin, vitalybuka

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

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

9 years ago[LiveRangeEdit] Add a test case for r272314.
Quentin Colombet [Fri, 10 Jun 2016 01:57:48 +0000 (01:57 +0000)]
[LiveRangeEdit] Add a test case for r272314.

The test case is not great espicially because it is still cumbersome to
run the regalloc pass with run-pass. (We miss a bunch of initiliazier to
be properly implemented.)

Related to llvm.org/PR27983

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

9 years agoAdd null checks before using a pointer.
Richard Trieu [Fri, 10 Jun 2016 01:42:05 +0000 (01:42 +0000)]
Add null checks before using a pointer.

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

9 years ago[llc] Do not create the pass config several times for run-pass.
Quentin Colombet [Fri, 10 Jun 2016 01:12:06 +0000 (01:12 +0000)]
[llc] Do not create the pass config several times for run-pass.

Thanks to Matthias Braun for spotting this.

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

9 years ago[llc] Add support for several run-pass options.
Quentin Colombet [Fri, 10 Jun 2016 00:52:10 +0000 (00:52 +0000)]
[llc] Add support for several run-pass options.

Previously we could run only one machine pass with the run-pass option.
With that patch, we can now specify several passes with several run-pass
options (or just one option with a list of comma separated passes) and
llc will build the related pipeline.
This is great to test the interaction of two passes that are not
necessarily next to each other in the pipeline, or play with pass
ordering.
Now, we should be at parity with opt for the flexibility of running
passes.

Note: I also moved the run pass option from CommandFlags.h to llc.cpp
because, really, this is needed only there!

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

9 years ago[esan|cfrag] Disable load/store instrumentation for cfrag
Qin Zhao [Fri, 10 Jun 2016 00:48:53 +0000 (00:48 +0000)]
[esan|cfrag] Disable load/store instrumentation for cfrag

Summary:
Adds ClInstrumentFastpath option to control fastpath instrumentation.

Avoids the load/store instrumentation for the cache fragmentation tool.

Renames cache_frag_basic.ll to working_set_slow.ll for slowpath
instrumentation test.

Adds the __esan_init check in struct_field_count_basic.ll.

Reviewers: aizatsky

Subscribers: llvm-commits, bruening, eugenis, kcc, zhaoqin, vitalybuka

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

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

9 years agoUpdate call site attribute documentation
Matt Arsenault [Fri, 10 Jun 2016 00:36:57 +0000 (00:36 +0000)]
Update call site attribute documentation

convergent is also accepted.

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

9 years agodocs: Add AMDGPU relocation information
Tom Stellard [Fri, 10 Jun 2016 00:31:13 +0000 (00:31 +0000)]
docs: Add AMDGPU relocation information

Summary:
This documents the various relocation types that are supported by the
Radeon Open Compute (ROC) runtime (which is essentially the dynamic
linker for AMDGPU).

Only R_AMDGPU_32 is not currently supported by the ROC runtime, but
it will usually be resolved at link time by lld.

Patch by: Konstantin Zhuravlyov

Reviewers: kzhuravl, rafael

Subscribers: rafael, arsenm, llvm-commits, kzhuravl

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

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

9 years agoAMDGPU: v_cndmask_b32 does not def vcc
Matt Arsenault [Fri, 10 Jun 2016 00:18:41 +0000 (00:18 +0000)]
AMDGPU: v_cndmask_b32 does not def vcc

Fixes verifier errors after SIShrinkInstructions.

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

9 years agoAMDGPU/SI: Make sure to emit TargetConstant nodes when matching ds_*permute
Tom Stellard [Fri, 10 Jun 2016 00:01:04 +0000 (00:01 +0000)]
AMDGPU/SI: Make sure to emit TargetConstant nodes when matching ds_*permute

Summary:
This fixes a bug with ds_*permute instructions where if it was passed a
constant address, then the offset operand would get assigned a register
operand instead of an immediate.

Reviewers: scchan, arsenm

Subscribers: arsenm, llvm-commits

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

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

9 years ago[CMake] Removing fallback code for CMake versions before 3.1
Chris Bieneman [Thu, 9 Jun 2016 23:53:22 +0000 (23:53 +0000)]
[CMake] Removing fallback code for CMake versions before 3.1

This code is dead code now. Out with the old, in with the new!

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

9 years agoAMDGPU/SI: Use common topological sort algorithm in SIScheduleDAGMI
Tom Stellard [Thu, 9 Jun 2016 23:48:02 +0000 (23:48 +0000)]
AMDGPU/SI: Use common topological sort algorithm in SIScheduleDAGMI

Reviewers: arsenm, axeldavy

Subscribers: MatzeB, arsenm, llvm-commits

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

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

9 years agoAMDGPU: Fix flat atomics
Matt Arsenault [Thu, 9 Jun 2016 23:42:54 +0000 (23:42 +0000)]
AMDGPU: Fix flat atomics

The flat atomics could already be selected, but only
when using flat instructions for global memory. Add
patterns for flat addresses.

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

9 years agoAMDGPU: Fix i64 global cmpxchg
Matt Arsenault [Thu, 9 Jun 2016 23:42:48 +0000 (23:42 +0000)]
AMDGPU: Fix i64 global cmpxchg

This was using extract_subreg sub0 to extract the low register
of the result instead of sub0_sub1, producing an invalid copy.

There doesn't seem to be a way to use the compound subreg indices
in tablegen since those are generated, so manually select it.

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

9 years agoAMDGPU: Fix missing and broken check lines in atomic tests
Matt Arsenault [Thu, 9 Jun 2016 23:42:44 +0000 (23:42 +0000)]
AMDGPU: Fix missing and broken check lines in atomic tests

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

9 years agoMake sure that not interesting allocas are not instrumented.
Vitaly Buka [Thu, 9 Jun 2016 23:31:59 +0000 (23:31 +0000)]
Make sure that not interesting allocas are not instrumented.

Summary:
We failed to unpoison uninteresting allocas on return as unpoisoning is part of
main instrumentation which skips such allocas.

Added check -asan-instrument-allocas for dynamic allocas. If instrumentation of
dynamic allocas is disabled it will not will not be unpoisoned.

PR27453

Reviewers: kcc, eugenis

Subscribers: llvm-commits

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

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

9 years agoCodeGen: Allow verifier to run after MachineBlockPlacement
Matt Arsenault [Thu, 9 Jun 2016 23:31:55 +0000 (23:31 +0000)]
CodeGen: Allow verifier to run after MachineBlockPlacement

No tests break with this enabled.

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