128196 Commits

Author SHA1 Message Date
Sanjay Patel
8631e9e9fb [x86, AVX] fold 'isPositive' 256-bit vector integer operations (PR26701)
This extends the fold introduced with:
http://reviews.llvm.org/rL262036



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262047 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 18:42:50 +00:00
Reid Kleckner
4f8c4bec33 [IR] Optimize bitfield layout of Value for MSVC
This should save a pointer of padding from all MSVC Value subclasses.

Recall that MSVC will not pack the following bitfields together:
  unsigned Bits : 29;
  unsigned Flag1 : 1;
  unsigned Flag2 : 1;
  unsigned Flag3 : 1;

Add a static_assert because LLVM developers always trip over this
behavior. This regressed in June.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262045 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 18:08:59 +00:00
Sanjay Patel
568de6274c [x86, AVX] add 256-bit tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262044 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 18:07:58 +00:00
Renato Golin
59e23fa211 [CMAKE] Update build on recent Haiku
This patch updates cmake build scripts to build on Haiku. It adds Haiku x86_64 to config.guess.
Please consider reviewing.

Pathc by Jérôme Duval.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262038 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 17:01:45 +00:00
Sanjay Patel
3d8c62e7f1 [x86, SSE] fold 'isPositive' vector integer operations (PR26701)
This is one of the cases shown in:
https://llvm.org/bugs/show_bug.cgi?id=26701

