Commit Graph

124248 Commits

Author SHA1 Message Date
Sanjay Patel
0b4392ac91 use ternary ops; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253787 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 16:51:19 +00:00
Sanjay Patel
56739f0051 remove unnecessary temp variables; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253786 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 16:37:09 +00:00
Sanjay Patel
8c4c988c9e fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253785 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 16:16:29 +00:00
Sanjay Patel
549121305a move a single test case to where most other instcombine shuffle bug test cases exist
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253784 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 16:12:58 +00:00
Simon Pilgrim
9ef65a89c3 [X86][SSE] Added SSE2 PSUBUS tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253783 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 13:57:22 +00:00
Simon Pilgrim
9ad4673878 [X86][SSE] Regenerate TRUNC-SEXT tests
Tidied up triple and regenerate tests using update_llc_test_checks.py

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253782 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 13:32:29 +00:00
Simon Pilgrim
efd23fe50c [X86][SSE] Regenerate MINMAX tests
Tidied up triple and regenerate tests using update_llc_test_checks.py

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253781 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 13:29:42 +00:00
Simon Pilgrim
096191ff6a [X86][SSE] Regenerate PSUBUS tests
Tidied up triple and regenerate tests using update_llc_test_checks.py

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253780 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 13:25:50 +00:00
Jonas Paulsson
546611e398 [DAGCombiner] Bugfix for lost chain depenedency.
When MergeConsecutiveStores() combines two loads and two stores into
wider loads and stores, the chain users of both of the original loads
must be transfered to the new load, because it may be that a chain
user only depends on one of the loads.

New test case: test/CodeGen/SystemZ/dag-combine-01.ll

Reviewed by James Y Knight.

Bugzilla: https://llvm.org/bugs/show_bug.cgi?id=25310#c6

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253779 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 13:25:07 +00:00
Simon Pilgrim
26398a7d87 [X86][AVX] Regenerate AVX splat tests
Tidied up triple and regenerate tests using update_llc_test_checks.py

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253778 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 13:23:14 +00:00
Simon Pilgrim
182b10a3d4 [X86][AVX512] Added AVX512 VMOVLHPS/VMOVHLPS shuffle decode comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253777 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 13:04:42 +00:00
Simon Pilgrim
1f6252f0b2 [X86][SSE] Legal XMM Register Class ordering for SSE1
It turns out we have a number of places that just grab the first type attached to a register class for various reasons. This is fine unless for some reason that type isn't legal on the current target, such as for SSE1 which doesn't support v16i8/v8i16/v4i32/v2i64 - all of which were included before 4f32 in the class.

Given that this is such a rare situation I've just re-ordered the types and placed the float types first.

Fix for PR16133

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253773 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 12:38:34 +00:00
Sanjoy Das
0977d4d4df [docs] Minor fixes to the operand bundle section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253771 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 09:12:07 +00:00
Yaron Keren
0358673908 Unbreak build on OpenBSD by not adding -Wl,-z,defs to linker flags.
This is similar to the fix for FreeBSD in r226862. Without this patch,
the build aborts when linkling libLTO.so, complaining about undefined
references to assert2, cxa_atexit, etc.

Patch by Stefan Kempf!

http://reviews.llvm.org/D14236



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253769 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 06:33:54 +00:00
Weiming Zhao
0bf5b5cfb8 [SimplifyLibCalls] Removed some TODOs which are already implemented. NFC.
Summary:
D14302 implements tan(atan(x)) -> x
D14045 implements pow(exp(x), y) -> exp(x*y)

Patch by Mandeep Singh Grang <mgrang@codeaurora.org>

Reviewers: majnemer, davide

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253768 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 06:10:20 +00:00
Davide Italiano
82d936682d [llvm-rtdyld] Fail early if we can't load dynamic libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253767 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 05:58:19 +00:00
Davide Italiano
9fed20c129 [llvm-rtdyld] Turn assertion into errors, it seems more appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253766 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 05:49:07 +00:00
Davide Italiano
87daa918a1 [llvm-rtdyld] Improve error handling, use Error().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253765 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 05:44:41 +00:00
Teresa Johnson
798892661c Move new assert to correct location
This assert was meant to execute at the end of parseMetadata, but
we return early and never reach the end of the function. Caught
by a compile-time warning since the function doesn't return a value
from that location.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253762 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 03:51:23 +00:00
Kostya Serebryany
45ac8bc6fc [libFuzzer] don't crash when reporting a leak in test_single_input mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253761 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 03:46:43 +00:00
Davide Italiano
ea83f226ac [llvm-rtdyld] Use report_fatal_error().
This is a first step towards saner/uniform error reporting in llvm-rtdyld.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253759 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 02:15:51 +00:00
Matthias Braun
ffed66f6ea ARMLoadStoreOptimizer: Cleanup isMemoryOp(); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253757 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 02:09:49 +00:00
Teresa Johnson
9f474a019f llvm-link option and test for recent metadata mapping bug
Summary:
Add a -preserve-modules option to llvm-link that simulates LTO
clients that don't destroy modules as they are linked. This enables
reproduction of a recent bug introduced by a metadata linking change
that was only caught when the modules weren't destroyed before
writing bitcode (LTO on Windows).

