Commit Graph

132210 Commits

Author SHA1 Message Date
Matthew Simpson
d06ea8a8f4 [ARM, AArch64] Properly initialize InterleavedAccessPass
InterleavedAccessPass is an IR-level pass, so this change will enable testing
it with opt. This is part of D20250.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270101 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 20:08:32 +00:00
David Majnemer
73cd9cf448 [Target] Don't return a std::string in getRegAsmName
getRegAsmName ends up making a copy of the register's name in order to
make a lower-case version of it.  This is bad because
getRegForInlineAsmConstraint, it's sole caller, does a lowercase
comparison anyway.

This resulted in a significant regression in compile time for the Linux
kernel because getRegAsmName is called in a loop by
getRegForInlineAsmConstraint.

Instead, forgo the call to lower in getRegAsmName and have it return a
StringRef.

No functionality change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270099 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 20:03:16 +00:00
Sanjay Patel
57c3a79e65 [x86] add tests for urem lowering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270096 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 18:57:54 +00:00
Rafael Espindola
187ca85319 Remember the relocation model. NFC.
This avoids passing a TargetMachine in a few places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270095 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 18:49:29 +00:00
Rafael Espindola
0323a2e3a3 Style fixes. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270093 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 18:34:20 +00:00
Zhan Jun Liau
7c8f8b736f [SystemZ] Test commit - remove idea from README
Remove a comment about not supporting LRVH/STRVH from the README
LRVH/STRVH are being generated as of r269688

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270092 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 18:30:17 +00:00
Matt Arsenault
bbac091f56 AMDGPU: Also look for s_cbranch_vccz
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270091 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 18:20:25 +00:00
Rui Ueyama
cc76d42fd3 pdbdump: Rename NumberOfSymbols -> SymbolRecordStreamIndex.
Differential Revision: http://reviews.llvm.org/D20441

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270088 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 18:05:58 +00:00
Ron Lieberman
f92376ea02 Fix a covnersion from string to bool issue used in an assert
Problem Was exposed by -Wstring-conversion
    



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270087 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 18:05:56 +00:00
Simon Pilgrim
9ea46b8e15 [X86][SSE] Added fast-isel tests to sync with clang/test/CodeGen/sse-builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270081 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 16:55:52 +00:00
Simon Pilgrim
625707515f [X86][SSE2] Fixed shuffle of results in _mm_cmpnge_sd/_mm_cmpngt_sd tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270080 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 16:49:53 +00:00
Mitch Bodart
27d8b837b7 CodeGen: Move check of EnablePostRAScheduler to avoid disabling antidependency breaker
Previously, specifying -post-RA-scheduler=true had the side effect of
disabling the antidependency breaker, yielding different behavior than
if the post-RA-scheduler was enabled via the scheduling model.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270077 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 16:40:49 +00:00
George Rimar
b29ea6447e Temporarily revert r270070
It broke buildbot:
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/4817/steps/ninja%20check%201/logs/stdio

