9054 Commits

Author SHA1 Message Date
Matt Arsenault
76a17e03e0 AMDGPU: Implement isCheapAddrSpaceCast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288523 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 18:12:53 +00:00
Simon Pilgrim
88afddf69a [InstCombine] Add vector urem tests
Demonstrate missed opportunity for urem -> and combine for powerof2 or zero non-uniform constant dividers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288510 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 17:16:21 +00:00
Simon Pilgrim
d2c7981604 [InstCombine] Regenerate vector srem tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288509 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 17:12:56 +00:00
Renato Golin
66e793d0de Revert "[SLP] Fix for PR6246: vectorization for scalar ops on vector elements."
This reverts commit r288497, as it broke the AArch64 build of Compiler-RT's
builtins (twice: once in r288412 and once in r288497). We should investigate
this offline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288508 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 16:56:26 +00:00
Alexey Bataev
a985f0f28e [SLP] Fix for PR6246: vectorization for scalar ops on vector elements.
When trying to vectorize trees that start at insertelement instructions
function tryToVectorizeList() uses vectorization factor calculated as
MinVecRegSize/ScalarTypeSize. But sometimes it does not work as tree
cost for this fixed vectorization factor is too high.
Patch tries to improve the situation. It tries different vectorization
factors from max(PowerOf2Floor(NumberOfVectorizedValues),
MinVecRegSize/ScalarTypeSize) to MinVecRegSize/ScalarTypeSize and tries
to choose the best one.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288497 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 12:20:22 +00:00
Simon Pilgrim
f0760b2c4c [SLPVectorizer][X86] Add tests for vectorization of buildvector of scalar fp-ops (PR6246)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288492 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 10:54:46 +00:00
Artem Belevich
bc5dae7253 Revert "[SLP] Fix for PR6246: vectorization for scalar ops on vector elements."
This reverts r288412 which causes severe compile-time regression.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288431 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 22:52:15 +00:00
Philip Reames
ed7960709b [PR29121] Don't fold if it would produce atomic vector loads or stores
The instcombine code which folds loads and stores into their use types can trip up if the use is a bitcast to a type which we can't directly load or store in the IR. In principle, such types shouldn't exist, but in practice they do today. This is a workaround to avoid a bug while we work towards the long term goal.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288415 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 20:17:06 +00:00
Alexey Bataev
e126eb1e0d [SLP] Fix for PR6246: vectorization for scalar ops on vector elements.
When trying to vectorize trees that start at insertelement instructions
function tryToVectorizeList() uses vectorization factor calculated as
MinVecRegSize/ScalarTypeSize. But sometimes it does not work as tree
cost for this fixed vectorization factor is too high.
Patch tries to improve the situation. It tries different vectorization
factors from max(PowerOf2Floor(NumberOfVectorizedValues),
MinVecRegSize/ScalarTypeSize) to MinVecRegSize/ScalarTypeSize and tries
to choose the best one.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288412 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 20:06:53 +00:00
Alexey Bataev
171807f96b [SLP] Fixed cost model for horizontal reduction.
Currently when cost of scalar operations is evaluated the vector type is
used for scalar operations. Patch fixes this issue and fixes evaluation
of the vector operations cost.
Several test showed that vector cost model is too optimistic. It
allowed vectorization of 8 or less add/fadd operations, though scalar
code is faster. Actually, only for 16 or more operations vector code
provides better performance.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288398 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 18:42:42 +00:00
Adam Nemet
36dece4b3b [GVN, OptDiag] Print the interesting instructions involved in missed load-elimination
[recommitting after the fix in r288307]

This includes the intervening store and the load/store that we're trying
to forward from in the optimization remark for the missed load
elimination.

This is hooked up under a new mode in ORE that allows for compile-time
budget for a bit more analysis to print more insightful messages.  This
mode is currently enabled for -fsave-optimization-record (-Rpass is
trickier since it is controlled in the front-end).

With this we can now print the red remark in http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L446

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288381 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 17:34:50 +00:00
Adam Nemet
04e94f7838 [GVN, OptDiag] Include the value that is forwarded in load elimination
[recommitting after the fix in r288307]

