136198 Commits

Author SHA1 Message Date
David Majnemer
081d3f18a8 [COFF] Expose iterators for ImportAddressTableRVA
Patch by Bandzi Michal!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277298 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-31 19:40:02 +00:00
David Majnemer
e2fac43a5a [COFF] Remove a duplicate import_directory_table_entry definition
We had import_directory_table_entry and
coff_import_directory_table_entry, remove one.  Also, factor out the
logic which determins if a descriptor is a terminator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277296 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-31 19:25:21 +00:00
David Majnemer
5494cee7ac [bugpoint] Add a -Os option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277295 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-31 19:25:16 +00:00
Simon Pilgrim
ba6e43dfc0 [X86] Add tests for the lowering SHLD/SHRD from manual pattern similar to those generated by ExpandShiftWithKnownAmountBit
Test for add(v,v) as well as shl(v,1)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277293 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-31 17:51:37 +00:00
Craig Topper
ed98854bb4 [AVX-512] Don't let ExeDependencyFix pass convert VPANDD/Q to VPANDPS/PD unless DQI instructions are supported. Same for ANDN, OR, and XOR.
Thanks to Igor Breger for pointing out my mistake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277292 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-31 17:15:07 +00:00
Simon Pilgrim
0ffabf15e1 [X86] Add tests for the lowering SHLD/SHRD from manual patterns
As discussed on D23000



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277291 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-31 17:11:49 +00:00
Amjad Aboud
67b0099873 Fixed "copy-paste" mistake from revision 255245.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277290 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-31 14:41:50 +00:00
Elena Demikhovsky
d71fdd1359 AVX-512: Removed AssertZext node before TRUNCATE
Removed AssertZext node, which was inserted between X86ISD::SETCC and "truncate to i1".

Differential Revision: https://reviews.llvm.org/D22850



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277289 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-31 06:48:01 +00:00
Chandler Carruth
d9a7752daf [ADT] Add 'consume_front' and 'consume_back' methods to StringRef which
are very handy when parsing text.

They are essentially a combination of startswith and a self-modifying
drop_front, or endswith and drop_back respectively.

Differential Revision: https://reviews.llvm.org/D22723

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277288 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-31 02:19:13 +00:00
Davide Italiano
48f202f23f [HexagonConstPropagation] Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277285 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 22:07:21 +00:00
Davide Italiano
b9766783ad [HexagonBitSimplify] Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277284 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 22:07:18 +00:00
Davide Italiano
f796352534 [ARMConstantIslandPass] Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277283 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 22:07:15 +00:00
Lang Hames
ab4a20c283 [Support] Add doxygen @code tags to example code in Error comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277282 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 21:34:04 +00:00
Simon Pilgrim
8a08e7b471 [SLPVectorizer][X86] Added vXi8/vXi16 sitofp/uitofp tests
Dropped useless 2i32-2f32 test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277281 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 21:01:34 +00:00
Simon Pilgrim
3575d762d7 Strip trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277280 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 20:53:21 +00:00
Simon Pilgrim
ffbeb40500 [X86] Use peekThroughOneUseBitcasts helper function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277279 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 20:51:26 +00:00
Simon Pilgrim
cf26c4f3e0 [X86][SSE] Regenerate vshift tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277278 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 20:28:02 +00:00
Simon Pilgrim
efee4ecd70 [SLPVectorizer][X86] Added SITOFP/UITOFP vectorization tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277275 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 18:43:30 +00:00
Simon Pilgrim
15bce78b4e [X86][AVX] Added signum example test functions from PR13248
These are good examples of missed combine opportunities with zero/all bit vector compare results
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277274 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 16:29:19 +00:00
Simon Pilgrim
852791a004 [X86][X87] Add vector arithmetic tests for targets with sse disabled
To make sure the X86_64 target isn't doing anything stupid



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277272 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 16:01:30 +00:00
Simon Pilgrim
7ee24bd8b6 [X86][SSE] Let 64-bit targets use the fast 2i32-2f32 UINT_TO_FP conversion as well as 32-bit
The 2i32-2i64 legalization means that we can use the slightly quicker double bits + fptrunc approach for the same results



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277271 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 14:06:59 +00:00
Hubert Tong
b80ca8647e TrailingObjects::FixedSizeStorage constexpr fixes + tests
Summary:
This change fixes issues with `LLVM_CONSTEXPR` functions and
`TrailingObjects::FixedSizeStorage`. In particular, some of the
functions marked `LLVM_CONSTEXPR` used by `FixedSizeStorage` were not
implemented such that they evaluate successfully as part of a constant
expression despite constant arguments.