Actually it is just because D20273 not yet commited, but these 2 were crossing with each other,
and I`ll better find the way to land them separatelly soon.

Initial commit message:

[llvm-mc] - Teach llvm-mc to generate compressed debug sections in zlib style.

Before this patch llvm-mc generated zlib-gnu styled sections. 
That means no SHF_COMPRESSED flag was set, magic 'zlib' signature
was used in combination with full size field. Sections were renamed to "*.z*".
This patch reimplements the compression style to zlib one as zlib-gnu looks
to be depricated everywhere.

Differential revision: http://reviews.llvm.org/D20331

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270075 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 15:58:05 +00:00
Davide Italiano
88f5077adc [SCCP] Prefer class to struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270074 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 15:58:02 +00:00
Sanjay Patel
c105a37f5e [SelectionDAG] rename/move isKnownToBeAPowerOfTwo() from TargetLowering (NFC)
There are at least 2 places (DAGCombiner, X86ISelLowering) where this could be used instead
of ad-hoc and watered down code that is trying to match a power-of-2 pattern.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270073 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 15:53:52 +00:00
Matthew Simpson
204e3200ad [LAA] Check independence of strided accesses before forward case
This patch changes the order in which we attempt to prove the independence of
strided accesses. We previously did this after we knew the dependence distance
was positive. With this change, we check for independence before handling the
negative distance case. The patch prevents LAA from reporting forward
dependences for independent strided accesses.

This change was requested in the review of D19984.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270072 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 15:37:19 +00:00
George Rimar
c9c693751f [llvm-mc] - Teach llvm-mc to generate compressed debug sections in zlib style.
Before this patch llvm-mc generated zlib-gnu styled sections. 
That means no SHF_COMPRESSED flag was set, magic 'zlib' signature
was used in combination with full size field. Sections were renamed to "*.z*".
This patch reimplements the compression style to zlib one as zlib-gnu looks
to be depricated everywhere.

Differential revision: http://reviews.llvm.org/D20331

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270070 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 15:08:31 +00:00
Chad Rosier
ae7c8ddf94 [AArch64 ] Generate a BFXIL from 'or (and X, Mask0Imm),(and Y, Mask1Imm)'.
Mask0Imm and ~Mask1Imm must be equivalent and one of the MaskImms is a shifted
mask (e.g., 0x000ffff0).  Both 'and's must have a single use.

This changes code like:

  and w8, w0, #0xffff000f
  and w9, w1, #0x0000fff0
  orr w0, w9, w8

into

  lsr w8, w1, #4
  bfi w0, w8, #4, #12

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270063 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 14:19:47 +00:00
Ranjeet Singh
ab4af72527 [ARM] Add cdp intrinsic tests.
- Renamed intrinsics.ll to intrinsics-coprocessor.ll
  as all the tests were testing coprocessor instructions,
  also made the test checks match the full instruction.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270057 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 12:59:17 +00:00
Ranjeet Singh
8f225b96ad Test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270056 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 12:44:39 +00:00
Artem Tamazov
d8bb9ecd8c [AMDGPU][llvm-mc] Fixes to support buffer atomics.
Fixes for MUBUF_Atomic instructions to make operand list valid:
 - For RTN insns, make a copy of $vdata_in operand as $vdata.
 - Do not add operand for GLC, it is hardcoded and comes as a token.
Workaround to avoid adding multiple default optional operands.
Tests added.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270049 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 12:22:39 +00:00
Zoran Jovanovic
785d7f7fbf ps][microMIPS] Add R_MICROMIPS_PC21_S1 relocation
Differential Revision: http://reviews.llvm.org/D15526


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270048 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 12:20:40 +00:00
Simon Pilgrim
e4c02144d1 [X86][SSE2] Added _mm_move_* tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270046 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 11:59:57 +00:00
Simon Pilgrim
a861f2e16e [X86][SSE2] Added _mm_cast* and _mm_set* tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270041 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 10:58:54 +00:00
Daniel Sanders
7b27dc2e11 [mips][mips16] Fix ZERO is not a CPU16Regs register error from the machine verifier.
Summary: Partially fixes PR27458

Reviewers: sdardis

Subscribers: dsanders, llvm-commits, sdardis

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270037 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 10:42:14 +00:00
Andrey Turetskiy
7e9b79653d [X86] Enable RRL part of the LEA optimization pass for -O2.
Enable "Remove Redundant LEAs" part of the LEA optimization pass for -O2.
This gives 6.4% performance improve on Broadwell on nnet benchmark from Coremark-pro.
There is no significant effect on other benchmarks (Geekbench, Spec2000, Spec2006).

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270036 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 10:18:29 +00:00
Zlatko Buljan
f68477089e [mips][microMIPS] Implement BC1EQZC, BC1NEZC, BC2EQZC and BC2NEZC instructions
Differential Revision: http://reviews.llvm.org/D18352


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270030 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 07:31:28 +00:00
Craig Topper
ad8832da71 [X86] Generalize and combine some similar type constraints and node types. No changes to the isel table size so the separation wasn't buying us anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270026 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 06:13:58 +00:00
Craig Topper
ac890c2769 [X86] Simplify some type constraints by removing parts that were already implied.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270025 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 06:13:48 +00:00
Peter Collingbourne
28f667b461 CodeGen: Make the global-merge pass independently testable, and add a test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270023 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 04:38:56 +00:00
Vedant Kumar
c77570e062 Retry^3 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.

Changes since the initial commit:
- Fix error message printing in llvm-profdata.
- Check errors in loadTestingFormat() + annotateAllFunctions().
- Defer error handling in InstrProfIterator to InstrProfReader.
- Remove the base ProfError class to work around an MSVC ICE.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270020 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 03:54:45 +00:00
Sanjoy Das
658bddf628 [GuardWidening] Use getEquivalentICmp to fold constant compares
`ConstantRange::getEquivalentICmp` is more general, and better
factored.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270019 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 03:53:17 +00:00
Sanjoy Das
15c62f945a [ConstantRange] Add an getEquivalentICmp helper
Currently only its unit test uses it, but this will be used in a later
change to simplify some logic in the GuardWidening pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270018 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 03:53:06 +00:00
Dan Gohman
62dec0fa6b [WebAssembly] Update WebAssembly target for r269988.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270017 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 03:00:05 +00:00
Craig Topper
ab2007fdaa [X86] Remove some type constraint classes and use already existing stricter classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270013 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 02:05:58 +00:00
Craig Topper
2928467217 [AVX512] Strengthen type constraints for VFIXUPIMM patterns and combine the type constraints for vector and scalar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270012 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 02:05:55 +00:00
Dan Gohman
783e35acb8 [WebAssembly] Make several CHECK lines less fragile using regexes and CHECK-DAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270011 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 01:52:56 +00:00
Eugene Zelenko
efac554031 Fix some Clang-tidy modernize-use-bool-literals and Include What You Use warnings in examples; other minor fixes.
Differential revision: http://reviews.llvm.org/D20397


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270008 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 01:08:04 +00:00
Sanjay Patel
c40c117dfc reduce indentation; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270007 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 00:33:07 +00:00
Chad Rosier
d6995c8dcf [AArch64] Push comment into function. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270003 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 23:51:17 +00:00
Matt Arsenault
221ed41e35 AMDGPU: Fix verifier error when spilling undef subreg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270002 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 23:35:53 +00:00
Chris Bieneman
5963742178 [obj2yaml] Refactoring of dumping MachO section structs
This refactoring is to reduce code duplication between the 32-bit and 64-bit code paths. This refactoring will also make the special casing for other data after load commands cleaner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270001 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 23:22:53 +00:00
Matt Arsenault
44aaff08ed AMDGPU: Fix promote alloca for pointer loads
If the load has a pointer type, we don't want to change
its type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270000 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 23:20:24 +00:00
Sanjoy Das
9dbb32236a [LowerGuards] Rename variable; NFC
PredicatePassProbability is a better name for what LikelyBranchWeight
was trying to express.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269999 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 23:16:27 +00:00
Sanjoy Das
0266d5e92a New pass: guard widening
Summary:
Implement guard widening in LLVM. Description from GuardWidening.cpp:

The semantics of the `@llvm.experimental.guard` intrinsic lets LLVM
transform it so that it fails more often that it did before the
transform.  This optimization is called "widening" and can be used hoist
and common runtime checks in situations like these:

```
%cmp0 = 7 u< Length
call @llvm.experimental.guard(i1 %cmp0) [ "deopt"(...) ]
call @unknown_side_effects()
%cmp1 = 9 u< Length
call @llvm.experimental.guard(i1 %cmp1) [ "deopt"(...) ]
...
```

to

```
%cmp0 = 9 u< Length
call @llvm.experimental.guard(i1 %cmp0) [ "deopt"(...) ]
call @unknown_side_effects()
...
```

If `%cmp0` is false, `@llvm.experimental.guard` will "deoptimize" back
to a generic implementation of the same function, which will have the
correct semantics from that point onward.  It is always _legal_ to
deoptimize (so replacing `%cmp0` with false is "correct"), though it may
not always be profitable to do so.

NB! This pass is a work in progress.  It hasn't been tuned to be
"production ready" yet.  It is known to have quadriatic running time and
will not scale to large numbers of guards

Reviewers: reames, atrick, bogner, apilipenko, nlewycky

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269997 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 22:55:34 +00:00
Dehao Chen
8458fdbf49 Follow-up patch of http://reviews.llvm.org/D19948 to handle missing profiles when simplifying CFG.
Summary: Set default branch weight to 1:1 if one of the branch has profile missing when simplifying CFG.

Reviewers: spatel, davidxl

Subscribers: danielcdh, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269995 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 22:41:03 +00:00
Haicheng Wu
7a03ff405d [MBP] Remove a redundant skipFunction(). NFC.
skipFunction() is called twice.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269994 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 22:34:45 +00:00
Richard Smith
cf44b366f9 Work around a glibc bug: backtrace() spuriously fails if
- glibc is dynamically linked, and
 - libgcc_s is unavailable (for instance, another library is being used to
   provide the compiler runtime or libgcc is statically linked), and
 - the target is x86_64.

If we run backtrace() and it fails to find any stack frames, try using
_Unwind_Backtrace instead if available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269992 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 22:26:36 +00:00
Sanjay Patel
7aae44e690 fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269990 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 22:05:28 +00:00
Rafael Espindola
ac8db59598 Delete Reloc::Default.
Having an enum member named Default is quite confusing: Is it distinct
from the others?

This patch removes that member and instead uses Optional<Reloc> in
places where we have a user input that still hasn't been maped to the
default value, which is now clear has no be one of the remaining 3
options.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269988 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 22:04:49 +00:00