OSDN Git Service
NAKAMURA Takumi [Wed, 11 Jan 2017 01:06:57 +0000 (01:06 +0000)]
tools/llvm-xray: Avoid std::errc::protocol_* to appease mingw, like r285261.
They are oriented from winsock and mingw doesn't import them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291636
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 11 Jan 2017 00:57:54 +0000 (00:57 +0000)]
InstSimplify: Refactor function to use more switches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291634
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 11 Jan 2017 00:56:53 +0000 (00:56 +0000)]
Remove unused field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291633
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 11 Jan 2017 00:49:54 +0000 (00:49 +0000)]
[X86] Dont run combineSetCCAtomicArith() when the cmp has multiple uses
We would miscompile the following:
void g(int);
int f(volatile long long *p) {
bool b = __atomic_fetch_add(p, 1, __ATOMIC_SEQ_CST) < 0;
g(b ? 12 : 34);
return b ? 56 : 78;
}
into
pushq %rax
lock incq (%rdi)
movl $12, %eax
movl $34, %edi
cmovlel %eax, %edi
callq g(int)
testq %rax, %rax <---- Bad.
movl $56, %ecx
movl $78, %eax
cmovsl %ecx, %eax
popq %rcx
retq
because the code failed to take into account that the cmp has multiple
uses, replaced one of them, and left the other one comparing garbage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291630
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Wed, 11 Jan 2017 00:48:41 +0000 (00:48 +0000)]
[RegBankSelect] Improve the output of the debug messages.
Add more information about mapping cost and chosen solution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291629
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 11 Jan 2017 00:35:43 +0000 (00:35 +0000)]
[CodeView/PDB] Rename a bunch of files.
We were starting to get some name clashes between llvm-pdbdump
and the common CodeView framework, so I took this opportunity
to rename a bunch of files to more accurately describe their
usage. This also helps in llvm-pdbdump to distinguish
between different files and whether they are used for pretty
dump mode or raw dump mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291627
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 11 Jan 2017 00:35:08 +0000 (00:35 +0000)]
[CodeView] Add TypeDatabase class.
This creates a centralized class in which to store type records.
It stores types as an array of entries, which matches the
notion of a type stream being a topologically sorted DAG.
Logic to build up such a database was already being used in
CVTypeDumper, so CVTypeDumper is now updated to to read from
a TypeDatabase which is filled out by an earlier visitor in
the pipeline.
Differential Revision: https://reviews.llvm.org/D28486
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291626
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 11 Jan 2017 00:34:41 +0000 (00:34 +0000)]
Add better documentation for iterator facade subclasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291625
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 11 Jan 2017 00:33:24 +0000 (00:33 +0000)]
InstSimplify: Eliminate fabs on known positive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291624
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 11 Jan 2017 00:16:03 +0000 (00:16 +0000)]
[gmock] Teach gmock ElementsAre and BeginEndDistanceIs matchers to
handle generic ranges by using std::begin and std::end rather than
requiring things to look exactly like an STL container.
Much of the credit for this goes to Dave Blaikie who helped me figure
out the right incantations.
This will probably be re-designed when I send this to the maintainers of
gmock, so I've instead structured it to change is little as possible
while it is a local patch. That makes it somewhat ugly, but I think a focused
change is better for getting this to work for LLVM today and letting the
upstream maintainers figure out the correct long-term pattern.
Differential Revision: https://reviews.llvm.org/D28288
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291623
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Vesely [Wed, 11 Jan 2017 00:12:39 +0000 (00:12 +0000)]
AMDGPU/EG,CM: Add fp16 conversion instructions
Differential Revision: https://reviews.llvm.org/D28164
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291622
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Tue, 10 Jan 2017 23:54:31 +0000 (23:54 +0000)]
Revert "[PGO] Turn off comdat renaming in IR PGO by default"
This patch reverts r291588: [PGO] Turn off comdat renaming in IR PGO by default,
as we are seeing some hash mismatches in our internal tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291621
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 10 Jan 2017 23:49:07 +0000 (23:49 +0000)]
[InstCombine] add a wrapper for a common pair of transforms; NFCI
Some of the callers are artificially limiting this transform to integer types;
this should make it easier to incrementally remove that restriction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291620
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Tue, 10 Jan 2017 23:43:35 +0000 (23:43 +0000)]
[loop-unroll] Properly populate LoopInfo for loops cloned in LoopUnrollRuntime.
Summary:
This fixes Transforms/LoopUnroll/runtime-loop3.ll which failed with
EXTENSIVE_DEBUG, because the cloned basic blocks were not added to the
correct sub-loops in LoopUnrollRuntime.cpp.
Reviewers: dexonsmith, mzolotukhin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28482
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291619
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Tue, 10 Jan 2017 23:43:04 +0000 (23:43 +0000)]
[TM] Restore default TargetOptions in TargetMachine::resetTargetOptions.
Summary:
Previously if you had
* a function with the fast-math-enabled attr, followed by
* a function without the fast-math attr,
the second function would inherit the first function's fast-math-ness.
This means that mixing fast-math and non-fast-math functions in a module
was completely broken unless you explicitly annotated every
non-fast-math function with "unsafe-fp-math"="false". This appears to
have been broken since r176986 (March 2013), when the resetTargetOptions
function was introduced.
This patch tests the correct behavior as best we can. I don't think I
can test FPDenormalMode and NoTrappingFPMath, because they aren't used
in any backends during function lowering. Surprisingly, I also can't
find any uses at all of LessPreciseFPMAD affecting generated code.
The NVPTX/fast-math.ll test changes are an expected result of fixing
this bug. When FMA is disabled, we emit add as "add.rn.f32", which
prevents fma combining. Before this patch, fast-math was enabled in all
functions following the one which explicitly enabled it on itself, so we
were emitting plain "add.f32" where we should have generated
"add.rn.f32".
Reviewers: mkuper
Subscribers: hfinkel, majnemer, jholewinski, nemanjai, llvm-commits
Differential Revision: https://reviews.llvm.org/D28507
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291618
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Tue, 10 Jan 2017 23:42:46 +0000 (23:42 +0000)]
[NVPTX] Add CHECK-LABEL where appropriate to fast-math.ll test.
Also fix up whitespace.
Test-only change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291617
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Tue, 10 Jan 2017 23:42:21 +0000 (23:42 +0000)]
[AArch64] Consider all vector types for FeatureSlowMisaligned128Store
The original code considered only v2i64 as slow for this feature. This patch
consider all 128-bit long vector types as slow candidates.
In internal tests, extending this feature to all 128-bit vector types
resulted in an overall improvement of 1% on Exynos M1.
Differential revision: https://reviews.llvm.org/D27998
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291616
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 10 Jan 2017 23:32:04 +0000 (23:32 +0000)]
AMDGPU: Constant fold when immediate is materialized
In future commits these patterns will appear after moveToVALU changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291615
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Tue, 10 Jan 2017 23:24:54 +0000 (23:24 +0000)]
[loop-unroll] Factor out code to update LoopInfo (NFC).
Move the code to update LoopInfo for cloned basic blocks to
addClonedBlockToLoopInfo, as suggested in
https://reviews.llvm.org/D28482.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291614
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 10 Jan 2017 23:23:58 +0000 (23:23 +0000)]
Move the section name from GlobalObject to the LLVMContext
Summary:
Convention wisdom says that bytes in Function are precious, and the
vast, vast majority of globals do not live in special sections. Even
when they do, they tend to live in the same section. Store the section
name on the LLVMContext in a StringSet, and maintain a map from
GlobalObject* to section name like we do for metadata, prefix data, etc.
The fact that we've survived this long wasting at least three pointers
of space in Function suggests that Function bytes are perhaps not as
precious as we once thought. Given that most functions have metadata
attachments when debug info is enabled, we might consider adding a
pointer here to make that access more efficient.
Reviewers: jlebar, dexonsmith, mehdi_amini
Subscribers: mehdi_amini, aprantl, llvm-commits
Differential Revision: https://reviews.llvm.org/D28150
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291613
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 10 Jan 2017 23:17:52 +0000 (23:17 +0000)]
InstCombine: Set operands instead of creating new call
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291612
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 10 Jan 2017 23:08:54 +0000 (23:08 +0000)]
InstCombine: fdiv -x, -y -> fdiv x, y
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291611
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Tue, 10 Jan 2017 23:04:30 +0000 (23:04 +0000)]
CodeGen: Allow small copyable blocks to "break" the CFG.
When choosing the best successor for a block, ordinarily we would have preferred
a block that preserves the CFG unless there is a strong probability the other
direction. For small blocks that can be duplicated we now skip that requirement
as well.
Differential revision: https://reviews.llvm.org/D27742
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291609
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 10 Jan 2017 22:38:02 +0000 (22:38 +0000)]
Remove unused CONVERT_RNDSAT intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291607
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 10 Jan 2017 22:32:26 +0000 (22:32 +0000)]
Add the 'googlemock' component of Google Test to LLVM's unittest libraries.
I have two immediate motivations for adding this:
1) It makes writing expectations in tests *dramatically* easier. A
quick example that is a taste of what is possible:
std::vector<int> v = ...;
EXPECT_THAT(v, UnorderedElementsAre(1, 2, 3));
This checks that v contains '1', '2', and '3' in some order. There
are a wealth of other helpful matchers like this. They tend to be
highly generic and STL-friendly so they will in almost all cases work
out of the box even on custom LLVM data structures.
I actually find the matcher syntax substantially easier to read even
for simple assertions:
EXPECT_THAT(a, Eq(b));
EXPECT_THAT(b, Ne(c));
Both of these make it clear what is being *tested* and what is being
*expected*. With `EXPECT_EQ` this is implicit (the LHS is expected,
the RHS is tested) and often confusing. With `EXPECT_NE` it is just
not clear. Even the failure error messages are superior with the
matcher based expectations.
2) When testing any kind of generic code, you are continually defining
dummy types with interfaces and then trying to check that the
interfaces are manipulated in a particular way. This is actually what
mocks are *good* for -- testing *interface interactions*. With
generic code, there is often no "fake" or other object that can be
used.
For a concrete example of where this is currently causing significant
pain, look at the pass manager unittests which are riddled with
counters incremented when methods are called. All of these could be
replaced with mocks. The result would be more effective at testing
the code by having tighter constraints. It would be substantially
more readable and maintainable when updating the code. And the error
messages on failure would have substantially more information as
mocks automatically record stack traces and other information *when
the API is misused* instead of trying to diagnose it after the fact.
I expect that #1 will be the overwhelming majority of the uses of gmock,
but I think that is sufficient to justify having it. I would actually
like to update the coding standards to encourage the use of matchers
rather than any other form of `EXPECT_...` macros as they are IMO
a strict superset in terms of functionality and readability.
I think that #2 is relatively rarely useful, but there *are* cases where
it is useful. Historically, I think misuse of actual mocking as
described in #2 has led to resistance towards this framework. I am
actually sympathetic to this -- mocking can easily be overused. However
I think this is not a significant concern in LLVM. First and foremost,
LLVM has very careful and rare exposure of abstract interfaces or
dependency injection, which are the most prone to abuse with mocks. So
there are few opportunities to abuse them. Second, a large fraction of
LLVM's unittests are testing *generic code* where mocks actually make
tremendous sense. And gmock is well suited to building interfaces that
exercise generic libraries. Finally, I still think we should be willing
to have testing utilities in tree even if they should be used rarely. We
can use code review to help guide the usage here.
For a longer and more complete discussion of this, see the llvm-dev
thread here:
http://lists.llvm.org/pipermail/llvm-dev/2017-January/108672.html
The general consensus seems that this is a reasonable direction to start
down, but that doesn't mean we should race ahead and use this
everywhere. I have one test that is blocked on this to land and that was
specifically used as an example. Before widespread adoption, I'm going
to work up some (brief) guidelines as some of these facilities should be
used sparingly and carefully.
Differential Revision: https://reviews.llvm.org/D28156
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291606
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Yung [Tue, 10 Jan 2017 22:10:22 +0000 (22:10 +0000)]
Make the test accept different OpCode values since it doesn't really care about the value.
Differential Revision: https://reviews.llvm.org/D28487
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291605
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 10 Jan 2017 22:02:30 +0000 (22:02 +0000)]
DAG: Avoid OOB when legalizing vector indexing
If a vector index is out of bounds, the result is supposed to be
undefined but is not undefined behavior. Change the legalization
for indexing the vector on the stack so that an out of bounds
index does not create an out of bounds memory access.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291604
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Tue, 10 Jan 2017 21:59:53 +0000 (21:59 +0000)]
[WebAssembly] Only RAUW a constant once in FixFunctionBitcasts
When we collect 2 uses of a function in FindUses and then RAUW when we
visit the first, we end up visiting the wrapper (because the second was
RAUW'd). We still want to use RAUW instead of just Use->set() because
it has special handling for Constants, so this patch just ensures that
only one use of each constant is added to the work list.
Differential Revision: https://reviews.llvm.org/D28504
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291603
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Leschuk [Tue, 10 Jan 2017 21:30:42 +0000 (21:30 +0000)]
Correct object file for implicit const test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291601
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Leschuk [Tue, 10 Jan 2017 21:18:26 +0000 (21:18 +0000)]
DebugInfo: support for DW_FORM_implicit_const
Support for DW_FORM_implicit_const DWARFv5 feature.
When this form is used attribute value goes to .debug_abbrev section (as SLEB).
As this form would break any debug tool which doesn't support DWARFv5
it is guarded by dwarf version check. Attempt to use this form with
dwarf version <= 4 is considered a fatal error.
Differential Revision: https://reviews.llvm.org/D28456
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291599
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 10 Jan 2017 20:07:58 +0000 (20:07 +0000)]
Fix memory leak in a unit test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291595
91177308-0d34-0410-b5e6-
96231b3b80d8
Michal Gorny [Tue, 10 Jan 2017 19:55:51 +0000 (19:55 +0000)]
[llvm-config] Canonicalize CMake booleans to 0/1
Following the similar change to lit configuration, ensure that all CMake
booleans are canonicalized to 0/1 when being passed to llvm-config. This
fixes the incorrect interpretation of values when user passes another
value than the ON/OFF, and simplifies the code by removing unnecessary
string matching.
Furthermore, the code for --has-rtti and --has-global-isel has been
modified to print consistent values indepdently of the boolean used by
passed by the user to CMake. Sadly, the code already implicitly used
different values for the two (YES/NO for --has-rtti, ON/OFF for
--has-global-isel).
Include tests for all booleans and multi-value options in llvm-config.
Differential Revision: https://reviews.llvm.org/D28366
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291593
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Tue, 10 Jan 2017 19:47:05 +0000 (19:47 +0000)]
[CMake] Handle common options for runtimes build
All the existing runtimes relies on flags which are set by AddLLVM
and HandleLLVMOptions. In the standalone case, they would include
these themselves, but when being built using LLVM runtimes we should
include these in the top-level runtimes CMake files.
Differential Revision: https://reviews.llvm.org/D28389
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291590
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 10 Jan 2017 19:32:30 +0000 (19:32 +0000)]
[LV] Don't panic when encountering the IV of an outer loop.
Bail out instead of asserting when we encounter this situation,
which can actually happen.
The reason the test uses the new PM is that the "bad" phi, incidentally, gets
cleaned up by LoopSimplify. But LICM can create this kind of phi and preserve
loop simplify form, so the cleanup has no chance to run.
This fixes PR31190.
We may want to solve this in a less conservative manner, since this phi is
actually uniform within the inner loop (or we may want LICM to output a cleaner
promotion to begin with).
Differential Revision: https://reviews.llvm.org/D28490
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291589
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Tue, 10 Jan 2017 19:30:20 +0000 (19:30 +0000)]
[PGO] Turn off comdat renaming in IR PGO by default
Summary:
In IR PGO we append the function hash to comdat functions to avoid the
potential hash mismatch. This turns out not legal in some cases: if the comdat
function is address-taken and used in comparison. Renaming changes the semantic.
This patch turns off comdat renaming by default.
To alleviate the hash mismatch issue, we now rename the profile variable
for comdat functions. Profile allows co-existing multiple versions of profiles
with different hash value. The inlined copy will always has the correct profile
counter. The out-of-line copy might not have the correct count. But we will
not have the bogus mismatch warning.
Reviewers: davidxl
Subscribers: llvm-commits, xur
Differential Revision: https://reviews.llvm.org/D28416
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291588
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 10 Jan 2017 19:23:51 +0000 (19:23 +0000)]
[ARM] Remove rbit intrinsics and autoupgrade to generic bitreverse.
Testing already covered by CodeGen/ARM/rbit.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291587
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 10 Jan 2017 19:08:15 +0000 (19:08 +0000)]
AMDGPU: Add tests for HasMultipleConditionRegisters
This was enabled without many specific tests or the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291586
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 10 Jan 2017 19:04:12 +0000 (19:04 +0000)]
[CostModel][X86] Add AVX512VL vector shift cost tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291585
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Tue, 10 Jan 2017 18:57:17 +0000 (18:57 +0000)]
[X86][AVX512]Improving shuffle lowering by using AVX-512 EXPAND* instructions
This patch fix PR31351: https://llvm.org/bugs/show_bug.cgi?id=31351
1. This patch adds new type of shuffle lowering
2. We can use the expand instruction, When the shuffle pattern is as following:
{ 0*a[0]0*a[1]...0*a[n] , n >=0 where a[] elements in a ascending order}.
Reviewers: 1. igorb
2. guyblank
3. craig.topper
4. RKSimon
Differential Revision: https://reviews.llvm.org/D28352
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291584
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 10 Jan 2017 18:06:38 +0000 (18:06 +0000)]
LangRef: Note that calls also support fast math flags
This is already documented on the call instruction, but
not in the list of supported instructions in the fast math
flag section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291578
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 10 Jan 2017 18:02:05 +0000 (18:02 +0000)]
[SimplifyLibCalls] Propagate fast math flags while optimizing pow().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291577
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 10 Jan 2017 17:20:33 +0000 (17:20 +0000)]
[AArch64] Add support for lowering bitreverse to the rbit instruction.
Differential Revision: https://reviews.llvm.org/D28379
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291575
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Tue, 10 Jan 2017 16:40:57 +0000 (16:40 +0000)]
[mips] Fix Mips MSA instrinsics
The usage of some MIPS MSA instrinsics that took immediates could crash LLVM
during lowering. This patch addresses that behaviour. Crucially this patch
also makes the use of intrinsics with out of range immediates as producing an
internal error.
The ld,st instrinsics would trigger an assertion failure for MIPS64 as their
lowering would attempt to add an i32 offset to a i64 pointer.
Reviewers: vkalintiris, slthakur
Differential Revision: https://reviews.llvm.org/D25438
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291571
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Tue, 10 Jan 2017 15:53:10 +0000 (15:53 +0000)]
[mips] Honour -mno-odd-spreg for vector splat (again)
Previous the lowering of FILL_FW would use the MSA128W register class when
performing a vector splat. Instead it should be honouring -mno-odd-spreg and
only use the even registers when performing a splat from word to vector
register.
Logical follow-on from r230235.
This fixes PR/31369.
A previous commit was missing the test case and had another differential
in it.
Reviewers: slthakur
Differential Revision: https://reviews.llvm.org/D28373
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291566
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Tue, 10 Jan 2017 13:57:44 +0000 (13:57 +0000)]
Revert "[mips] Honour -mno-odd-spreg for vector splat"
This reverts commit r291556. It was a mixture of two differentials and
was missing a test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291562
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Tue, 10 Jan 2017 11:05:30 +0000 (11:05 +0000)]
RuntimeDyldELF: implement R_AARCH64_PREL64 reloc
Differential revision: https://reviews.llvm.org/D28122
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291558
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Tue, 10 Jan 2017 10:28:37 +0000 (10:28 +0000)]
[mips] Honour -mno-odd-spreg for vector splat
Previous the lowering of FILL_FW would use the MSA128W register class when
performing a vector splat. Instead it should be honouring -mno-odd-spreg and
only use the even registers when performing a splat from word to vector
register.
Logical follow-on from r230235.
This fixes PR/31369.
Reviewers: slthakur
Differential Revision: https://reviews.llvm.org/D28373
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291556
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 10 Jan 2017 07:42:57 +0000 (07:42 +0000)]
[DAGCombiner] Merge together duplicate checks for folding fold (select C, 1, X) -> (or C, X) and folding (select C, X, 0) -> (and C, X). Also be consistent about checking that both the condition and the result type are i1. NFC
I guess previously we just assumed if the result type was i1, then the condition type must also be i1?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291548
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 10 Jan 2017 06:24:24 +0000 (06:24 +0000)]
[ObjectYAML] Missed one mixup in the debug_line test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291547
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 10 Jan 2017 06:22:49 +0000 (06:22 +0000)]
[ObjectYAML] Support for DWARF line tables
One more try... relanding r291541 with a fix to properly gate MaxOpsPerInst on DWARF version.
Description from r291541:
This patch re-lands r291470, which failed on Linux bots. The issue (I believe) was undefined behavior because the size of llvm::dwarf::LineNumberOps was not explcitly specified or consistently respected. The updated patch adds an explcit underlying type to the enum and preserves the size more correctly.
Original description:
This patch adds support for the DWARF debug_lines section. The line table state machine opcodes are preserved, so this can be used to test the state machine evaluation directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291546
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 10 Jan 2017 06:01:16 +0000 (06:01 +0000)]
AMD family 17h (znver1) enablement
Summary:
This patch enables the following
1. AMD family 17h architecture using "znver1" tune flag (-march, -mcpu).
2. ISAs that are enabled for "znver1" architecture.
3. Checks ADX isa from cpuid to identify "znver1" flag when -march=native is used.
4. ISAs FMA4, XOP are disabled as they are dropped from amdfam17.
5. For the time being, it uses the btver2 scheduler model.
6. Test file is updated to check this flag.
This item is linked to clang review item https://reviews.llvm.org/D28018
Patch by Ganesh Gopalasubramanian
Reviewers: RKSimon, craig.topper
Subscribers: vprasad, RKSimon, ashutosh.nema, llvm-commits
Differential Revision: https://reviews.llvm.org/D28017
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291543
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 10 Jan 2017 05:31:23 +0000 (05:31 +0000)]
Revert "[ObjectYAML] Support for DWARF line tables"
This reverts commit r291541.
Still failing on a bot:
http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/47224/steps/test_llvm/logs/stdio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291542
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 10 Jan 2017 05:25:24 +0000 (05:25 +0000)]
[ObjectYAML] Support for DWARF line tables
This patch re-lands r291470, which failed on Linux bots. The issue (I believe) was undefined behavior because the size of llvm::dwarf::LineNumberOps was not explcitly specified or consistently respected. The updated patch adds an explcit underlying type to the enum and preserves the size more correctly.
Original description:
This patch adds support for the DWARF debug_lines section. The line table state machine opcodes are preserved, so this can be used to test the state machine evaluation directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291541
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Tue, 10 Jan 2017 04:32:34 +0000 (04:32 +0000)]
[XRay] Use regular expression for finding symbols
Un-break the test in Windows.
Follow-up on D24376.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291538
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 10 Jan 2017 04:12:24 +0000 (04:12 +0000)]
[X86] When lowering uniform shifts, use X86ISD::VZEXT instead of using a ZERO_EXTEND_VECTOR_INREG. If we emit the ZERO_EXTEND_VECTOR_INREG too late it doesn't get lowered properly and makes it through to isel and fails.
Fixes PR31593.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291535
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 10 Jan 2017 04:12:19 +0000 (04:12 +0000)]
[DAGCombiner] Remove code for optimizing select (xor Cond, 0), X, Y -> select Cond, X, Y. Just let combine on the xor itself take care of it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291534
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Tue, 10 Jan 2017 03:21:54 +0000 (03:21 +0000)]
[XRay] Fixup includes for modules build
Remove unnecessary system header include.
Follow-up to D24376.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291533
91177308-0d34-0410-b5e6-
96231b3b80d8
Xin Tong [Tue, 10 Jan 2017 03:13:52 +0000 (03:13 +0000)]
Fix a typo and also test a new machine for commit. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291532
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Tue, 10 Jan 2017 02:51:13 +0000 (02:51 +0000)]
[XRay] Don't include <unistd.h> unnecessarily
Follow-up to D24376.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291531
91177308-0d34-0410-b5e6-
96231b3b80d8
Serge Pavlov [Tue, 10 Jan 2017 02:50:47 +0000 (02:50 +0000)]
[StructurizeCfg] Update dominator info.
In some cases StructurizeCfg updates root node, but dominator info
remains unchanges, it causes crash when expensive checks are enabled.
To cope with this problem a new method was added to DominatorTreeBase
that allows adding new root nodes, it is called in StructurizeCfg to
put dominator tree in sync.
This change fixes PR27488.
Differential Revision: https://reviews.llvm.org/D28114
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291530
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Tue, 10 Jan 2017 02:38:11 +0000 (02:38 +0000)]
[XRay] Implement `llvm-xray convert` -- trace file conversion
This is the second part of a multi-part change to define additional
subcommands to the `llvm-xray` tool.
This change defines a conversion subcommand to take XRay log files, and
turns them from one format to another (binary or YAML). This currently
only supports the first version of the log file format, defined in the
compiler-rt runtime.
Depends on D21987.
Reviewers: dblaikie, echristo
Subscribers: mehdi_amini, dberris, beanz, llvm-commits
Differential Revision: https://reviews.llvm.org/D24376
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291529
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Tue, 10 Jan 2017 01:08:01 +0000 (01:08 +0000)]
[CodeGen] Implement the SUnit::print() method
This method seems to have had a troubled life. This patch proposes that it
replaces the recently added helper function dumpSUIdentifier. This way, the
method can be used in other files using the SUnit class.
Differential revision: https://reviews.llvm.org/D28488
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291520
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 10 Jan 2017 01:05:33 +0000 (01:05 +0000)]
Try once again to fix the MSVC build of AlignedCharArrayUnion
It was complaining about ambiguity between llvm::detail and
llvm::support::detail:
error C2872: 'detail': ambiguous symbol
note: could be 'llvm::detail'
note: or 'llvm::support::detail'
Standardize on llvm::support::detail to hide these symbols further.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291519
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 10 Jan 2017 00:55:47 +0000 (00:55 +0000)]
[ThinLTO] Hash more part of the config to build cache entries
This has been fixed in the "new" LTO API used by Gold/LLD, this is
fixing the same issue in the libLTO API used by ld64 (amongst other)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291518
91177308-0d34-0410-b5e6-
96231b3b80d8
Xin Tong [Tue, 10 Jan 2017 00:39:49 +0000 (00:39 +0000)]
Add an assert for hasLoopInvariantOperands
Summary: Add an assert for hasLoopInvariantOperands
Reviewers: danielcdh, sanjoy
Subscribers: mzolotukhin, llvm-commits
Differential Revision: https://reviews.llvm.org/D28501
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291516
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 10 Jan 2017 00:29:05 +0000 (00:29 +0000)]
Revert the attempt to optimize the constexpr functions. MSVC does not handle this yet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291515
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 10 Jan 2017 00:26:56 +0000 (00:26 +0000)]
Fix MSVC build of AlignedCharArrayUnion
Use constexpr recursion for alignof like we do for sizeof. Seems to work
with Clang and MSVC. Also, don't recurse twice to avoid slowdowns in
compilers that don't memoize constexpr results (Clang).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291514
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Mon, 9 Jan 2017 23:23:25 +0000 (23:23 +0000)]
Lift the 10-type limit for AlignedCharArrayUnion
This patch uses C++11 parameter packs and constexpr functions
to allow AlignedCharArrayUnion to hold an arbitrary number of
types.
Differential Revision: https://reviews.llvm.org/D28429
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291503
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Mon, 9 Jan 2017 23:11:25 +0000 (23:11 +0000)]
Commit a test for match-full-lines.
I unfortunately neglected to add it in r260540, but it has been
sitting in my working dir ever since. D'oh.
Modified to work with r290069, which made the CHECK patterns
themselves whitespace-sensitive as well, and remove the test added
then, as this tests both strict and non-strict modes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291499
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Jan 2017 23:09:38 +0000 (23:09 +0000)]
[WebAssembly] Add return type annotations in fast isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291498
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 9 Jan 2017 22:55:00 +0000 (22:55 +0000)]
TarWriter: Fix a bug in Ustar header.
If we split a filename into `Name` and `Prefix`, `Prefix` is at most
145 bytes. We had a bug that didn't split a path correctly. This bug
was pointed out by Rafael in the post commit review.
This patch adds a unit test for TarWriter to verify the fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291494
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Mon, 9 Jan 2017 22:16:51 +0000 (22:16 +0000)]
[NVPTX] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291490
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 9 Jan 2017 22:13:51 +0000 (22:13 +0000)]
[X86][AVX512VL] Added AVX512VL to 128/256 bit vector shift tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291488
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Mon, 9 Jan 2017 21:56:26 +0000 (21:56 +0000)]
Refactor inline threshold update code.
Functional change: Previously, if a callee is cold, we used ColdThreshold if it minimizes the existing threshold. This was irrespective of whether we were optimizing for minsize (-Oz) or not. But -Oz uses very low threshold to begin with and the inlining with -Oz is expected to be tuned for lowering code size, so there is no good reason to set an even lower threshold for cold callees. We now lower the threshold for cold callees only when -Oz is not used. For default values of -inlinethreshold and -inlinecold-threshold, this change has no effect and this simplifies the code.
NFC changes: Group all threshold updates that are guarded by !Caller->optForMinSize() and within that group threshold updates that require profile summary info.
Differential revision: https://reviews.llvm.org/D28369
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291487
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 9 Jan 2017 21:55:23 +0000 (21:55 +0000)]
[SimplifyLibCalls] pow(x, -0.5) -> 1.0 / sqrt(x).
Differential Revision: https://reviews.llvm.org/D28479
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291486
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 9 Jan 2017 21:52:35 +0000 (21:52 +0000)]
Support outputting to /dev/null.
When writing to a non regular file we cannot rename to it. Since we
have to write, we may as well create a temporary file to avoid trying
to create an unique file in /dev when trying to write to /dev/null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291485
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 9 Jan 2017 21:38:17 +0000 (21:38 +0000)]
PeepholeOptimizer: Do not replace SubregToReg(bitcast like)
While we can usually replace bitcast like instructions
(MachineInstr::isBitcast()) with a COPY this is not legal if any of the
users uses SUBREG_TO_REG to assert the upper bits of the result are
zero.
Differential Revision: https://reviews.llvm.org/D28474
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291483
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 9 Jan 2017 21:38:14 +0000 (21:38 +0000)]
Drive by typo fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291482
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 9 Jan 2017 21:38:10 +0000 (21:38 +0000)]
MachineInstr: Print name for subreg index in SUBREG_TO_REG
SUBREG_TO_REG takes a subregister index as 3rd operand, print the name
instead of a number. We already do the same for INSERT_SUBREG and
REG_SEQUENCE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291481
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 9 Jan 2017 21:20:42 +0000 (21:20 +0000)]
TarWriter: Set "00" to Ustar version field.
Most (maybe all?) tar commands can handle tar archives with blank
version fields, but POSIX requires "00" to be set to the field, so
doing it is good for compliance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291479
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Mon, 9 Jan 2017 21:04:46 +0000 (21:04 +0000)]
Revert r291092 because it introduces a crash.
See PR31589 for details.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291478
91177308-0d34-0410-b5e6-
96231b3b80d8
Vyacheslav Klochkov [Mon, 9 Jan 2017 20:26:17 +0000 (20:26 +0000)]
X86-specific path: Implemented the fusing of MUL+ADDSUB to FMADDSUB.
Differential Revision: https://reviews.llvm.org/D28087
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291473
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Jan 2017 20:18:30 +0000 (20:18 +0000)]
[InstCombine] add test to show missed fold using llvm.assume; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291472
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 9 Jan 2017 20:04:55 +0000 (20:04 +0000)]
Revert "[ObjectYAML] Support for DWARF line tables"
This reverts commit r291470 due to failing bots:
http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/47209/steps/test_llvm/logs/stdio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291471
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 9 Jan 2017 20:01:37 +0000 (20:01 +0000)]
[ObjectYAML] Support for DWARF line tables
This patch adds support for the DWARF debug_lines section. The line table state machine opcodes are preserved, so this can be used to test the state machine evaluation directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291470
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Jan 2017 19:43:26 +0000 (19:43 +0000)]
[InstCombine] regenerate checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291469
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Jan 2017 19:31:20 +0000 (19:31 +0000)]
[ValueTracking] regenerate checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291468
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Mon, 9 Jan 2017 19:24:19 +0000 (19:24 +0000)]
Fix function regex in update_tests so it can handle {}'s in function args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291467
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Jan 2017 19:18:46 +0000 (19:18 +0000)]
[InstCombine] regenerate checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291464
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Jan 2017 19:13:38 +0000 (19:13 +0000)]
[InstCombine] remove unnecessary attribute comments from test files; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291463
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Mon, 9 Jan 2017 19:05:29 +0000 (19:05 +0000)]
[LV] Fix-up external IV users after updating dominator tree
This patch delays the fix-up step for external induction variable users until
after the dominator tree has been properly updated. This should fix PR30742.
The SCEVExpander in InductionDescriptor::transform can generate code in the
wrong location if the dominator tree is not up-to-date. We should work towards
keeping the dominator tree up-to-date throughout the transformation.
Reference: https://llvm.org/bugs/show_bug.cgi?id=30742
Differential Revision: https://reviews.llvm.org/D28168
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291462
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 9 Jan 2017 18:52:39 +0000 (18:52 +0000)]
AMDGPU: Add Assert[SZ]Ext during argument load creation
For i16 zeroext arguments when i16 was a legal type, the
known bits information from the truncate was lost. Insert
a zeroext so the known bits optimizations work with the 32-bit
loads.
Fixes code quality regressions vs. SI in min.ll test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291461
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 9 Jan 2017 18:44:11 +0000 (18:44 +0000)]
Reapply r291025 ("AMDGPU: Remove unneccessary intermediate vector")
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291460
91177308-0d34-0410-b5e6-
96231b3b80d8
Xin Tong [Mon, 9 Jan 2017 17:57:08 +0000 (17:57 +0000)]
Intrinsic::Bitreverse is safe to speculate
Summary: Intrinsic::Bitreverse is safe to speculate
Reviewers: hfinkel, mkuper, arsenm, jmolloy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28471
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291456
91177308-0d34-0410-b5e6-
96231b3b80d8
Sumanth Gundapaneni [Mon, 9 Jan 2017 17:45:02 +0000 (17:45 +0000)]
In the below scenario, we must be able to skip the a DBG_VALUE instruction and
remove the dead store.
%vreg0<def> = L2_loadri_io <fi#15>, 0; mem:LD4[%dataF](align=4)
DBG_VALUE %vreg0, %noreg, !"dataF", <!184>; IntRegs:%vreg0
S2_storeri_io <fi#15>, 0, %vreg0; mem:ST4[%dataF]
In reality, this kind of stores are eliminated before Stack Slot Coloring pass,
possibly in instruction lowering
Differential Revision: https://reviews.llvm.org/D26616
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291455
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 9 Jan 2017 17:20:03 +0000 (17:20 +0000)]
[X86][AVX512] Enable v16i8/v32i8 vector shifts to use an extend+shift+truncate pattern.
Use the existing AVX2 v8i16 vector shift lowering for v16i8 (extending to v16i32) on AVX512 targets and v32i8 (extending to v32i16) on AVX512BW targets.
Cost model updates to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291451
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Jan 2017 16:27:56 +0000 (16:27 +0000)]
fix comment typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291447
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 9 Jan 2017 15:15:45 +0000 (15:15 +0000)]
[X86][AVX512DQ] Enable v16i16 vector shifts to use an extend+shift+truncate pattern.
Use the existing AVX2 v8i16 vector shift lowering for v16i16 on AVX512 targets (AVX512BW will have already have lowered with vpsravw).
Cost model updates to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291445
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 9 Jan 2017 14:36:09 +0000 (14:36 +0000)]
[X86][AVX512DQ] Added AVX512DQ to 128/256 bit vector shift tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291444
91177308-0d34-0410-b5e6-
96231b3b80d8
Mohammed Agabaria [Mon, 9 Jan 2017 14:00:57 +0000 (14:00 +0000)]
[IR] Adding const_value_op_iterator for IR/User.h
const value op iterator is missing from User.h class.
Differential Revision: https://reviews.llvm.org/D28464
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291443
91177308-0d34-0410-b5e6-
96231b3b80d8