This change also implements a more traditional template-meta path to
accommodate MSVC, and adds unit tests for `FixedSizeStorage`.

Drive-by fix: the access control for members of `TrailingObjectsImpl` is
tightened.

Reviewers: faisalv, rsmith, aaron.ballman

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D22668


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277270 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 14:01:00 +00:00
Hubert Tong
f84abb4f62 MathExtras.h: add LLVM_CONSTEXPR where simple
Summary:
This change adds `LLVM_CONSTEXPR` to functions selected as follows:
- the body is already valid under C++11 for a `constexpr` function,
- the evaluation of the function, given constant arguments, will not
  fail during the evaluation of a constant expression, and
- the above properties are easily verifiable at a glance.

Note: the evaluation of the function cannot fail if the instantiation
triggers a static assertion failure.

Reviewers: faisalv, rsmith, aaron.ballman

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D22824


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277269 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 13:38:51 +00:00
Benjamin Kramer
90978a6b8f [Hexagon] Perform bit arithmetic on unsigned to avoid accidentally shifting negative values.
Found by ubsan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277268 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 13:25:37 +00:00
Benjamin Kramer
4b6011ecbe Update modulemap for Msf -> MSF rename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277267 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 12:05:17 +00:00
Benjamin Kramer
e4a63cb228 [X86] Fix lifetime of SMRange temporaries.
Found by asan -fsanitize-address-use-after-scope.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277266 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 11:31:24 +00:00
Benjamin Kramer
7ed559c109 [AMDGPU] Fix lifetime of SmallVector temporaries.
Found by asan -fsanitize-address-use-after-scope.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277265 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 11:31:16 +00:00
Matt Arsenault
4fd45ebabd AMDGPU: Fix shouldConvertConstantLoadToIntImm behavior
This should really be true for any immediate, not just
inline ones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277260 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 01:40:36 +00:00
Matt Arsenault
40d057e621 AMDGPU: Set s_setpc_b64 as a terminator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277259 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 01:40:34 +00:00
Matt Arsenault
2ce8293945 AMDGPU: Remove unused pattern
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277258 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 01:40:30 +00:00
Lang Hames
e36db68615 [Orc] Add support for updating stub targets to CompileOnDemandLayer.
This makes it possible to implement re-optimization on top of the
CompileOnDemandLayer.

Test case to come in a future patch: This will need an execution test, and
execution tests require a full working stack. The best option is to plumb this
API up to the C Bindings stack and add a C bindings test for this.

Patch by Sean Ogden. Thanks Sean!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277257 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 00:57:54 +00:00
Hans Wennborg
a66064fb07 Remove empty DebugInfo/Msf dirs. It seems these were left over from
the renaming from 'Msf' to 'MSF' in r277213.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277254 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30 00:08:45 +00:00
Weiming Zhao
7420263227 DAG: avoid duplicated truncating for sign extended operand
Summary:
When performing cmp for EQ/NE and the operand is sign extended, we can
avoid the truncaton if the bits to be tested are no less than origianl
bits.

Reviewers: eli.friedman

Subscribers: eli.friedman, aemerson, nemanjai, t.p.northover, llvm-commits

Differential Revision: https://reviews.llvm.org/D22933

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277252 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 23:33:48 +00:00
Lang Hames
17beea7ca2 [Support] Add storage specifier for MachO::NListType.
This should fix UB warnings from the sanitizer bots: LLD performs bit
manipulations on enums of this type, and these are UB if the underlying
storage type isn't specified.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277251 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 23:17:53 +00:00
Tim Northover
d6e3a6564c GlobalISel: translate "unreachable" (into nothing)
Easiest instruction ever!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277225 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 22:41:55 +00:00
Tim Northover
0f15518dae GlobalISel: support translation of intrinsic calls.
These come in two variants for now: G_INTRINSIC and G_INTRINSIC_W_SIDE_EFFECTS.
We may decide to split the latter up with finer-grained restrictions later, if
necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277224 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 22:32:36 +00:00
Kevin Enderby
ebd83360ff Think this will fix issues with the error messages generated for malformed-archives.test
in r277177 and added back this test which was deleted in r277196 while
I tracked down these problems.

Changed from constructing Twine's to std::string's as Twine's don't work
across statements.  Also removed a few unneeded Twine() constructions.