This requires some changes to the opt-diag API.  Hal and I have
discussed this at the Dev Meeting and came up with a streaming delimiter
(setExtraArgs) to solve this.

Arguments after this delimiter are only included in the optimization
records and not in the remarks printed in the compiler output.  (Note,
how in the test the content of the YAML file changes but the remarks on
the compiler output don't.)

This implements the green GVN message with a bug fix at line
http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L446

The fix is that now we properly include the constant value in the
message: "load of type i32 eliminated in favor of 7"

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288380 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 17:34:44 +00:00
Alexey Bataev
c35da94c10 [SLP] Additional tests with the cost of vector operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288377 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 17:26:54 +00:00
Alexey Bataev
7d6a2cb700 Revert "[SLP] Additional tests with the cost of vector operations."
This reverts commit a61718435fc4118c82f8aa6133fd81f803789c1e.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288371 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 16:45:04 +00:00
Adam Nemet
d53651aca3 [GVN] Basic optimization remark support
[recommitting after the fix in r288307]

Follow-on patches will add more interesting cases.

The goal of this patch-set is to get the GVN messages printed in
opt-viewer from Dhrystone as was presented in my Dev Meeting talk.  This
is the optimization view for the function (the last remark in the
function has a bug which is fixed in this series):
http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L430

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288370 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 16:40:32 +00:00
Alexey Bataev
d9c0875e6d [SLP] Additional tests with the cost of vector operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288369 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 16:11:48 +00:00
Adam Nemet
01ad70a9f5 [GVN] When merging blocks update LoopInfo if it's available
If LoopInfo is available during GVN, BasicAA will use it.  However
MergeBlockIntoPredecessor does not update LI as it merges blocks.

This didn't use to cause problems because LI was freed before
GVN/BasicAA.  Now with OptimizationRemarkEmitter, the lifetime of LI is
extended so LI needs to be kept up-to-date during GVN.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288307 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 03:56:43 +00:00
Michael Kuperstein
39c1e3d2d7 [LoopUnroll] Implement profile-based loop peeling
This implements PGO-driven loop peeling.

The basic idea is that when the average dynamic trip-count of a loop is known,
based on PGO, to be low, we can expect a performance win by peeling off the
first several iterations of that loop.
Unlike unrolling based on a known trip count, or a trip count multiple, this
doesn't save us the conditional check and branch on each iteration. However,
it does allow us to simplify the straight-line code we get (constant-folding,
etc.). This is important given that we know that we will usually only hit this
code, and not the actual loop.

This is currently disabled by default.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288274 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 21:13:57 +00:00
Sanjay Patel
b34fe0f02f [InstCombine] allow more narrowing transforms for logic ops
We had a limited version of this for scalar 'and'; this expands
the transform to 'or' and 'xor' and allows vectors types too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288273 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 20:48:54 +00:00
Sanjay Patel
ba32f788d8 [InstCombine] add tests to show potentially missed logic+trunc transforms; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288270 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 20:20:49 +00:00
Sanjay Patel
785e64db06 [InstCombine] update test to use FileCheck and auto-generate checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288261 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 18:49:56 +00:00
Sanjay Patel
5ed39f2608 [InstCombine] auto-generate checks for select+bitwise logic tests; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288254 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 17:07:21 +00:00
Adam Nemet
d52ad61e79 Revert "[GVN] Basic optimization remark support"
This reverts commit r288210.

The failure on the stage2 LTO build is back.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288226 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 01:14:35 +00:00
Adam Nemet
ae45a93f50 [GVN] Basic optimization remark support
[recommiting patches one-by-one to see which breaks the stage2 LTO bot]

Follow-on patches will add more interesting cases.

The goal of this patch-set is to get the GVN messages printed in
opt-viewer from Dhrystone as was presented in my Dev Meeting talk.  This
is the optimization view for the function (the last remark in the
function has a bug which is fixed in this series):
http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L430

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288210 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 22:37:01 +00:00
Justin Lebar
649bcb99b4 [StructurizeCFG] Fix infinite loop in rebuildSSA.
Michel Dänzer reported that r288051, "[StructurizeCFG] Use range-based
for loops", introduced a bug into rebuildSSA, wherein we were iterating
over an instruction's use list while modifying it, without taking care
to do this correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288200 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 21:49:02 +00:00
Adam Nemet
f618d6ef67 Revert "[GVN] Basic optimization remark support"
This reverts commit r288046.

Trying to see if the revert fixes a compiler crash during a stage2 LTO
build with a GVN backtrace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288179 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 18:32:04 +00:00
Adam Nemet
5d693faf41 Revert "[GVN, OptDiag] Include the value that is forwarded in load elimination"
This reverts commit r288047.

Trying to see if the revert fixes a compiler crash during a stage2 LTO
build with a GVN backtrace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288178 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 18:32:00 +00:00
Adam Nemet
996fdfddd0 Revert "[GVN, OptDiag] Print the interesting instructions involved in missed load-elimination"
This reverts commit r288090.

Trying to see if the revert fixes a compiler crash during a stage2 LTO
build with a GVN backtrace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288177 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 18:31:53 +00:00
Artur Pilipenko
9d387d6693 [CVP] Remove use of removed flag (-cvp-dont-process-adds) from the test
The flag was removed by 288154

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288161 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 16:43:30 +00:00
Alexey Bataev
e58c265916 [SLP] Add a new test for tree vectorization starting from insertelement
instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288148 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 15:37:52 +00:00
Alexey Bataev
62c10d6781 [SLPVectorizer] Improved support of partial tree vectorization.
Currently SLP vectorizer tries to vectorize a binary operation and dies
immediately after unsuccessful the first unsuccessfull attempt. Patch
tries to improve the situation, trying to vectorize all binary
operations of all children nodes in the binop tree.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288115 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 08:21:14 +00:00
Adam Nemet
825a8f8ef4 [GVN, OptDiag] Print the interesting instructions involved in missed load-elimination
This includes the intervening store and the load/store that we're trying
to forward from in the optimization remark for the missed load
elimination.

This is hooked up under a new mode in ORE that allows for compile-time
budget for a bit more analysis to print more insightful messages.  This
mode is currently enabled for -fsave-optimization-record (-Rpass is
trickier since it is controlled in the front-end).

With this we can now print the red remark in http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L446

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288090 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 00:09:22 +00:00
Eli Friedman
56089e7485 [SROA] Drop lifetime.start/end intrinsics when they block promotion.
Preserving lifetime markers isn't as important as allowing promotion,
so just drop the lifetime markers if necessary.

This also fixes an assertion failure where other parts of SROA assumed
that lifetime markers never block promotion.

Fixes https://llvm.org/bugs/show_bug.cgi?id=29139.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288074 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 21:50:34 +00:00
Joerg Sonnenberger
46cc79217b Revert r287553: [CodeGenPrep] Skip merging empty case blocks
It results in assertions in lib/Analysis/BlockFrequencyInfoImpl.cpp line
670 ("Expected irreducible CFG").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288052 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 18:56:54 +00:00
Adam Nemet
01ad79ba9f [GVN, OptDiag] Include the value that is forwarded in load elimination
This requires some changes to the opt-diag API.  Hal and I have
discussed this at the Dev Meeting and came up with a streaming delimiter
(setExtraArgs) to solve this.

Arguments after this delimiter are only included in the optimization
records and not in the remarks printed in the compiler output.  (Note,
how in the test the content of the YAML file changes but the remarks on
the compiler output don't.)

This implements the green GVN message with a bug fix at line
http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L446

The fix is that now we properly include the constant value in the
message: "load of type i32 eliminated in favor of 7"

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288047 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 17:45:34 +00:00
Adam Nemet
e9741d25e4 [GVN] Basic optimization remark support
Follow-on patches will add more interesting cases.

The goal of this patch-set is to get the GVN messages printed in
opt-viewer from Dhrystone as was presented in my Dev Meeting talk.  This
is the optimization view for the function (the last remark in the
function has a bug which is fixed in this series):
http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L430

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288046 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 17:45:28 +00:00
James Molloy
325cb7089c [InlineCost] Reduce inline thresholds to compensate for cost changes
In r286814, the algorithm for calculating inline costs changed. This
caused more inlining to take place which is especially apparent
in optsize and minsize modes.

As the cost calculation removed a skewed behaviour (we were inconsistent
about the cost of calls) it isn't possible to update the thresholds to
get exactly the same behaviour as before. However, this threshold change
accounts for the very common case where an inline candidate has no
calls within it. In this case, r286814 would inline around 5-6 more (IR)
instructions.

The changes to -Oz have been heavily benchmarked. The "obvious" value
for the inline threshold at -Oz is zero, but due to inaccuracies in the
inline heuristics this can actually cause code size increases due to
not inlining key thunk functions (that then disappear). Experimentally,
5 was the sweet spot for code size over the test-suite.

For -Os, this change removes the outlier results shown up by green dragon
(http://104.154.54.203/db_default/v4/nts/13248).

Fixes D26848.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288024 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 11:07:37 +00:00
Mohammad Shahid
20f5de8cb0 [SLP] Add new and update existing lit testfor providing more context to incoming patch for vectorization of jumbled load
Change-Id: Ifb9091bb0f84c1937c2c8bd2fc345734f250d2f9

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287992 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-27 03:35:31 +00:00
Sanjay Patel
52894d83e1 [InstCombine] add test to show missing vector optimization; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287982 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-26 16:13:23 +00:00
Sanjay Patel
adc3b91add [InstCombine] don't drop metadata in FoldOpIntoSelect()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287980 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-26 15:23:20 +00:00
Sanjay Patel
f5c0d7f193 [SimplifyCFG] auto-generate better checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287954 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-25 21:12:39 +00:00
Sanjay Patel
0ff16e15b4 [SimplifyCFG] auto-generate better checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287953 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-25 21:07:13 +00:00
Abhilash Bhandari
a14bdf2ab4 [Loop Unswitch] Patch to selective unswitch only the reachable branch instructions.
Summary:
The iterative algorithm for Loop Unswitching may render some of the branches unreachable in the unswitched loops.
Given the exponential nature of the algorithm, this is quite an overhead.
This patch fixes this problem by selectively unswitching only those branches within a loop that are reachable from the loop header.

Reviewers: Michael Zolothukin, Anna Thomas, Weiming Zhao.
Subscribers: llvm-commits.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287925 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-25 14:07:44 +00:00
Simon Pilgrim
5d31f856ab [X86][AVX512] Add support for v2i64 fptosi/fptoui/sitofp/uitofp on AVX512DQ-only targets
Use 512-bit instructions with subvector insertion/extraction like we do in a number of similar circumstances

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287882 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 14:46:55 +00:00
Alexey Bataev
82fd34805f [SLP] Add more tests for SLP Vectorizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287801 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 20:10:32 +00:00
Alina Sbirlea
106bcf1838 [LoadStoreVectorizer] Enable vectorization of stores in the presence of an aliasing load
Summary:
The "getVectorizablePrefix" method would give up if it found an aliasing load for a store chain.
In practice, the aliasing load can be treated as a memory barrier and all stores that precede it
are a valid vectorizable prefix.
Issue found by volkan in D26962. Testcase is a pruned version of the one in the original patch.

Reviewers: jlebar, arsenm, tstellarAMD

Subscribers: mzolotukhin, wdng, nhaehnle, anna, volkan, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287781 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 17:43:15 +00:00
Simon Pilgrim
e547b01b86 [X86][AVX512] Add support for v4i64 fptosi/fptoui/sitofp/uitofp on AVX512DQ-only targets
Use 512-bit instructions with subvector insertion/extraction like we do in a number of similar circumstances

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287762 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 14:01:18 +00:00
Simon Pilgrim
df7181d34e [CostModel][X86] Add missing AVX512DQ v8i64 fptosi/sitofp costs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287760 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 13:42:09 +00:00
Davide Italiano
329c83f959 [SCCP] Add a test for switches on undef.
Without this test, you can just remove the code fixing the
switch to the first constant in ResolvedUndefs in and everything
pass. This test, instead, fails with an assertion if the code
is removed. Found while refactoring SCCP to integrate undef in
the solver.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287731 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 01:42:39 +00:00
Dehao Chen
ded77cc923 Before sample pgo annotation, do not inline a function that has no debug info. (NFC)
If there is no debug info in the callee, inlining it will not help annotator. This avoids infinite loop as reported in PR/31119.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287710 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-22 22:50:01 +00:00