OSDN Git Service
James Henderson [Thu, 10 May 2018 12:15:43 +0000 (12:15 +0000)]
Fix signed/unsigned comparison warning and print format
The print format was causing at least 2 unit-test failures from r331971.
The signed/unsigned comparison warnings only appeared to affect two lines but
it was unclear whether it might just pop up on other lines, so I have been
explicit in all the literals in the tests.
There were other bot unit-test failures that I am still investigating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331978
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bolvansky [Thu, 10 May 2018 11:47:36 +0000 (11:47 +0000)]
[CFLGraph] Fixed Select instruction handling
Summary:
Operand 0 is the condition, not the true value.
Use op 1 and op 2 as the correct values.
Reviewers: george.burgess.iv, nlopes, efriedma
Reviewed By: george.burgess.iv
Subscribers: craig.topper, rjmccall, lebedev.ri, llvm-commits
Differential Revision: https://reviews.llvm.org/D46343
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331976
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 10 May 2018 11:45:18 +0000 (11:45 +0000)]
[InstCombine] Only propagate known leading zeros from udiv input to output.
Put in a conservatively correct estimate for now. Avoids miscompiling
clang in FDO mode. This is really tricky to trigger in reality as
basically all interesting cases will be folded away by computeKnownBits
earlier, I was unable to find a reasonably small test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331975
91177308-0d34-0410-b5e6-
96231b3b80d8
James Henderson [Thu, 10 May 2018 10:51:33 +0000 (10:51 +0000)]
[DWARF] Rework debug line parsing to use llvm::Error and callbacks
Reviewed by: dblaikie, JDevlieghere, espindola
Differential Revision: https://reviews.llvm.org/D44560
Summary:
The .debug_line parser previously reported errors by printing to stderr and
return false. This is not particularly helpful for clients of the library code,
as it prevents them from handling the errors in a manner based on the calling
context. This change switches to using llvm::Error and callbacks to indicate
what problems were detected during parsing, and has updated clients to handle
the errors in a location-specific manner. In general, this means that they
continue to do the same thing to external users. Below, I have outlined what
the known behaviour changes are, relating to this change.
There are two levels of "errors" in the new error mechanism, to broadly
distinguish between different fail states of the parser, since not every
failure will prevent parsing of the unit, or of subsequent unit. Malformed
table errors that prevent reading the remainder of the table (reported by
returning them) and other minor issues representing problems with parsing that
do not prevent attempting to continue reading the table (reported by calling a
specified callback funciton). The only example of this currently is when the
last sequence of a unit is unterminated. However, I think it would be good to
change the handling of unrecognised opcodes to report as minor issues as well,
rather than just printing to the stream if --verbose is used (this would be a
subsequent change however).
I have substantially extended the DwarfGenerator to be able to handle
custom-crafted .debug_line sections, allowing for comprehensive unit-testing
of the parser code. For now, I am just adding unit tests to cover the basic
error reporting, and positive cases, and do not currently intend to test every
part of the parser, although the framework should be sufficient to do so at a
later point.
Known behaviour changes:
- The dump function in DWARFContext now does not attempt to read subsequent
tables when searching for a specific offset, if the unit length field of a
table before the specified offset is a reserved value.
- getOrParseLineTable now returns a useful Error if an invalid offset is
encountered, rather than simply a nullptr.
- The parse functions no longer use `WithColor::warning` directly to report
errors, allowing LLD to call its own warning function.
- The existing parse error messages have been updated to not specifically
include "warning" in their message, allowing consumers to determine what
severity the problem is.
- If the line table version field appears to have a value less than 2, an
informative error is returned, instead of just false.
- If the line table unit length field uses a reserved value, an informative
error is returned, instead of just false.
- Dumping of .debug_line.dwo sections is now implemented the same as regular
.debug_line sections.
- Verbose dumping of .debug_line[.dwo] sections now prints the prologue, if
there is a prologue error, just like non-verbose dumping.
As a helper for the generator code, I have re-added emitInt64 to the
AsmPrinter code. This previously existed, but was removed way back in r100296,
presumably because it was dead at the time.
This change also requires a change to LLD, which will be committed separately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331971
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Thu, 10 May 2018 10:42:30 +0000 (10:42 +0000)]
[mips] Correct the predicates of cvt.fmt.fmt instructions
Reviewers: atanasyan, smaksimovic, abeserminji
Differential Revision: https://reviews.llvm.org/D46390
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331969
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Buella [Thu, 10 May 2018 07:26:05 +0000 (07:26 +0000)]
[X86] ptwrite intrinsic
Reviewers: craig.topper, RKSimon
Reviewed By: craig.topper, RKSimon
Differential Revision: https://reviews.llvm.org/D46539
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331961
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Yung [Thu, 10 May 2018 03:06:42 +0000 (03:06 +0000)]
Fix tests added in r331924 so that they work on Windows.
The test needed to check for the optional executable extension (llvm-objcopy.EXE).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331952
91177308-0d34-0410-b5e6-
96231b3b80d8
Serguei Katkov [Thu, 10 May 2018 01:42:59 +0000 (01:42 +0000)]
[SCEV] Add missed Test for rL331949.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331950
91177308-0d34-0410-b5e6-
96231b3b80d8
Serguei Katkov [Thu, 10 May 2018 01:40:43 +0000 (01:40 +0000)]
SCEV] Do not use induction in isKnownPredicate for simplification umax.
During simplification umax we trigger isKnownPredicate twice. As a first attempt it
tries the induction. To do that it tries to get post increment of SCEV.
Re-writing the SCEV may result in simplification of umax. If the SCEV contains a lot
of umax operations this recursion becomes very slow.
The added test demonstrates the slow behavior.
To resolve this we use only simple ways to check whether the predicate is known.
Reviewers: sanjoy, mkazantsev
Reviewed By: sanjoy
Subscribers: lebedev.ri, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D46046
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331949
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 10 May 2018 00:53:25 +0000 (00:53 +0000)]
[InstCombine] Reorder an if condition to put a cheap check in front of a computeKnownBits call. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331948
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 10 May 2018 00:53:22 +0000 (00:53 +0000)]
[InstCombine] Use APInt::getBitsSetFrom to shortern a line and fix an 80 columns violation. NFC
Fix a similar line in the same function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331947
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Matthews [Thu, 10 May 2018 00:08:39 +0000 (00:08 +0000)]
[LIT] Add the missing file
I forgot to commit this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331946
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Matthews [Thu, 10 May 2018 00:06:17 +0000 (00:06 +0000)]
Refactor test incase results are backwards
Looks like results can come in either way in this file. Loosen the ordering constraints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331945
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 10 May 2018 00:05:29 +0000 (00:05 +0000)]
[Inscombine] fix a signedness warning which broke -Werror builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331944
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Matthews [Wed, 9 May 2018 23:48:32 +0000 (23:48 +0000)]
[LIT] Handle xml characters in test names
Lit creates malformed xml when the test case has an & in the name.
Escape those correctly.
This also adds a test case which I will add other nasty encoding issues to in some followup commits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331942
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Belevich [Wed, 9 May 2018 23:46:19 +0000 (23:46 +0000)]
[NVPTX] Added a feature to use short pointers for const/local/shared AS.
Const/local/shared address spaces are all < 4GB and we can always use
32-bit pointers to access them. This has substantial performance impact
on kernels that uses shared memory for intermediary results.
The feature is disabled by default.
Differential Revision: https://reviews.llvm.org/D46147
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331941
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 9 May 2018 23:10:46 +0000 (23:10 +0000)]
[PhaseOrdering] remove stale comments; NFC
Forgot to update this with rL331937.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331939
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 9 May 2018 23:08:15 +0000 (23:08 +0000)]
[AggressiveInstCombine] convert a chain of 'and-shift' bits into masked compare
This is a follow-up to D45986. As suggested there, we should match the "all-bits-set"
pattern in addition to "any-bits-set".
This was a little more complicated than I thought it would be initially because the
"and 1" instruction can be anywhere in the chain. Hopefully, the code comments make
that logic understandable, but if you see a way to simplify or improve that, it's
most appreciated.
This transforms patterns that emerge from bitfield tests as seen in PR37098:
https://bugs.llvm.org/show_bug.cgi?id=37098
I think it would also help reduce the large test from:
D46336
D46595
but we need something to reassociate that case to the forms we're expecting here first.
Differential Revision: https://reviews.llvm.org/D46649
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331937
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Wed, 9 May 2018 22:56:32 +0000 (22:56 +0000)]
[InstCombine] Widen guards with conditions between
The previous handling for guard widening in InstCombine was extremely restrictive. In particular, it didn't handle the common case where we had two guards separated by a single icmp. Handle this by scanning through a small fixed window of instructions to find the next guard if needed.
Differential Revision: https://reviews.llvm.org/D46203
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331935
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 9 May 2018 22:27:34 +0000 (22:27 +0000)]
[InstCombine] Teach SimplifyDemandedBits that udiv doesn't demand low dividend bits that are zero in the divisor
This is safe as long as the udiv is not exact. The pattern is not common in
C++ code, but comes up all the time in code generated by XLA's GPU backend.
Differential Revision: https://reviews.llvm.org/D46647
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331933
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Wed, 9 May 2018 22:15:51 +0000 (22:15 +0000)]
[ARM] Add support for SETCCCARRY instead of SETCCE
Summary: As per title. SETCCE is deprecated and will eventually be removed.
Reviewers: rogfer01, efriedma, rengolin, javed.absar
Subscribers: kristof.beyls, chrib, llvm-commits
Differential Revision: https://reviews.llvm.org/D46512
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331929
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Tereshin [Wed, 9 May 2018 21:43:30 +0000 (21:43 +0000)]
[GlobalISel][Legalizer] Widening the second src op of shifts bug fix
The second source operand of G_SHL, G_ASHR, and G_LSHR must preserve its
value as a (small) unsigned integer, therefore its incorrect to widen it
in any way but by zero extending it.
G_SHL was using G_ANYEXT and G_ASHR - G_SEXT (which is correct for their
destination and first source operands, but not the "number of bits to
shift" operand).
Generally, shifts aren't as similar to regular binary operations as it
might seem, for instance, they aren't commutative nor associative and
the second source operand usually requires a special treatment.
Reviewers: bogner, javed.absar, aivchenk, rovka
Reviewed By: bogner
Subscribers: igorb, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D46413
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331926
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Semel [Wed, 9 May 2018 21:36:54 +0000 (21:36 +0000)]
[llvm-objcopy] Add --strip-symbol (-N) option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331924
91177308-0d34-0410-b5e6-
96231b3b80d8
Farhana Aleen [Wed, 9 May 2018 21:18:34 +0000 (21:18 +0000)]
[AMDGPU] Support horizontal vectorization of min/max.
Author: FarhanaAleen
Reviewed By: rampitec
Subscribers: AMDGPU
Differential Revision: https://reviews.llvm.org/D46604
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331920
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 9 May 2018 21:11:35 +0000 (21:11 +0000)]
AMDGPU: Ignore any_extend in mul24 combine
If a multiply is truncated, SimplifyDemandedBits
sometimes turns a zero_extend of the inputs into an
any_extend, which makes the known bits computation unhelpful.
Ignore these and compute known bits for the underlying value,
since we insert the correct extend type after.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331919
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 9 May 2018 21:10:41 +0000 (21:10 +0000)]
[Hexagon] Add patterns for vector shift-and-accumulate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331918
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 9 May 2018 20:52:54 +0000 (20:52 +0000)]
AMDGPU: Handle partial shift reduction for variable shifts
If the variable shift amount has known bits, we can still reduce
the shift.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331917
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 9 May 2018 20:52:43 +0000 (20:52 +0000)]
AMDGPU: Partially shrink 64-bit shifts if reduced to 16-bit
This is an extension of an existing combine to reduce wider
shls if the result fits in the final result type. This
introduces the same combine, but reduces the shift to a middle
sized type to avoid the slow 64-bit shift.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331916
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 9 May 2018 19:27:48 +0000 (19:27 +0000)]
[X86] Fix Broadwell's Shuffle256 schedule classes load latency values.
Allows us to remove some unnecessary InstRW overrides.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331913
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 9 May 2018 19:04:15 +0000 (19:04 +0000)]
[X86] Merge instregex patterns to reduce InstrRW compile time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331911
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 9 May 2018 18:37:39 +0000 (18:37 +0000)]
AMDGPU: Add combine for trunc of bitcast from build_vector
If the truncate is only accessing the first element of the vector,
we can use the original source value.
This helps with some combine ordering issues after operations are
lowered to integer operations between bitcasts of build_vector.
In particular it stops unnecessarily materializing the unused
top half of a vector in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331909
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 9 May 2018 18:33:59 +0000 (18:33 +0000)]
[Hexagon] Check the end of the correct container (fix typo)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331907
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 9 May 2018 18:29:26 +0000 (18:29 +0000)]
AMDGPU: Stop special casing constant indexes of extract_vector_elt
The same result folds out of the dynamic expansion logic if the
index is constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331906
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Wed, 9 May 2018 18:21:03 +0000 (18:21 +0000)]
[llvm-rc] Handle C preprocessor output
When preprocessing resource scripts (which can easily be done outside
of llvm-rc), included headers can leave behind C declarations (despite
preprocessing with -DRC_INVOKED), that can't be parsed by a resource
compiler.
This is handled in all of rc.exe, by parsing the preprocessor output
line markers and ignoring content from files named *.h and *.c,
documented at [1].
In addition to this filtering, strip out any other preprocessor directive
that is left behind (like pragmas) which also can't be handled by the
tokenizer.
The added test uses both standard #line markers (supported by rc.exe) and
GNU style extended line markers, thus this test doesn't pass with rc.exe,
but passes with GNU windres. (Windres on the other hand doesn't filter
out files named *.c, only *.h.)
Differential Revision: https://reviews.llvm.org/D46579
[1] https://msdn.microsoft.com/en-us/library/windows/desktop/
aa381033(v=vs.85).aspx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331903
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Wed, 9 May 2018 18:20:56 +0000 (18:20 +0000)]
[llvm-rc] Add support for the RCDATA resource type
This is the same as any other user defined resource, but with
a specific allocated resource type number.
Differential Revision: https://reviews.llvm.org/D46636
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331902
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Wed, 9 May 2018 18:20:49 +0000 (18:20 +0000)]
[llvm-rc] Allow -1 for control IDs in old style dialogs with 16 bit fields
-1 is commonly used as ID for controls that one don't want to
refer to later. For DIALOG resources, the IDs are 16 bit numbers,
and -1 gets interpreted as UINT32_MAX earlier, which then later is
too large to write into a uint16_t.
Differential Revision: https://reviews.llvm.org/D46506
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331901
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Tereshin [Wed, 9 May 2018 17:28:18 +0000 (17:28 +0000)]
Reapplying r331819 [GlobalISel][Legalizer] More concise and faster widenScalar, NFC
The commit was a suspect for clang-cmake-aarch64-global-isel and
clang-cmake-aarch64-quick bot failures, proved to be innocent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331898
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 9 May 2018 17:28:10 +0000 (17:28 +0000)]
llvm-mca: Add missing includes
Move the header include in the primary source file to the top to
validate that it doesn't depend on any other inclusions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331897
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 9 May 2018 17:14:27 +0000 (17:14 +0000)]
[DAGCombiner] In visitBITCAST when trying to constant fold the bitcast, only call getBitcast if its an fp->int or int->fp conversion even when before legalize ops.
Previously if !LegalOperations we would blindly call getBitcast and hope that getNode would constant fold it. But if the conversion is between a vector and a scalar, getNode has no simplification.
This means we would just get back the original N. We would then return that N which would make the caller of visitBITCAST think that we used CombineTo and did our own worklist management. This prevents target specific optimizations from being called for vector/scalar bitcasts until after legal operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331896
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bolvansky [Wed, 9 May 2018 16:09:31 +0000 (16:09 +0000)]
[InstCombine] snprintf optimizations
Reviewers: spatel, efriedma, majnemer, rja, bkramer
Reviewed By: rja, bkramer
Subscribers: rja, llvm-commits
Differential Revision: https://reviews.llvm.org/D46285
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331889
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Wed, 9 May 2018 15:53:06 +0000 (15:53 +0000)]
[DAGCombine] Change store merge candidates check cut off to 1024.
The previous value of 8192 resulted in severe compile time hits in
some pathological cases.
rdar://
39781410
Differential Revision: https://reviews.llvm.org/D46581
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331888
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 9 May 2018 15:44:40 +0000 (15:44 +0000)]
[Hexagon] Fix sanitizer error about using -1u in variable of enum type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331887
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 9 May 2018 15:18:12 +0000 (15:18 +0000)]
[LV] Change MaxVectorSize bound to 256 in assertion, NFC otherwise
It's possible to have a vector of 256 bytes in HVX code on Hexagon
(vector pair in 128-byte mode).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331885
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Wed, 9 May 2018 15:13:45 +0000 (15:13 +0000)]
APFloat/x87: Fix string conversion for "unnormal" values (pr35860)
Summary:
Unnormal values are a feature of some very old x87 processors. We handle
them correctly for the most part -- the only exception was an unnormal
value whose significand happened to be zero. In this case the APFloat
was still initialized as normal number (category = fcNormal), but a
subsequent toString operation would assert because the math would
produce nonsensical values for the zero significand.
During review, it was decided that the correct way to fix this is to
treat all unnormal values as NaNs (as that is what any >=386 processor
will do).
The issue was discovered because LLDB would crash when trying to print
some "long double" values.
Reviewers: skatkov, scanon, gottesmm
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41868
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331884
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 9 May 2018 15:02:04 +0000 (15:02 +0000)]
[Hexagon] Simplify MCCodeEmitter, move data to tables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331883
91177308-0d34-0410-b5e6-
96231b3b80d8
Karl-Johan Karlsson [Wed, 9 May 2018 13:34:57 +0000 (13:34 +0000)]
[LV] Add lit testcase for bitcast problem. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331878
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Wed, 9 May 2018 13:21:16 +0000 (13:21 +0000)]
[Support/Path] Make handling of paths like "///" consistent
Summary:
Various path functions were not treating paths consisting of slashes
alone consistently. For example, the iterator-based accessors decomposed the
path "///" into two elements: "/" and ".". This is not too bad, but it
is different from the behavior specified by posix:
```
A pathname that contains ***at least one non-slash character*** and that
ends with one or more trailing slashes shall be resolved as if a single
dot character ( '.' ) were appended to the pathname.
```
More importantly, this was different from how we treated the same path
in the filename+parent_path functions, which decomposed this path into
"." and "". This was completely wrong as it lost the information that
this was an absolute path which referred to the root directory.
This patch fixes this behavior by making sure all functions treat paths
consisting of (back)slashes alone the same way as "/". I.e., the
iterator-based functions will just report one component ("/"), and the
filename+parent_path will decompose them into "/" and "".
A slightly controversial topic here may be the treatment of "//". Posix
says that paths beginning with "//" may have special meaning and indeed
we have code which parses paths like "//net/foo/bar" specially. However,
as we were already not being consistent in parsing the "//" string
alone, and any special parsing for it would complicate the code further,
I chose to treat it the same way as longer sequences of slashes (which
are guaranteed to be the same as "/").
Another slight change of behavior is in the parsing of paths like
"//net//". Previously the last component of this path was ".". However,
as in our parsing the "//net" part in this path was the same as the
"drive" part in "c:\" and the next slash was the "root directory", it
made sense to treat "//net//" the same way as "//net/" (i.e., not to add
the extra "." component at the end).
Reviewers: zturner, rnk, dblaikie, Bigcheese
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D45942
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331876
91177308-0d34-0410-b5e6-
96231b3b80d8
Adhemerval Zanella [Wed, 9 May 2018 12:48:22 +0000 (12:48 +0000)]
[AArch64] Improve cost of vector division by constant
With custom lowering for vector MULLH{S,U}, it is now profitable to
vectorize a divide by constant loop for the custom types (v16i8, v8i16,
and v4i32). The cost if based on TargetLowering::Build{S,U}DIV which
uses a multiply by constant plus adjustment to express a divide by
constant.
Both {u,s}mull{2} are expressed as Instruction::Mul and shifts by
Instruction::AShr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331873
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 9 May 2018 12:39:39 +0000 (12:39 +0000)]
Remove 'abi-breaking-checks' lit feature.
Its only two uses were removed in r311730.
Effectively reverts r304851 (but that code has removed around a bit since then).
https://reviews.llvm.org/D46619
clang side done in r331871.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331872
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Wed, 9 May 2018 12:26:19 +0000 (12:26 +0000)]
Revert "DWARFVerifier: Check "completeness" of .debug_names section"
The new verifier check has found an error in the
debug-names-name-collisions.ll test on the PS4 bot:
error: Name Index @ 0x0: Entry @ 0xdc: mismatched Name of DIE @ 0x23: index - _ZN3foo3fooE; debug_info - foo.
Reverting while I investigate whether this is a bug in the verifier or
the generator.
This reverts commit r331868.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331869
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Wed, 9 May 2018 12:06:17 +0000 (12:06 +0000)]
DWARFVerifier: Check "completeness" of .debug_names section
Summary:
This patch implements a check which makes sure all entries required by
the DWARF v5 specification are present in the Name Index. The algorithm
tries to follow the wording of Section 6.1.1.1 of the spec as closely as
possible.
The main deviation from it is that instead of a whitelist-based approach
in the spec "The name index must contain an entry for each debugging
information entry that defines a named subprogram, label, variable,
type, or namespace" I chose a blacklist-based one, where I consider
everything to be "in" and then remove the entries that don't make sense.
I did this because it has more potential for catching interesting cases
and the above is a bit vague (it uses plain words like "variable" and
"subprogram", but the rest of the section speaks about specific TAGs).
This approach has raised some interesting questions, the main one being
whether enumerator values should be indexed. The consensus seems to be
that they should, although it does not follow from section 6.1.1.1.
For the time being I made the verifier ignore these, as LLVM does not do
this yet, and I wanted to get a clean run when verifying generated debug
info.
Another interesting case was the DW_TAG_imported_declaration. It was not
immediately clear to me whether this should go in or not, but currently
it is not indexed, and (unlike the enumerators) in does not seem to cause
problems for LLDB, so I've also ignored it.
Reviewers: JDevlieghere, aprantl, dblaikie
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D46583
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331868
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 9 May 2018 11:42:34 +0000 (11:42 +0000)]
[CostModel][X86] Split off SLM checks
A future patch will require this and the diff is much better if we perform the split separately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331867
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 9 May 2018 11:38:57 +0000 (11:38 +0000)]
Revert "[InstCombine] snprintf optimizations"
This reverts commit r331849. It miscompiles
snprintf(buf, sizeof(buf), "%s", "any constant string); into
memcpy(buf, "%s", sizeof("any constant string"));
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331866
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 9 May 2018 11:17:30 +0000 (11:17 +0000)]
[DebugInfo] Mark tests using -debug-only as REQUIRES: asserts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331865
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 9 May 2018 11:01:16 +0000 (11:01 +0000)]
[X86] Cleanup WriteFStore/WriteVecStore schedules
MOVNTPD/MOVNTPS should be WriteFStore
Standardized BDW/HSW/SKL/SKX WriteFStore/WriteVecStore - fixes some missed instregex patterns. (V)MASKMOVDQU was already using the default, its costs gets increased but is still nowhere near the real cost of that nasty instruction....
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331864
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 9 May 2018 10:33:21 +0000 (10:33 +0000)]
[mips] Move conditional moves out of isCodeGenOnly
Reviewers: atanasyan, smaksimovic, abeserminji
Differential Revision: https://reviews.llvm.org/D46389
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331863
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Wed, 9 May 2018 09:21:53 +0000 (09:21 +0000)]
[COFF] Improve correctness of def parsing for GNU features
The operator == used for exporting a function with a different
name in the DLL compared to the name in the import library
(which is useful for adding linker level aliases for function
in the import library) is a feature distinct and different from
the operator = used for exporting a function with a different
name (both in import library and DLL) than in the implementation
producing the DLL.
When creating an import library using dlltool, from a def file that
contains forwards (Func = OtherDll.Func), this shouldn't affect the
produced import library, which should still behave just as if it
was a normal exported function.
This clears a lot of confusion and subtle misunderstandings, and
avoids a parameter that was used to avoid creating weak aliases
when invoked from lld. (This parameter was added previously due to
the existing conflation of the two features.)
Differential Revision: https://reviews.llvm.org/D46245
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331859
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 9 May 2018 08:20:14 +0000 (08:20 +0000)]
Add a test for r331746.
Thanks to pcc for creating the test file!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331854
91177308-0d34-0410-b5e6-
96231b3b80d8
Shiva Chen [Wed, 9 May 2018 07:09:28 +0000 (07:09 +0000)]
[DebugInfo] Fix test failed due to debug-label-mi.ll and debug-label-opt.ll
Make these two test cases more generic for other architectures.
Please refer to '[DebugInfo] Convert intrinsic llvm.dbg.label to
MachineInstr.'
Patch by Hsiangkai Wang
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331853
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Pettersson [Wed, 9 May 2018 06:52:12 +0000 (06:52 +0000)]
[MergedLoadStoreMotion] Fix a debug invariant bug in mergeStores
Summary:
MergedLoadStoreMotion::mergeStores is using some heuristics
to limit the amount of stores that it tries to sink (see
MagicCompileTimeControl in MergedLoadStoreMotion.cpp). The
heuristic involves counting the number of instructions in
one of the basic blocks that is part of the transformation.
We now ignore dbg intrinsics when counting instruction for
the MagicCompileTimeControl heuristic. This to make sure that
the amount of stores that are sunk doesn't depend on the amount
of debug information (if -g is used or not).
Reviewers: Gerolf, davide, majnemer
Reviewed By: davide
Subscribers: dberlin, bjope, aprantl, JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D46600
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331852
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Widmann [Wed, 9 May 2018 06:45:28 +0000 (06:45 +0000)]
[LLVM-C] Correct types in Go bindings
Summary: Fixes a test failure introduced in rL331114.
Reviewers: whitequark
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D46631
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331850
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bolvansky [Wed, 9 May 2018 06:34:20 +0000 (06:34 +0000)]
[InstCombine] snprintf optimizations
Reviewers: spatel, efriedma, majnemer, rja
Reviewed By: rja
Subscribers: rja, llvm-commits
Differential Revision: https://reviews.llvm.org/D46285
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331849
91177308-0d34-0410-b5e6-
96231b3b80d8
Shiva Chen [Wed, 9 May 2018 06:22:39 +0000 (06:22 +0000)]
[DebugInfo] Fix test failed due to new DISubprogram attributes.
Please refer to '[DebugInfo] Add DILabel metadata and intrinsic
llvm.dbg.label'. I have renamed the 'variables' attributes to
'retainedNodes' to include local variables and local labels for the
function.
Patch by Hsiangkai Wang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331848
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 9 May 2018 06:07:20 +0000 (06:07 +0000)]
[X86] Combine (vXi1 (bitcast (-1)))) and (vXi1 (bitcast (0))) to all ones or all zeros vXi1 vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331847
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 9 May 2018 05:00:17 +0000 (05:00 +0000)]
Revert r331816 and r331820 - [globalisel] Add a combiner helpers for extending loads and use them in a pre-legalize combiner for AArch64
Reverting this to see if the clang-cmake-aarch64-global-isel and
clang-cmake-aarch64-quick bots are failing because of this commit.
We know it wasn't r331819.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331846
91177308-0d34-0410-b5e6-
96231b3b80d8
Shiva Chen [Wed, 9 May 2018 02:42:00 +0000 (02:42 +0000)]
[DebugInfo] Examine all uses of isDebugValue() for debug instructions.
Because we create a new kind of debug instruction, DBG_LABEL, we need to
check all passes which use isDebugValue() to check MachineInstr is debug
instruction or not. When expelling debug instructions, we should expel
both DBG_VALUE and DBG_LABEL. So, I create a new function,
isDebugInstr(), in MachineInstr to check whether the MachineInstr is
debug instruction or not.
This patch has no new test case. I have run regression test and there is
no difference in regression test.
Differential Revision: https://reviews.llvm.org/D45342
Patch by Hsiangkai Wang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331844
91177308-0d34-0410-b5e6-
96231b3b80d8
Shiva Chen [Wed, 9 May 2018 02:41:08 +0000 (02:41 +0000)]
[DebugInfo] Convert intrinsic llvm.dbg.label to MachineInstr.
In order to convert LLVM IR to MachineInstr, we need a new TargetOpcode,
DBG_LABEL, to ‘lower’ intrinsic llvm.dbg.label. The patch
creates this new TargetOpcode and convert intrinsic llvm.dbg.label to
MachineInstr through SelectionDAG.
In SelectionDAG, debug information is stored in SDDbgInfo. We create a
new data member of SDDbgInfo for labels and use the new data member,
SDDbgLabel, to create DBG_LABEL MachineInstr.
The new DBG_LABEL MachineInstr uses label metadata from LLVM IR as its
parameter. So, the backend could get metadata information of labels from
DBG_LABEL MachineInstr.
Differential Revision: https://reviews.llvm.org/D45341
Patch by Hsiangkai Wang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331842
91177308-0d34-0410-b5e6-
96231b3b80d8
Shiva Chen [Wed, 9 May 2018 02:40:45 +0000 (02:40 +0000)]
[DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label.
In order to set breakpoints on labels and list source code around
labels, we need collect debug information for labels, i.e., label
name, the function label belong, line number in the file, and the
address label located. In order to keep these information in LLVM
IR and to allow backend to generate debug information correctly.
We create a new kind of metadata for labels, DILabel. The format
of DILabel is
!DILabel(scope: !1, name: "foo", file: !2, line: 3)
We hope to keep debug information as much as possible even the
code is optimized. So, we create a new kind of intrinsic for label
metadata to avoid the metadata is eliminated with basic block.
The intrinsic will keep existing if we keep it from optimized out.
The format of the intrinsic is
llvm.dbg.label(metadata !1)
It has only one argument, that is the DILabel metadata. The
intrinsic will follow the label immediately. Backend could get the
label metadata through the intrinsic's parameter.
We also create DIBuilder API for labels to be used by Frontend.
Frontend could use createLabel() to allocate DILabel objects, and use
insertLabel() to insert llvm.dbg.label intrinsic in LLVM IR.
Differential Revision: https://reviews.llvm.org/D45024
Patch by Hsiangkai Wang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331841
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Tereshin [Wed, 9 May 2018 01:43:12 +0000 (01:43 +0000)]
Revert r331819 [GlobalISel][Legalizer] More concise and faster widenScalar, NFC
Reverting this to see if the clang-cmake-aarch64-global-isel and
clang-cmake-aarch64-quick bots are failing because of this commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331839
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 9 May 2018 01:38:13 +0000 (01:38 +0000)]
[RuntimeDyld][MachO] Properly handle thumb to thumb calls within a section.
Previously thumb bits were only checked for external relocations (thumb to arm
code and vice-versa). This patch adds detection for thumb callees in the same
section asthe (also thumb) caller.
The MachO/Thumb test case is updated to cover this, and redundant checks
(handled by the MachO/ARM test) are removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331838
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 9 May 2018 01:15:38 +0000 (01:15 +0000)]
Make CMakeLists.txt formatting more consistent with the rest of LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331837
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 9 May 2018 01:15:06 +0000 (01:15 +0000)]
fix path to llvm-cfi-verify unittests in docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331836
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 9 May 2018 01:07:02 +0000 (01:07 +0000)]
Make llvm-cfi-verify CMakeLists.txt formatting more consistent with the rest of LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331835
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Wed, 9 May 2018 00:53:50 +0000 (00:53 +0000)]
Support a funclet operand bundle in LowerInvoke
Summary:
The current LowerInvoke pass cannot handle invoke instructions with a
funclet bundle operand. The order of operands for an invoke instruction
is {call arguments, callee, funclet operand (if any), normal dest,
unwind dest}. The current code assumes there is no funclet operand and
incorrectly includes a funclet operand into call arguments.
Reviewers: rnk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D46242
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331832
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 9 May 2018 00:42:17 +0000 (00:42 +0000)]
Inline contents of LLVM_XRAY_TOOLS variable into its only use.
No behavior change.
https://reviews.llvm.org/D46402
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331830
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Wed, 9 May 2018 00:07:42 +0000 (00:07 +0000)]
[CMake] Use CMAKE_OBJCOPY and CMAKE_STRIP to externalize debug info
Don't hardcode objcopy and strip names, rather use CMAKE_OBJCOPY and
CMAKE_STRIP variables which allows users to override the tools used
such as using llvm-objcopy and llvm-strip instead of binutils versions.
Differential Revision: https://reviews.llvm.org/D46611
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331827
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 8 May 2018 23:28:15 +0000 (23:28 +0000)]
[SimplifyCFG] Fix a crash when folding PHIs.
We enter MergeBlockIntoPredecessor with a block looking like this:
for.inc.us-lcssa: ; preds = %cond.end
%k.1.lcssa.ph = phi i32 [ %conv15, %cond.end ]
%t.3.lcssa.ph = phi i32 [ %k.1.lcssa.ph, %cond.end ]
br label %for.inc, !dbg !66
[note the first arg of the PHI being a PHI].
FoldSingleEntryPHINodes gets rid of both PHIs (calling, eraseFromParent).
But right before we call the function, we push into IncomingValues the
only argument of the PHIs, and shortly after we try to iterate over
something which has been invalidated before :(
The fix its not trying to remove PHIs which have an incoming value
coming from the same BB we're looking at.
Fixes PR37300 and rdar://problem/
39910460
Differential Revision: https://reviews.llvm.org/D46568
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331824
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 8 May 2018 22:59:05 +0000 (22:59 +0000)]
MC: Remove dead code. NFCI.
We should never emit an SHT_DYNSYM into an object file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331821
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 8 May 2018 22:58:35 +0000 (22:58 +0000)]
[globalisel] Correct r331816 to check the opcode before calling getOperand().
Fix a silly mistake in my pre-commit changes for r331816. It should check what
opcode the insn is before extracting the operands.
NFC at the moment since the caller already checked the opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331820
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Tereshin [Tue, 8 May 2018 22:53:09 +0000 (22:53 +0000)]
[GlobalISel][Legalizer] More concise and faster widenScalar, NFC
Refactoring LegalizerHelper::widenScalar member function reducing its
size by approximately a factor of 2 and (hopefuly) making it more
straightforward and regular by introducing widenScalarSrc and
widenScalarDst helper methods.
The new widenScalar* methods mutate the instructions in place instead
of recreating them from scratch and removing the originals. The
compile time implications of this were measured on sqlite3
amalgamation, targeting AArch64 in -O0:
LegalizerHelper::widenScalar: > 25% faster
Legalizer::runOnMachineFunction: ~ 4.0 - 4.5% faster
Also adding MachineOperand::setCImm and refactoring out
MachineIRBuilder::recordInsertion methods to make the change possible.
Reviewers: aditya_nandakumar, bogner, javed.absar, t.p.northover, ab, dsanders, arsenm
Reviewed By: aditya_nandakumar
Subscribers: wdng, rovka, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D46414
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331819
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 8 May 2018 22:26:39 +0000 (22:26 +0000)]
[globalisel] Add a combiner helpers for extending loads and use them in a pre-legalize combiner for AArch64
Summary: Depends on D45541
Reviewers: ab, aditya_nandakumar, bogner, rtereshin, volkan, rovka, javed.absar, aemerson
Reviewed By: aemerson
Subscribers: aemerson, rengolin, mgorny, javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D45543
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331816
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Tue, 8 May 2018 22:00:57 +0000 (22:00 +0000)]
Revert "[X86][CET] Shadow stack fix for setjmp/longjmp"
This reverts commit
30962eca38ef02666ebcdded72a94f2cd0292d68.
This commit has been causing test asan failures on a build bot.
http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/45108/
Original commit: https://reviews.llvm.org/D46181
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331813
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Tue, 8 May 2018 20:56:04 +0000 (20:56 +0000)]
[AsmPrinter] Allow emitting codeview for any windows target
Before SVN r244158, codeview debug info was emitted always
emitted for msvc if debug info was enabled, but that commit
added a module flag.
Since it's still restricted by the flag, we can allow it
for any target if the user requests it, not only msvc (and
windows-itanium, added in SVN r287567).
Add a test for emitting it for a mingw target.
Differential Revision: https://reviews.llvm.org/D46303
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331809
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Tue, 8 May 2018 20:55:58 +0000 (20:55 +0000)]
[llvm-rc] Add support for all missing dialog controls
Differential Revision: https://reviews.llvm.org/D46507
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331808
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Moroz [Tue, 8 May 2018 19:26:51 +0000 (19:26 +0000)]
[Coverage] Take filenames into account when loading function records.
Summary:
Don't skip functions with the same name but from different files.
That change makes it possible to generate code coverage reports from
different binaries compiled from different sources even if there are functions
with non-unique names. Without that change, code coverage for such functions is
missing except of the first function processed.
Reviewers: vsk, morehouse
Reviewed By: vsk
Subscribers: llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D46478
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331801
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Neilson [Tue, 8 May 2018 19:08:12 +0000 (19:08 +0000)]
Changing constants in a test (NFC)
Summary:
Changing the lengths of the atomic memory intrinsics in a test to make sure
that they don't get lowered into loads/stores if/when expansion of these
occurs in selectiondag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331800
91177308-0d34-0410-b5e6-
96231b3b80d8
Hideki Saito [Tue, 8 May 2018 18:57:34 +0000 (18:57 +0000)]
[LV] Fix for PR37248, Broadcast codegen incorrectly assumed vector loop body is single basic block
Summary:
Broadcast code generation emitted instructions in pre-header, while the instruction they are dependent on in the vector loop body.
This resulted in an IL verification error ---- value used before defined.
Reviewers: rengolin, fhahn, hfinkel
Reviewed By: rengolin, fhahn
Subscribers: dcaballe, Ka-Ka, llvm-commits
Differential Revision: https://reviews.llvm.org/D46302
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331799
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Renouf [Tue, 8 May 2018 18:53:04 +0000 (18:53 +0000)]
[AMDGPU] Provide machine -> name mapping
Summary:
AMDGPU stores a numerical code for the particular GPU variant in EFlags
in the ELF file. This commit provides a mapping from that number into
the machine name for use by objdump-type tools.
Change-Id: Id37fc0bebad443bd89c0080985ce298c4e7e9319
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D46587
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331798
91177308-0d34-0410-b5e6-
96231b3b80d8
Lei Huang [Tue, 8 May 2018 18:52:06 +0000 (18:52 +0000)]
[Power9]Legalize and emit code for truncate and convert QP to HW and Byte
Legalize and emit code for truncate and convert float128 to (un)signed short
and (un)signed char.
Differential Revision: https://reviews.llvm.org/D46194
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331797
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 8 May 2018 18:43:44 +0000 (18:43 +0000)]
AMDGPU: Fix broken check lines in test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331796
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 8 May 2018 18:43:34 +0000 (18:43 +0000)]
AMDGPU: Don't use undef in a test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331795
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephane Sezer [Tue, 8 May 2018 18:43:27 +0000 (18:43 +0000)]
[docs] Fix a typo in KaleidoscopeJIT tutorial
Summary: Just a missing end quote.
Reviewers: lhames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D46136
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331794
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 8 May 2018 18:43:25 +0000 (18:43 +0000)]
AMDGPU: Fix broken dynamic vector indexing for packed types
The intention of this was to multiply by 16, not shift by 16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331793
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 8 May 2018 18:43:05 +0000 (18:43 +0000)]
DAG: Use correct shift width type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331792
91177308-0d34-0410-b5e6-
96231b3b80d8
Lei Huang [Tue, 8 May 2018 18:34:00 +0000 (18:34 +0000)]
[Power9]Legalize and emit code for truncate and convert Quad-Precision to Word
Legalize and emit code for:
* xscvqpswz : VSX Scalar truncate & Convert Quad-Precision to Signed Word
* xscvqpuwz : VSX Scalar truncate & Convert Quad-Precision to Unsigned Word
Differential Revision: https://reviews.llvm.org/D45635
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331790
91177308-0d34-0410-b5e6-
96231b3b80d8
Changpeng Fang [Tue, 8 May 2018 18:32:35 +0000 (18:32 +0000)]
AMDGPU: Use eraseFromParent to delete am instruction when it is no longer needed.
Reviewer: Nicolai
Differential Revision:
https://reviews.llvm.org/D46438
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331788
91177308-0d34-0410-b5e6-
96231b3b80d8
Lei Huang [Tue, 8 May 2018 18:23:31 +0000 (18:23 +0000)]
[Power9]Legalize and emit code for truncate and convert QP to DW
Legalize and emit code for:
* xscvqpsdz : VSX Scalar truncate & Convert Quad-Precision to Signed Dword
* xscvqpudz : VSX Scalar truncate & Convert Quad-Precision to Unsigned Dword
Differential Revision: https://reviews.llvm.org/D45553
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331787
91177308-0d34-0410-b5e6-
96231b3b80d8
Guozhi Wei [Tue, 8 May 2018 17:58:32 +0000 (17:58 +0000)]
[CodeGenPrepare] Move Extension Instructions Through Logical And Shift Instructions
CodeGenPrepare pass move extension instructions close to load instructions in different BB, so they can be combined later. But the extension instructions can't move through logical and shift instructions in current implementation. This patch enables this enhancement, so we can eliminate more extension instructions.
Differential Revision: https://reviews.llvm.org/D45537
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331783
91177308-0d34-0410-b5e6-
96231b3b80d8
Lei Huang [Tue, 8 May 2018 17:36:40 +0000 (17:36 +0000)]
[PowerPC] Unify handling for conversion of FP_TO_INT feeding a store
Existing DAG combine only handles conversions for FP_TO_SINT:
"{f32, f64} x { i32, i16 }"
This patch simplifies the code to handle:
"{ FP_TO_SINT, FP_TO_UINT } x { f64, f32 } x { i64, i32, i16, i8 }"
Differential Revision: https://reviews.llvm.org/D46102
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331778
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Shaposhnikov [Tue, 8 May 2018 17:12:54 +0000 (17:12 +0000)]
[llvm-objcopy] Fix exit code
Set the exit code to 1 if no arguments are specified.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D46547
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331776
91177308-0d34-0410-b5e6-
96231b3b80d8