See http://llvm.org/viewvc/llvm-project?view=revision&revision=253170
for more details on the original bug and the fix.

Confirmed the new test added here reproduces the failure using the new
option when I suppress the fix.

Reviewers: pcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253740 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 00:35:38 +00:00
Vinicius Tinti
eb9a1dc069 Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253737 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 23:20:12 +00:00
Davide Italiano
c25aec1117 [llvm-rtdyld] Message() is used only once. Inline. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253736 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 23:12:15 +00:00
Rong Xu
ba29cc35f8 Add some constantness to GetSuccessorNumber().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253733 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 23:02:06 +00:00
NAKAMURA Takumi
2bdcd86819 Move free-zext.ll to llvm/test/Transforms/CodeGenPrepare/AArch64/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253730 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 22:55:34 +00:00
Eric Christopher
3b206a4729 Power8 and later support fusing addis/addi and addis/ld instruction
pairs that use the same register to execute as a single instruction.
No Functional Change

Patch by Kyle Butt!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253724 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 22:38:20 +00:00
Owen Anderson
108258ac78 Fix another infinite loop in Reassociate caused by Constant::isZero().
Not all zero vectors are ConstantDataVector's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253723 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 22:34:48 +00:00
Geoff Berry
2d2aadfa70 [CodeGenPrepare] Create more extloads and fewer ands
Summary:
Add and instructions immediately after loads that only have their low
bits used, assuming that the (and (load x) c) will be matched as a
extload and the ands/truncs fed by the extload will be removed by isel.

Reviewers: mcrosier, qcolombet, ab

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253722 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 22:34:39 +00:00
Chris Bieneman
d43d18c48b [CMake] Fix handling of passing through semi-colon separated lists.
When passing around CMake arguments as lists of arguments any arguments containing lists need to have their semi-colons escaped otherwise CMake will split the arguments in the middle.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253719 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 22:08:49 +00:00
Arnaud A. de Grandmaison
8ba4bf96a9 [ShrinkWrap] Teach ShrinkWrap to handle targets requiring a register scavenger.
The included test only checks for a compiler crash for now. Several people are
facing this issue, so we first resolve the crash, and will increase shrinkwrap's
coverage later in a follow-up patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253718 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 21:54:27 +00:00
Diego Novillo
15d2198650 SamplePGO - Tweak RUN command for a test. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253717 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 21:46:41 +00:00
Diego Novillo
ddec40be2c SamplePGO - Do not count never-executed inlined functions when computing coverage.
If a function was originally inlined but not actually hot at runtime,
its samples will not be counted inside the parent function. This throws
off the coverage calculation because it expects to find more used
records than it should.

