OSDN Git Service
Sanjay Patel [Thu, 16 Jun 2016 15:48:30 +0000 (15:48 +0000)]
[x86] autoupgrade and remove SSE2/SSE41 integer min/max intrinsics
Follow-up to:
http://reviews.llvm.org/rL272806
http://reviews.llvm.org/rL272807
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272907
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 16 Jun 2016 15:47:19 +0000 (15:47 +0000)]
Remove redundant -mattr options from llvm-objdump commands.
The -mattr options in these four tests have no effect on the output of
llvm-objdump. In the case of the two Mips tests, removing the -mattr option
left duplicate RUN lines so the duplicates have been removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272906
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 16 Jun 2016 15:44:06 +0000 (15:44 +0000)]
Refactor duplicated code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272905
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 16 Jun 2016 15:40:24 +0000 (15:40 +0000)]
Refactor duplicated code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272904
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 16 Jun 2016 15:31:06 +0000 (15:31 +0000)]
Refactor duplicated code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272903
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 16 Jun 2016 15:22:01 +0000 (15:22 +0000)]
Refactor duplicated code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272901
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Thu, 16 Jun 2016 14:47:23 +0000 (14:47 +0000)]
[codeview] Pass CVRecord to visitTypeBegin callback.
Both parameters to visitTypeBegin are actually members of CVRecord,
so we can just pass CVRecord instead of destructuring it.
Differential Revision: http://reviews.llvm.org/D21435
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272899
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Thu, 16 Jun 2016 14:41:22 +0000 (14:41 +0000)]
[codeview] Remove unused parameter.
Differential Revision: http://reviews.llvm.org/D21433
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272898
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Thu, 16 Jun 2016 14:25:13 +0000 (14:25 +0000)]
[mips] Fix small typo. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272895
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Thu, 16 Jun 2016 13:48:16 +0000 (13:48 +0000)]
Implement pdb::hashBufferV8 hash function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272894
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Thu, 16 Jun 2016 13:28:25 +0000 (13:28 +0000)]
[JumpThreading] Prevent dangling pointer problems in BranchProbabilityInfo
We should update results of the BranchProbabilityInfo after removing block in JumpThreading. Otherwise
we will get dangling pointer inside BranchProbabilityInfo cache.
Differential Revision: http://reviews.llvm.org/D20957
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272891
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Thu, 16 Jun 2016 13:17:59 +0000 (13:17 +0000)]
Remove redundant namespace specifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272889
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Thu, 16 Jun 2016 13:14:42 +0000 (13:14 +0000)]
[codeview] Use CVTypeVisitor instead of a hand-written switch-cases.
Differential Revision: http://reviews.llvm.org/D21418
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272888
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hagglund [Thu, 16 Jun 2016 10:48:54 +0000 (10:48 +0000)]
PR27938: Don't remove valid DebugLoc in Scalarizer
Added checks to make sure the Scalarizer::transferMetadata() don't
remove valid debug locations from instructions. This is important as
the verifier pass require that e.g. inlinable callsites have a valid
debug location.
https://llvm.org/bugs/show_bug.cgi?id=27938
Patch by Karl-Johan Karlsson
Reviewers: dblaikie
Differential Revision: http://reviews.llvm.org/D20807
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272884
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 16 Jun 2016 10:20:59 +0000 (10:20 +0000)]
[mips][mips16] Fix machine verifier errors about incorrect register classes on load/stores.
Summary:
[ls][bh] and [ls][bh]u cannot use sp-relative addresses and must therefore
lower frameindex nodes such that there is a copy to a CPU16Regs register. This
is now done consistently using a separate addressing mode that does not
permit frameindex nodes.
As part of this I've had to remove an optimization that reduced the number of
instructions needed to work around the lack of sp-relative addresses on [ls][bh]
and [ls][bh]u. This optimization used one of the eight CPU16Regs registers as
a copy of the stack pointer and it's implementation was the root cause of many
of the register vs register class mismatches.
lw/sw can use sp-relative addresses but we ought to ensure that we use the
correct version of lw/sw internally for things like IAS. This is not currently
the case and this change does not fix this. However, this change does clean it
up sufficiently well to fix the machine verifier failures.
Also removed irrelevant functions from stchar.ll.
Reviewers: sdardis
Subscribers: dsanders, sdardis, llvm-commits
Differential Revision: http://reviews.llvm.org/D21062
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272882
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 16 Jun 2016 09:17:03 +0000 (09:17 +0000)]
[llvm-objdump] Support detection of feature bits from the object and implement this for Mips.
Summary:
The Mips implementation only covers the feature bits described by the ELF
e_flags so far. Mips stores additional feature bits such as MSA in the
.MIPS.abiflags section.
Also fixed a small bug this revealed where microMIPS wouldn't add the
EF_MIPS_MICROMIPS flag when using -filetype=obj.
Reviewers: echristo, rafael
Subscribers: rafael, mehdi_amini, dsanders, sdardis, llvm-commits
Differential Revision: http://reviews.llvm.org/D21125
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272880
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 16 Jun 2016 08:27:03 +0000 (08:27 +0000)]
[LAA] Rename Strides to SymblicStrides in analyzeLoop. NFC
This is to facilitate to move of SymblicStrides from LV to LAA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272879
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 16 Jun 2016 08:26:56 +0000 (08:26 +0000)]
[LAA] Default getInfo to not speculate symbolic strides. NFC
Soon we won't be passing Strides to getInfo and then we'll have fewer
call sites to update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272878
91177308-0d34-0410-b5e6-
96231b3b80d8
Vassil Vassilev [Thu, 16 Jun 2016 08:00:29 +0000 (08:00 +0000)]
[modules] Combine Pass.h, PassSupport.h and PassAnalysisSupport.h into one module.
The header files are designed to be used always together (through Pass.h).
Addresses the first part of https://llvm.org/bugs/show_bug.cgi?id=27991
Patch by Cristina Cristescu and me.
Reviewed by Richard Smith.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272877
91177308-0d34-0410-b5e6-
96231b3b80d8
Hrvoje Varga [Thu, 16 Jun 2016 07:06:25 +0000 (07:06 +0000)]
[mips][micromips] Implement DCLO, DCLZ, DROTR, DROTR32 and DROTRV instructions
Differential Revision: http://reviews.llvm.org/D16917
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272876
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Thu, 16 Jun 2016 07:00:19 +0000 (07:00 +0000)]
Attempt to define friend function more portably.
Patch written by Reid. I verified it locally with clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272875
91177308-0d34-0410-b5e6-
96231b3b80d8
Chuang-Yu Cheng [Thu, 16 Jun 2016 04:44:25 +0000 (04:44 +0000)]
SimplifyCFG is able to detect the pattern:
(i == 5334 || i == 5335)
to:
((i & -2) == 5334)
This transformation has some incorrect side conditions. Specifically, the
transformation is only applied when the right-hand side constant (5334 in
the example) is a power of two not equal and not equal to the negated mask.
These side conditions were added in r258904 to fix PR26323. The correct side
condition is that: ((Constant & Mask) == Constant)[(5334 & -2) == 5334].
It's a little bit hard to see why these transformations are correct and what
the side conditions ought to be. Here is a CVC3 program to verify them for
64-bit values:
ONE : BITVECTOR(64) = BVZEROEXTEND(0bin1, 63);
x : BITVECTOR(64);
y : BITVECTOR(64);
z : BITVECTOR(64);
mask : BITVECTOR(64) = BVSHL(ONE, z);
QUERY( (y & ~mask = y) =>
((x & ~mask = y) <=> (x = y OR x = (y | mask)))
);
Please note that each pattern must be a dual implication (<--> or iff). One
directional implication can create spurious matches. If the implication is
only one-way, an unsatisfiable condition on the left side can imply a
satisfiable condition on the right side. Dual implication ensures that
satisfiable conditions are transformed to other satisfiable conditions and
unsatisfiable conditions are transformed to other unsatisfiable conditions.
Here is a concrete example of a unsatisfiable condition on the left
implying a satisfiable condition on the right:
mask = (1 << z)
(x & ~mask) == y --> (x == y || x == (y | mask))
Substituting y = 3, z = 0 yields:
(x & -2) == 3 --> (x == 3 || x == 2)
The version of this code before r258904 had no side-conditions and
incorrectly justified itself in comments through one-directional
implication.
Thanks to Chandler for the suggestion!
Author: Thomas Jablin (tjablin)
Reviewers: chandlerc majnemer hfinkel cycheng
http://reviews.llvm.org/D21417
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272873
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 16 Jun 2016 03:58:45 +0000 (03:58 +0000)]
[X86] Pre-size some SmallVectors using the constructor in the shuffle lowering code instead of using push_back. Some of these already did this but used resize or assign instead of the constructor. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272872
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 16 Jun 2016 03:58:42 +0000 (03:58 +0000)]
[X86] Remove else after return. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272871
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 16 Jun 2016 03:11:00 +0000 (03:11 +0000)]
[X86] Inline a couple lambdas into their callers since they are only used once and it all fits on a single line. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272869
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 16 Jun 2016 02:33:42 +0000 (02:33 +0000)]
[InstCombine] Don't widen metadata on store-to-load forwarding
The original check for load CSE or store-to-load forwarding is wrong
when the forwarded stored value happened to be a load.
Ref https://github.com/JuliaLang/julia/issues/16894
Differential Revision: http://reviews.llvm.org/D21271
Patch by Yichao Yu!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272868
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Thu, 16 Jun 2016 01:52:48 +0000 (01:52 +0000)]
Fix test from D21194
Bot sets ASAN_OPTIONS=handle_abort=1 which prevents expected crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272866
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 16 Jun 2016 01:42:25 +0000 (01:42 +0000)]
AArch64: allow MOV (imm) alias to be printed
The backend has been around for years, it's pretty ridiculous that we can't
even use the preferred form for printing "MOV" aliases. Unfortunately, TableGen
can't handle the complex predicates when printing so it's a bunch of nasty C++.
Oh well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272865
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 16 Jun 2016 01:33:59 +0000 (01:33 +0000)]
[codeview] Regenerate test case with unique identifiers
Clang now emits these, and these match MSVC. Should allow more powerful
merging of type records across TUs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272864
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Thu, 16 Jun 2016 01:26:46 +0000 (01:26 +0000)]
Debugging D21194 issues on bot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272863
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 16 Jun 2016 01:00:53 +0000 (01:00 +0000)]
Tidy the asm parser: 80-col, whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272861
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 16 Jun 2016 00:56:47 +0000 (00:56 +0000)]
AMDGPU: Disable scheduling in some slow tests
Disabling the pre-RA scheduler on large-work-group-registers
causes it to be ~50% slower.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272860
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Thu, 16 Jun 2016 00:14:42 +0000 (00:14 +0000)]
Enable libFuzzer's afl_driver to append stderr to a file.
Summary:
[libFuzzer] Enable afl_driver to append stderr to a user specified file.
Append stderr of afl_driver to the file specified by the environmental variable
AFL_DRIVER_STDERR_DUPLICATE_FILENAME if it is set. This lets users see outputs
on crashes without rerunning crashing test cases (which won't work for crashes
that are difficult to reproduce). Before this patch, stderr would only be sent to afl-fuzz
and users would have no way of seeing it.
Reviewers: llvm-commits, aizatsky, kcc, vitalybuka
Subscribers: vitalybuka
Differential Revision: http://reviews.llvm.org/D21194
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272858
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Wed, 15 Jun 2016 23:20:15 +0000 (23:20 +0000)]
[IR] [DAE] Copy comdats during DAE, and don't copy comdats in GlobalObject::copyAttributesFrom.
Summary: This reverts the changes to Globals.cpp and IRMover.cpp in
"[IR] Copy comdats in GlobalObject::copyAttributesFrom" (D20631,
rL270743).
The DeadArgElim test is left unchanged, and we change DAE to explicitly
copy comdats.
The reverted change breaks copyAttributesFrom when the destination lives
in a different module from the source. The decision in D21255 was to
revert this patch and handle comdat copying separately from
copyAttributesFrom.
Reviewers: majnemer, rnk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D21403
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272855
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Wed, 15 Jun 2016 23:20:12 +0000 (23:20 +0000)]
[Bugpoint] Erase comdat annotations after removing a global's initializer.
Summary:
This is necessary to keep the verifier happy after bugpoint removes an
initializer from a global variable with a comdat annotation, because
globals without initializers may not have comdats.
Reviewers: majnemer, rnk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D21274
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272854
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 15 Jun 2016 22:58:27 +0000 (22:58 +0000)]
[LV] Make the new getter return a const reference. NFC
LoopVectorizationLegality holds a constant reference to LAI, so this
will have to be const as well.
Also added missed function comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272851
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 15 Jun 2016 22:20:56 +0000 (22:20 +0000)]
Address review feedbacks of AddDiscriminator change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272850
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 15 Jun 2016 22:17:38 +0000 (22:17 +0000)]
[DSE] Hoist a redundant check to simplify logic. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272849
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Jun 2016 22:01:28 +0000 (22:01 +0000)]
fix comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272848
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 15 Jun 2016 21:51:30 +0000 (21:51 +0000)]
[PM] Port Add discriminator pass to new PM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272847
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 15 Jun 2016 21:41:22 +0000 (21:41 +0000)]
Typo. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272846
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 15 Jun 2016 21:25:29 +0000 (21:25 +0000)]
[Codeview] Add a class for LF_UDT_MOD_SRC_LINE.
Differential Revision: http://reviews.llvm.org/D21406
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272843
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 15 Jun 2016 21:23:54 +0000 (21:23 +0000)]
[PM] Remove unneded doFinalization() override from LoopVersioningLICM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272842
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Jun 2016 21:22:15 +0000 (21:22 +0000)]
[x86, SSE] update packed FP compare tests for direct translation from builtin to IR
The clang side of this was r272840:
http://reviews.llvm.org/rL272840
A follow-up step would be to auto-upgrade and remove these LLVM intrinsics completely.
Differential Revision: http://reviews.llvm.org/D21269
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272841
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 15 Jun 2016 21:14:02 +0000 (21:14 +0000)]
Address a few coding style issues. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272838
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 15 Jun 2016 21:14:01 +0000 (21:14 +0000)]
Fix llvm-objdump when disassembling a stripped Mach-O binary with the -macho option.
It was printing out nothing in this case.
llvm-objdump tries to disassemble sections a symbol at a time. In the case of a
fully stripped Mach-O executable the only symbol remaining in the (__TEXT,__text)
section is the special linker defined symbol __mh_execute_header . This
symbol is special in that while it is N_SECT symbol in the (__TEXT,__text)
its address is before the start of the (__TEXT,__text). It’s address is the
start of the __TEXT segment which is where the mach header is statically
linked. So the code in DisassembleMachO() needs to deal with this case specially.
rdar://
26778273
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272837
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 15 Jun 2016 21:05:04 +0000 (21:05 +0000)]
[Hexagon] Fix/simplify some conditional statements
Fix for PR28138.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272836
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin B. Smith [Wed, 15 Jun 2016 20:52:19 +0000 (20:52 +0000)]
[X86]: Fix for uninitialized access introduced in r272797.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272835
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Jun 2016 20:51:47 +0000 (20:51 +0000)]
[x86] delete unnecessary function declarations
Missed this in r272806, r272807.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272834
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Wed, 15 Jun 2016 20:43:41 +0000 (20:43 +0000)]
[CFLAA] Ignore non-pointers, move Attrs to graph nodes.
This patch makes CFLAA ignore non-pointer values, since we can now
sanely do that with the escaping/unknown attributes. Additionally,
StratifiedAttrs make more sense to sit on nodes than edges (since
they're properties of values, and ultimately end up on the nodes of
StratifiedSets). So, this patch puts said attributes on nodes.
Patch by Jia Chen.
Differential Revision: http://reviews.llvm.org/D21387
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272833
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 15 Jun 2016 20:33:36 +0000 (20:33 +0000)]
AArch64: stop trying to use 32-bit MOVZs when expanding patchpoints.
Of course the assembly was right but because the opcode was MOVZWi it was
encoded as "movz w16, #65535, lsl #32" which is an unallocated encoding and
would go horribly wrong on a CPU.
No idea how this bug survived this long. It seems nobody is using that aspect
of patchpoints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272831
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 15 Jun 2016 20:32:42 +0000 (20:32 +0000)]
Axe some trailing whitespace from my last commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272830
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 15 Jun 2016 20:30:34 +0000 (20:30 +0000)]
[codeview] Move deserialization methods out of line
They aren't performance critical and don't need to be inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272829
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Jun 2016 20:26:58 +0000 (20:26 +0000)]
[x86] add folds for x86 vector compare nodes (PR27924)
Ideally, we can get rid of most x86 LLVM intrinsics by transforming them to IR (and some of that happened
with http://reviews.llvm.org/rL272807), but it doesn't cost much to have some simple folds in the backend
too while we're working on that and as a backstop.
This fixes:
https://llvm.org/bugs/show_bug.cgi?id=27924
Differential Revision: http://reviews.llvm.org/D21356
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272828
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 15 Jun 2016 20:19:16 +0000 (20:19 +0000)]
Statistic: Add machine parseable json output
- We lacked a short unique identifier for a statistics, so I renamed the
current "Name" field that just contained the DEBUG_TYPE name of the
current file to DebugType and added a new "Name" field that contains
the C++ identifier of the statistic variable.
- Add the -stats-json option which outputs statistics in json format.
Differential Revision: http://reviews.llvm.org/D20995
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272826
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 15 Jun 2016 18:51:25 +0000 (18:51 +0000)]
[LoopSimplify] Analyses do not need to be member variables.
In preparation for porting this pass to the new PM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272818
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 15 Jun 2016 18:48:35 +0000 (18:48 +0000)]
[codeview] Use ArrayRef instead of a non-const vector reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272817
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 15 Jun 2016 18:26:59 +0000 (18:26 +0000)]
[pdbdump] Verify LF_{CLASS,ENUM,INTERFACE,STRUCTURE,UNION} records.
Differential Revision: http://reviews.llvm.org/D21361
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272815
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin B. Smith [Wed, 15 Jun 2016 18:18:05 +0000 (18:18 +0000)]
[X86]: Updated r272801 to promote 16 bit compares with immediate operand
to 32 bits. This is in response to a comment by Eli Friedman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272814
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 15 Jun 2016 18:00:01 +0000 (18:00 +0000)]
[CodeView] Add support for emitting S_UDT for typedefs
Emit a S_UDT record for typedefs. We still need to do something for
class types.
Differential Revision: http://reviews.llvm.org/D21149
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272813
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Wed, 15 Jun 2016 17:50:39 +0000 (17:50 +0000)]
Add support for string attributes in the C API.
Summary: As per title. This completes the C API Attribute support.
Reviewers: Wallbraker, whitequark, echristo, rafael, jyknight
Subscribers: mehdi_amini
Differential Revision: http://reviews.llvm.org/D21365
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272811
91177308-0d34-0410-b5e6-
96231b3b80d8
Pankaj Gode [Wed, 15 Jun 2016 17:24:52 +0000 (17:24 +0000)]
Test commit after access grant. Modified comment by adding a period.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272808
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Jun 2016 17:17:27 +0000 (17:17 +0000)]
[x86, SSE] remove the GCCBuiltins from the integer min/max intrinsics
This allows us to emit native IR in Clang (next commit).
Also, update the intrinsic tests to show that codegen already knows how to handle
the IR that Clang will soon produce.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272806
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Jun 2016 17:12:29 +0000 (17:12 +0000)]
[x86] fix function name; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272805
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 15 Jun 2016 16:47:23 +0000 (16:47 +0000)]
[TargetLibraryInfo] Teach isValidProtoForLibFunc about tan
We would fail to validate the type of the tan function which would cause
downstream users of isValidProtoForLibFunc to assert.
This fixes PR28143.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272802
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin B. Smith [Wed, 15 Jun 2016 16:37:46 +0000 (16:37 +0000)]
[X86]: Quit promoting 8 and 16 bit compares to 32 bit.
Differential Revision: http://reviews.llvm.org/D21144
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272801
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Wed, 15 Jun 2016 16:08:50 +0000 (16:08 +0000)]
Revert "Preserve DebugInfo when replacing values in DAGCombiner"
Reverting due to assertion failure in
lib/CodeGen/SelectionDAG/InstrEmitter.cpp
This reverts commit r272792.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272799
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin B. Smith [Wed, 15 Jun 2016 16:03:06 +0000 (16:03 +0000)]
[X86]: Improve Liveness checking for X86FixupBWInsts.cpp
Differential Revision: http://reviews.llvm.org/D21085
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272797
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 15 Jun 2016 15:49:46 +0000 (15:49 +0000)]
[LV] Add getter function for LoopVectorizationLegality::Strides. NFC
This should help moving Strides to LAA later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272796
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Wed, 15 Jun 2016 15:30:07 +0000 (15:30 +0000)]
[mips] Eliminate unused code for addrRegReg complex pattern. NFC.
Reviewers: dsanders, sdardis
Subscribers: dsanders, sdardis, llvm-commits
Differential Revision: http://reviews.llvm.org/D21381
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272794
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 15 Jun 2016 15:27:53 +0000 (15:27 +0000)]
Add llvm_unreachable to silence a "not all control paths" false positive warning from MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272793
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Wed, 15 Jun 2016 14:50:08 +0000 (14:50 +0000)]
Preserve DebugInfo when replacing values in DAGCombiner
[DAG] Previously debug values would transfer debuginfo for the selected
start node for a replacement which allows for debug to be dropped.
Push debug value transfer to occur with node/value replacement in
SelectionDAG, remove now extraneous transfers of debug values.
This refixes PR9817 which was being incompletely checked in the
testsuite.
Reviewers: jyknight
Subscribers: dblaikie, llvm-commits
Differential Revision: http://reviews.llvm.org/D21037
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272792
91177308-0d34-0410-b5e6-
96231b3b80d8
Ranjeet Singh [Wed, 15 Jun 2016 14:23:29 +0000 (14:23 +0000)]
Reverting r272778 because there's an assertion
failure when running the test CodeGen/ARM/intrinsics-coprocessor.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272791
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 15 Jun 2016 14:06:28 +0000 (14:06 +0000)]
[AVX512] Remove the GCCBuiltins from the mask pcmpeq/pcmpgt intrinsics so we can emit native IR from clang.
The intrinsics themselves can be removed in a future commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272786
91177308-0d34-0410-b5e6-
96231b3b80d8
Valery Pykhtin [Wed, 15 Jun 2016 13:55:09 +0000 (13:55 +0000)]
[AMDGPU] Fix few coding style issues. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272785
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 15 Jun 2016 13:49:58 +0000 (13:49 +0000)]
[mips] Missing test case
Add missing testcase from r272666.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272784
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 15 Jun 2016 12:26:15 +0000 (12:26 +0000)]
[LV] Remove more unused functions. NFC
LoopVectorizationLegality::strides_begin/end are also unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272781
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 15 Jun 2016 12:26:11 +0000 (12:26 +0000)]
[LV] Remove unused function. NFC
LoopVectorizationLegality::mustCheckStrides is unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272780
91177308-0d34-0410-b5e6-
96231b3b80d8
Ranjeet Singh [Wed, 15 Jun 2016 11:32:24 +0000 (11:32 +0000)]
[ARM] Add support for mrrc/mrrc2 intrinsics.
Differential Revision: http://reviews.llvm.org/D21178
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272778
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 15 Jun 2016 10:51:40 +0000 (10:51 +0000)]
Work around MSVC "friend" semantics.
The error on clang-x86-win2008-selfhost is:
C:\buildbot\slave-config\clang-x86-win2008-selfhost\llvm\lib\Transforms\Vectorize\SLPVectorizer.cpp(955) : error C2248: 'llvm::slpvectorizer::BoUpSLP::ScheduleData' : cannot access private struct declared in class 'llvm::slpvectorizer::BoUpSLP'
C:\buildbot\slave-config\clang-x86-win2008-selfhost\llvm\lib\Transforms\Vectorize\SLPVectorizer.cpp(608) : see declaration of 'llvm::slpvectorizer::BoUpSLP::ScheduleData'
C:\buildbot\slave-config\clang-x86-win2008-selfhost\llvm\lib\Transforms\Vectorize\SLPVectorizer.cpp(337) : see declaration of 'llvm::slpvectorizer::BoUpSLP'
I reproduced this locally with both MSVC 2013 and MSVC 2015.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272772
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 15 Jun 2016 10:36:16 +0000 (10:36 +0000)]
[mips] Replace AdditionalRequires<[IsGP64bit]> with GPR_64. NFC.
Summary: Also fixed one case where HasMips64 was being used instead of IsGP64bit.
Reviewers: sdardis
Subscribers: dsanders, llvm-commits, sdardis
Differential Revision: http://reviews.llvm.org/D21028
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272771
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hagglund [Wed, 15 Jun 2016 10:32:00 +0000 (10:32 +0000)]
Use FPasses in opt exactly when it is initialized.
Previously, there was a discrepancy between the population of function
passes in FPasses, and their invocation. Function passes specified on
the command line, after an optimizaton level was simply discared. This
fix PR27509.
Patch by Jesper Antonsson.
Differential Review: http://reviews.llvm.org/D20725
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272770
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 15 Jun 2016 09:47:27 +0000 (09:47 +0000)]
[mips] Removed invalid test from o32_cc.ll
MIPS32R1 cannot implement a 64-bit FPU because this was introduced in MIPS32R2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272769
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 15 Jun 2016 09:44:22 +0000 (09:44 +0000)]
[mips] clang-format Mips16ISelDAGToDAG.{cpp,h}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272768
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 15 Jun 2016 09:00:33 +0000 (09:00 +0000)]
Speculative buildbot fix.
This wasn't failing for me with clang as the compiler. I think GCC may
disagree with clang about whether a friend declaration introduces a
declaration in the enclosing namespace (or something).
Example error:
/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:950:77: error: ‘llvm::raw_ostream& llvm::slpvectorizer::operator<<(llvm::raw_ostream&, const llvm::slpvectorizer::BoUpSLP::ScheduleData&)’ should have been declared inside ‘llvm::slpvectorizer’
const BoUpSLP::ScheduleData &SD) {
^
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272767
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 15 Jun 2016 08:43:40 +0000 (08:43 +0000)]
[PM] Port SLPVectorizer to the new PM
This uses the "runImpl" approach to share code with the old PM.
Porting to the new PM meant abandoning the anonymous namespace enclosing
most of SLPVectorizer.cpp which is a bit of a bummer (but not a big deal
compared to having to pull the pass class into a header which the new PM
requires since it calls the constructor directly).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272766
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 15 Jun 2016 08:43:23 +0000 (08:43 +0000)]
[mips][msa] Fix register/register-class mismatches in emitINSERT_DF_VIDX().
Reviewers: sdardis
Subscribers: dsanders, sdardis, llvm-commits
Differential Revision: http://reviews.llvm.org/D21068
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272765
91177308-0d34-0410-b5e6-
96231b3b80d8
Zlatko Buljan [Wed, 15 Jun 2016 07:46:24 +0000 (07:46 +0000)]
[mips][microMIPS] Add CodeGen support for AND*, OR16, OR*, XOR*, NOT16 and NOR instructions
Differential Revision: http://reviews.llvm.org/D16719
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272764
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Wed, 15 Jun 2016 07:30:38 +0000 (07:30 +0000)]
[AVX512] Fix BLENDM lowering patterns. Operands should be swapped to match SELECT behavior.
Use BLENDM instead of masked move instruction.
Differential Revision: http://reviews.llvm.org/D21001
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272763
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 15 Jun 2016 07:27:04 +0000 (07:27 +0000)]
Push a dependent computation into the assert that uses it; NFC
... instead of explicitly conditioning on NDEBUG. Also use an easier to
read conditional expression.
(Addresses post-commit review from David Blaikie.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272762
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Wed, 15 Jun 2016 07:13:05 +0000 (07:13 +0000)]
AMDGPU: Fix MUBUF offset bugs affecting llvm.amdgcn.buffer.* intrinsics
Summary:
This fixes two related bugs. First, the generic optimization passes
unfortunately generate negative constant offsets but the hardware treats
SOffset as an unsigned value.
Second, there is a hardware bug on SI and CI, where address clamping in MUBUF
instructions does not work correctly when SOffset is larger than the buffer
size. This patch works around this bug by never using SOffset.
An alternative workaround would be to do the clamping manually when SOffset
is too large, but generating the required code sequence during instruction
selection would be rather involved, and in any case the resulting code would
probably be worse.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96360
Reviewers: arsenm, tstellarAMD
Subscribers: arsenm, llvm-commits, kzhuravl
Differential Revision: http://reviews.llvm.org/D21326
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272761
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 15 Jun 2016 06:53:59 +0000 (06:53 +0000)]
Fix unused variable warning; NFC
TailCallReturnAddrDelta is used only in an assert, so put it under
defined(NDEBUG).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272760
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 15 Jun 2016 06:53:55 +0000 (06:53 +0000)]
[SCEV] Use dyn_cast<T> instead of dyn_cast<const T>; NFC
The const is unnecessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272759
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 15 Jun 2016 06:53:51 +0000 (06:53 +0000)]
[SCEV] Use cast<> instead of dyn_cast; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272758
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 15 Jun 2016 06:18:01 +0000 (06:18 +0000)]
[PM] Port AlignmentFromAssumptions to the new PM.
This uses the "runImpl" pattern to share code between the old and new PM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272757
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 15 Jun 2016 05:35:14 +0000 (05:35 +0000)]
Don't force SP-relative addressing for statepoints
Summary:
... when the offset is not statically known.
Prioritize addresses relative to the stack pointer in the stackmap, but
fallback gracefully to other modes of addressing if the offset to the
stack pointer is not a known constant.
Patch by Oscar Blumberg!
Reviewers: sanjoy
Subscribers: llvm-commits, majnemer, rnk, sanjoy, thanm
Differential Revision: http://reviews.llvm.org/D21259
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272756
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Wed, 15 Jun 2016 05:14:29 +0000 (05:14 +0000)]
Add support for callsite in the new C API for attributes
Summary: The second consumer of attributes.
Reviewers: Wallbraker, whitequark, echristo, rafael, jyknight
Subscribers: mehdi_amini
Differential Revision: http://reviews.llvm.org/D21266
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272754
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 15 Jun 2016 04:37:50 +0000 (04:37 +0000)]
[SCEV] clang-format some sections
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272753
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 15 Jun 2016 04:37:47 +0000 (04:37 +0000)]
[SCEV] Change the interface for SolveQuadraticEquation; NFC
Use Optional<T> to denote the absence of a solution, not
SCEVCouldNotCompute. This makes the usage of SolveQuadraticEquation
somewhat simpler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272752
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 15 Jun 2016 03:09:39 +0000 (03:09 +0000)]
AMDGPU/SI: Correctly encode constant expressions
Summary:
We we have an MCConstantExpr, we can encode it directly into the instruction
instead of emitting fixups.
Reviewers: artem.tamazov, vpykhtin, SamWot, nhaustov, arsenm
Subscribers: arsenm, llvm-commits, kzhuravl
Differential Revision: http://reviews.llvm.org/D21236
Change-Id: I88b3edf288d48e65c5d705fc4850d281f8e36948
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272750
91177308-0d34-0410-b5e6-
96231b3b80d8