Fix the write_escaped() calls to not pass the unintended second argument
fixing the warning on the ld-x86_64-win7 bot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277223 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 22:32:02 +00:00
Krzysztof Parzyszek
33bf01e7cc [Hexagon] Referencify MachineInstr in HexagonInstrInfo, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277220 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 21:49:42 +00:00
Michael Kuperstein
53c51fa032 [X86] Match PSADBW in straight-line code
Up until now, we only had code to match PSADBW patterns that look like what
comes out of the loop vectorizer - a partial reduction inside the loop body
that gets fed into a horizontal operation in a different basic block.

This adds support for straight-line patterns, like those generated by the
SLP vectorizer.

Differential Revision: https://reviews.llvm.org/D22889


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277219 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 21:45:51 +00:00
Michael Kuperstein
9d2d4392e4 [Hexagon] Fix test that uses -debug-only to require asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277218 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 21:44:33 +00:00
Rui Ueyama
a8209f7b0e pdbdump: Dump Free Page Map contents.
Differential Revision: https://reviews.llvm.org/D22974

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277216 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 21:38:00 +00:00
Simon Pilgrim
6b00b5fe86 [X86][AVX] Fix VBROADCASTF128 selection bug (PR28770)
Support for lowering to VBROADCASTF128 etc. in D22460 was not correctly ensuring that the only users of the 128-bit vector load were the insertions of the vector into the lower/upper subvectors.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277214 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 21:05:10 +00:00
Zachary Turner
5e117855c3 [msf] Resubmit "Rename Msf -> MSF".
Previously this change was submitted from a Windows machine, so
changes made to the case of filenames and directory names did
not survive the commit, and as a result the CMake source file
names and the on-disk file names did not match on case-sensitive
file systems.

I'm resubmitting this patch from a Linux system, which hopefully
allows the case changes to make it through unfettered.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277213 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 20:56:36 +00:00
Tim Northover
9c9955b41f CodeGen: add new "intrinsic" MachineOperand kind.
This will be used during GlobalISel, where we need a more robust and readable
way to write tests than a simple immediate ID.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277209 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 20:32:59 +00:00
Eli Bendersky
e66318d700 Add a REQUIRES: assert on a Lanai test that uses a -debug-only flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277204 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 19:35:22 +00:00
Adam Nemet
c4f6d8cd25 [LoopUnroll] Include hotness of region in opt remark
LoopUnroll is a loop pass, so the analysis of OptimizationRemarkEmitter
is added to the common function analysis passes that loop passes
depend on.

The BFI and indirectly BPI used in this pass is computed lazily so no
overhead should be observed unless -pass-remarks-with-hotness is used.

This is how the patch affects the O3 pipeline:

         Dominator Tree Construction
         Natural Loop Information
         Canonicalize natural loops
         Loop-Closed SSA Form Pass
         Basic Alias Analysis (stateless AA impl)
         Function Alias Analysis Results
         Scalar Evolution Analysis
+        Lazy Branch Probability Analysis
+        Lazy Block Frequency Analysis
+        Optimization Remark Emitter
         Loop Pass Manager
           Rotate Loops
           Loop Invariant Code Motion
           Unswitch loops
         Simplify the CFG
         Dominator Tree Construction
         Basic Alias Analysis (stateless AA impl)
         Function Alias Analysis Results
         Combine redundant instructions
         Natural Loop Information
         Canonicalize natural loops
         Loop-Closed SSA Form Pass
         Scalar Evolution Analysis
+        Lazy Branch Probability Analysis
+        Lazy Block Frequency Analysis
+        Optimization Remark Emitter
         Loop Pass Manager
           Induction Variable Simplification
           Recognize loop idioms
           Delete dead loops
           Unroll loops
...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277203 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 19:29:47 +00:00
Ahmed Bougacha
422520dac8 [GlobalISel] Add missing link components to r277160 unittest. NFC.
It broke a shared builder:
  http://lab.llvm.org:8011/builders/llvm-mips-linux/builds/17320

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277201 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 19:19:32 +00:00
Simon Pilgrim
ee3cf6f987 Fixed line endings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277199 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 18:58:57 +00:00
Simon Pilgrim
269530183d Fixed (incorrectly firing) MSVC unused variable warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277198 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 18:57:32 +00:00
David Majnemer
7e8508b6e6 [ConstantFolding] Handle bitcasts of undef fp vector elements
We used the wrong type for constructing a zero vector element which led
to type mismatches.

This fixes PR28771.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277197 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 18:48:27 +00:00