Shift and negate is what InstCombine appears to prefer, so I've started with that pattern. 
Note that the 'pcmpeq' instructions are always generating the negative one for the actual
'pcmpgt' comparison in each case (side note: why isn't there an alias mnemonic for that?).

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262036 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 16:56:03 +00:00
Reid Kleckner
0e6b04c2c0 [WinEH] Fix funclet return block clobber mask placement
MBB slot index intervals are half open, not closed. getMBBEndIndex()
returns the slot index of the start of the next block in layout order.
Placing a register mask there is incorrect if the successor of the
funclet return is not laid out after the return. Clang generates IR for
catch bodies before generating the following normal code, so we never
noticed this issue until the D frontend authors filed a bug about it.

Instead, we can put the clobber mask on the last instruction of the
funclet return block. We still aren't using a register mask operand on
the CATCHRET instruction because it would cause PEI to spill all CSRs,
including XMM regs, in the prologue.

Fixes PR26679.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262035 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 16:53:19 +00:00
Chandler Carruth
7b1b31d2b7 [PM] Finish removing references to fix MSVC builds. Somehow adding base
classes changed whether the decltype of these expressions was
a reference. I'm somewhat horrified why, and there may need to be
a deeper fix on MSVC, but this should at least get the bots a step
further.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262008 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 12:30:18 +00:00
Chris Dewhurst
f7a1494177 Reverting breaking change. Sorry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262007 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 12:20:10 +00:00
Chandler Carruth
1ce194e6fd [PM] Speculative patch to try and fix MSVC's compilation.
No idea why r262004 triggered this, but just trying to fix somehow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262006 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 12:17:54 +00:00
Chris Dewhurst
528e89dfaf Reviewed at reviews.llvm.org/D17133
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262005 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 11:46:47 +00:00
Chandler Carruth
adb60a3a11 [PM] Introduce CRTP mixin base classes to help define passes and
analyses in the new pass manager.

These just handle really basic stuff: turning a type name into a string
statically that is nice to print in logs, and getting a static unique ID
for each analysis.

Sadly, the format of passes in anonymous namespaces makes using their
names in tests really annoying so I've customized the names of the no-op
passes to keep tests sane to read.

This is the first of a few simplifying refactorings for the new pass
manager that should reduce boilerplate and confusion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262004 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 11:44:45 +00:00
Chris Dewhurst
7768d8796b Initial test commit only
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262003 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 11:38:24 +00:00
Chandler Carruth
a459c9c8aa [PM] Remove a FIXME now that it is no longer needed.
This has been fixed for some time, but the code hadn't been updated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261996 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 10:02:04 +00:00
Nikolay Haustov
1c038cf2fa [AMDGPU] Assembler: Basic support for MIMG
Add parsing and printing of image operands. Matches legacy sp3 assembler.
Change image instruction order to have data/image/sampler operands in the beginning. This is needed because optional operands in MC are always last.
Update SITargetLowering for new order.
Add basic MC test.
Update CodeGen tests.

Review: http://reviews.llvm.org/D17574

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261995 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 09:51:05 +00:00
Chandler Carruth
b55a5104a1 [PM] Clean up some formatting with the latest clang-format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261992 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 09:37:52 +00:00
James Molloy
aee2c336ac [AArch64] Slight cleanup in FPLoadBalancing
Instead of the convoluted if-statment we can just use getColor. This also fixes
a bug where we relied upon the parity of tablegen-generated register indexes
(instead of using the machine encoding).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261990 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 09:10:53 +00:00
Simon Pilgrim
1c7f0f6e51 [X86][F16C] Added native IR half/float conversion tests.
Placeholder tests until we start improving native vector support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261989 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 08:52:29 +00:00
David Blaikie
6802c0801c llvm-dwp: provide diagnostics for duplicate DWO IDs
These diagnostics aren't perfect - in the case of merging several dwos
into dwps and those dwps into more dwps - just getting the message about
the original source file name might not be much help (since it's the
same in both dwos, by definition - but doesn't tell you which chain of
dwps to backtrack)

It might be worth adding the DW_AT_dwo_id to the split debug info to
improve the diagnostic experience - might help track down the duplicates
better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261988 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 07:30:15 +00:00
David Blaikie
132af4d0cd llvm-dwp: Support empty .dwo files
Though a bit odd, this is handy for a few reasons - for example, in a
build system that wants consistent input/output of build steps, but
where split-dwarf might be overriden/disabled by the user on a per-file
basis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261987 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 07:04:58 +00:00
Craig Topper
c33696b7f3 [X86] Null out some redundant patterns for masked vector register to register moves. These can be accomplished with both aligned and unaligned opcodes.
Currently aligned is what is being used so remove the redundant patterns for the unaligned versions. But don't do this for the byte and word vector types since they don't have aligned versions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261985 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 06:50:29 +00:00
Craig Topper
62bd2798ad [TableGen] Fix typos in comments. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261984 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 06:50:27 +00:00
Craig Topper
898f56a220 [X86] Add test cases for r261977 and fix a grammatical error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261983 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 06:50:24 +00:00
Haicheng Wu
27a460f328 [JumpThreading] Simplify Instructions first in ComputeValueKnownInPredecessors()
This change tries to find more opportunities to thread over basic blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261981 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 06:06:04 +00:00
Craig Topper
5431127053 [X86] Remove a couple returns after llvm_unreachables. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261979 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 05:29:39 +00:00
Craig Topper
7f539ef51a [X86] Use inclusive ranges for XMM/YMM/ZMM registers in is32Extended and isX86_64ExtendedReg. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261978 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 05:29:35 +00:00
Craig Topper
8e47917f50 [X86] Explicitly diagnose use of %xmm16-%xmm31, %ymm16-%ymm31 and %zmm16-%zmm31 when AVX512 is not enabled in the asm parser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261977 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 05:29:32 +00:00
Hongbin Zheng
3543d33768 Another fix the testcase introduced by r261903 - Add the missing matches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261971 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 03:41:47 +00:00
Sanjoy Das
f35e0d3757 Minor doc fix: statepoints are invokable too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261968 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 03:33:59 +00:00
Matthias Braun
e0761c4899 MachineCopyPropagation: Catch copies of the form A<-B;A<-B
Differential Revision: http://reviews.llvm.org/D17475

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261966 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 03:18:55 +00:00
Matthias Braun
ed2d4b99b9 MachineCopyPropagation: Keep scanning through instructions with regmasks
This also simplifies the code by removing the overly conservative
NoInterveningSideEffect() function. This function checked:
- That the two copies belong to the same block: We only process one
  block at a time and clear our maps in between it is impossible to find a
  copy from a different block.
- There is no terminator between the two copy instructions: This is not
  allowed anyway (the MachineVerifier would complain)
- Does not have instructions with hasUnmodeledSideEffects() or isCall()
  set: Even for those instructuction we must have all clobbers/defs of
  registers explicit as an operand. If the register is explicitely
  clobbered we would never come to the point of checking for
  NoInterveningSideEffect() anyway.

(I also checked this with a temporary build of the test-suite with all
 potentially failing conditions in NoInterveningSideEffect() turned into
 asserts)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261965 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 03:18:50 +00:00
Xinliang David Li
a6320f1513 [PGO] Add test case to ensure covmap section is not allocatable.
Differential Revision: http://reviews.llvm.org/D17324


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261959 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 03:05:10 +00:00
Michael Zolotukhin
79c196414f [LoopUnrollAnalyzer] Check that we're using SCEV for the same loop we're simulating.
Summary: Check that we're using SCEV for the same loop we're simulating. Otherwise, we might try to use the iteration number of the current loop in SCEV expressions for inner/outer loops IVs, which is clearly incorrect.

Reviewers: chandlerc, hfinkel

Subscribers: sanjoy, llvm-commits, mzolotukhin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261958 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 02:57:05 +00:00
Junmo Park
6473927306 Minor code cleanups. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261955 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 02:07:36 +00:00
Michael Zolotukhin
30deba6b59 [UnitTests] UnrollAnalyzer: make unit-test more general so that it can cover more cases in future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261954 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 01:44:04 +00:00
Mike Aizatsky
5e86c5c682 [sancov] Pruning full dominator blocks from instrumentation.
Summary:
This is the first simple attempt to reduce number of coverage-
instrumented blocks.

If a basic block dominates all its successors, then its coverage
information is useless to us. Ingore such blocks if
santizer-coverage-prune-tree option is set.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261949 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 01:17:22 +00:00
Sanjay Patel
c76bace985 [x86, SSE] add tests to show missing pcmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261948 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 01:14:27 +00:00
Xinliang David Li
097f6ea877 Add forward declarations /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261946 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 00:54:08 +00:00
David Majnemer
20cfdfefcf [WinEH] Don't remove unannotated inline-asm calls
Inline-asm calls aren't annotated with funclet bundle operands because
they don't throw and cannot be inlined through.  We shouldn't require
them to bear an funclet bundle operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261942 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 00:04:25 +00:00
Owen Anderson
5786b73593 More internal details of SROA pass to library visibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261934 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 23:34:21 +00:00
Justin Bogner
039b2e97d3 Support: Give ManagedStatic's helper object library visibility
It doesn't make much sense to export these symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261931 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 22:05:19 +00:00
Hemant Kulkarni
70c478d920 Reverts change r261907 and r261918
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261927 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 20:47:07 +00:00
Hongbin Zheng
e37bafef46 Use regex in testcase, do not fail windows bots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261922 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 19:16:40 +00:00
Hemant Kulkarni
afe723d425 Fix endianness issue on BE machines introduced by r261907
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261918 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 18:56:01 +00:00
David L Kreitzer
3372225f98 Reformatted a comment to fit the 80 column limit. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261916 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 18:50:45 +00:00
Hongbin Zheng
a143cf3ee7 Try to fix windows fail at r261902.
Introduce move constructor and move assignment operator to PostDominatorTree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261910 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 18:24:19 +00:00
Hemant Kulkarni
ce1dab33de [llvm-readobj] Enable GNU style sections and relocations printing
http://reviews.llvm.org/D17523

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261907 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 18:02:00 +00:00
Hongbin Zheng
edc89ca3ac Introduce RegionInfoAnalysis, which compute Region Tree in the new PassManager. NFC
Differential Revision: http://reviews.llvm.org/D17571

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261904 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 17:54:25 +00:00
Hongbin Zheng
159692245c Introduce DominanceFrontierAnalysis to the new PassManager to compute DominanceFrontier. NFC
Differential Revision: http://reviews.llvm.org/D17570

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261903 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 17:54:15 +00:00
Hongbin Zheng
5d7472e863 Introduce analysis pass to compute PostDominators in the new pass manager. NFC
Differential Revision: http://reviews.llvm.org/D17537

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261902 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 17:54:07 +00:00
Tim Northover
dca70119b4 ARM: disallow pc as a base register in Thumb2 memory ops.
These should all be deferring to the "OP (literal)" variant according to the
ARM ARM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261895 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 16:54:52 +00:00