Fixed by ignoring functions that will not be inlined into the parent.
Currently, this is inlined functions with 0 samples.  In subsequent
patches, I'll change this to mean "cold" functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253716 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 21:46:38 +00:00
Jun Bum Lim
c8ef580c58 [AArch64]Merge narrow zero stores to a wider store
This change merges adjacent zero stores into a wider single store.
For example :
  strh wzr, [x0]
  strh wzr, [x0, #2]
becomes
  str wzr, [x0]

This will fix PR25410.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253711 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 21:14:07 +00:00
Eric Christopher
3de08c62a1 Weak non-function symbols were being accessed directly, which is
incorrect, as the chosen representative of the weak symbol may not live
with the code in question. Always indirect the access through the TOC
instead.

Patch by Kyle Butt!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253708 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 20:51:31 +00:00
Krzysztof Parzyszek
177d040724 [Hexagon] Fix the return value from HexagonGenInsert::runOnMachineFunction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253705 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 20:46:23 +00:00
Bill Seurer
89c83dc08b Fix test case label check
Several (but not all) of the labels that are checked for in this test case
are checked as strings instead of labels.  This can cause an apparent test
case failure if they are tested in an appropriately named directory.

For example, one of them that fails:

define zeroext i32 @test2(i32 %A.u, i32 %B.u)  {
; A8: test2
; A8: uxtab  r0, r0, r1


Output that causes it to fail:

. . .
	.file	"/home/seurer/llvm/llvm-test2/test/CodeGen/Thumb2/thumb2-uxt_rot.ll"
. . .
	.globl	test2
	.align	1
	.type	test2,%function
	.code	16                      @ @test2
	.thumb_func
test2:
	.fnstart


The "A8: test2" matches on the directory name instead of the label.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253702 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 20:24:49 +00:00
Reid Kleckner
368c7cb1bd Fix the Windows build, include <tuple> for std::tie
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253698 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 19:29:40 +00:00
Tilmann Scheller
73a482f4cc Revert "[FunctionAttrs] Remove redundant assignment."
This reverts r253661.

Turns out that the assignment is not redundant (despite the Clang static analyzer claiming the opposite).

The variable is being used by the lambda function AddUsersToWorklistIfCapturing().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253696 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 19:17:10 +00:00
Nathan Slingerland
e0a7f28fc6 [llvm-profdata] Add merge() to InstrProfRecord
Summary:
This change refactors two aspects of InstrProfRecord:

1) Add a merge() method to InstrProfRecord (previously InstrProfWriter combineInstrProfRecords()) in order to better encapsulate this functionality and to make the InstrProfRecord and SampleRecord APIs more consistent.

2) Make InstrProfRecord mergeValueProfData() a private method since it is only ever called internally by merge().

Reviewers: dnovillo, bogner, davidxl

Subscribers: silvas, vsk, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253695 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 19:12:43 +00:00
Artyom Skrobov
c9180bfb44 Avoid duplicate entry for cortex-a7 in the TargetParser (NFC)
Reviewers: t.p.northover, rengolin

Subscribers: aemerson, rengolin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253676 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 16:46:14 +00:00
Artyom Skrobov
7cbf72b489 Handle ARMv6-J as an alias, instead of fake architecture
Summary:
This follows D14577 to treat ARMv6-J as an alias for ARMv6,
instead of an architecture in its own right.

The functional change is that the default CPU when targeting ARMv6-J
changes from arm1136j-s to arm1136jf-s, which is currently used as
the default CPU for ARMv6; both are, in fact, ARMv6-J CPUs.

The J-bit (Jazelle support) is irrelevant to LLVM, and it doesn't
affect code generation, attributes, optimizations, or anything else,
apart from selecting the default CPU.

Reviewers: rengolin, logan, compnerd

Subscribers: aemerson, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253675 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 16:46:09 +00:00
Diego Novillo
c6b24c2806 SamplePGO - Add line offset and discriminator information to sample reports.
While debugging some sampling coverage problems, I found this useful:
When applying samples from a profile, it helps to also know what line
offset and discriminator the sample belongs to. This makes it easy to
correlate against the input profile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253670 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 15:39:42 +00:00
Teresa Johnson
086ed798ff [ThinLTO] Add MODULE_CODE_METADATA_VALUES record
Summary:
This is split out from the ThinLTO metadata mapping patch
http://reviews.llvm.org/D14752.

To avoid needing to parse the module level metadata during function
importing, a new module-level record is added which holds the
number of module-level metadata values. This is required because
metadata value ids are assigned implicitly during parsing, and the
function-level metadata ids start after the module-level metadata ids.

I made a change to this version of the code compared to D14752
in order to add more consistent and thorough assertion checking of the
new record value. We now unconditionally use the record value to
initialize the MDValueList size, and handle it the same in parseMetadata
for all module level metadata cases (lazy loading or not).

Reviewers: dexonsmith, joker.eph

Subscribers: davidxl, llvm-commits, joker.eph

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253668 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 14:51:27 +00:00
Tilmann Scheller
72bf3d33aa [Hexagon] Remove redundant assignment.
Identified by the Clang static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253664 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 13:27:30 +00:00
Daniel Sanders
d498a1b6d1 Partially revert r253662: some unrelated work was accidentally committed with it.
Sorry.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253663 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 13:16:35 +00:00
Daniel Sanders
0bee4edf8c Revert the revert 253497 and 253539 - These commits aren't the cause of the clang-cmake-mips failures.
Sorry for the noise.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253662 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 13:13:53 +00:00
Tilmann Scheller
e4b48cdafb [FunctionAttrs] Remove redundant assignment.
Identified by the Clang static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253661 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 12:51:58 +00:00
Tilmann Scheller
cf042f85d3 [Hexagon] Remove redundant local variable.
Identified by the Clang static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253660 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 12:10:17 +00:00