Anton Korobeynikov [Thu, 10 Jan 2019 22:59:50 +0000 (22:59 +0000)]
[MSP430] Minor fixes/improvements for assembler/disassembler
* Teach AsmParser to recognize @rn in distination operand as 0(rn).
* Do not allow Disassembler decoding instructions that have size more
than a number of input bytes.
* Fix UB in MSP430MCCodeEmitter.
Patch by Kristina Bessonova!
Differential Revision: https://reviews.llvm.org/D56547
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350903
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Thu, 10 Jan 2019 22:54:53 +0000 (22:54 +0000)]
[MSP430] Add missing instruction forms
* Add missing mm, [r|m]n, [r|m]p instruction forms.
* Fix bit16mc instruction.
Patch by Kristina Bessonova!
Differential Revision: https://reviews.llvm.org/D56546
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350902
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Thu, 10 Jan 2019 22:32:11 +0000 (22:32 +0000)]
[WebAssembly] Add unimplemented-simd128 subtarget feature
Summary:
This is a third attempt, but this time we have vetted it on Windows
first. The previous errors were due to an uninitialized class member.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, sunfish, jfb, llvm-commits
Differential Revision: https://reviews.llvm.org/D56560
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350901
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Thu, 10 Jan 2019 22:05:21 +0000 (22:05 +0000)]
[llvm-objcopy] [COFF] Fix a test matching pathnames for Windows. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350899
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Thu, 10 Jan 2019 21:59:41 +0000 (21:59 +0000)]
[llvm-objcopy] [COFF] Fix warnings abuilt missing field initialization. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350898
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 10 Jan 2019 21:57:07 +0000 (21:57 +0000)]
gn build: Use "git rev-parse --git-dir" to discover the path to the .git directory.
This makes it compatible with worktrees.
Differential Revision: https://reviews.llvm.org/D56422
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350897
91177308-0d34-0410-b5e6-
96231b3b80d8
Gerolf Hoflehner [Thu, 10 Jan 2019 21:53:13 +0000 (21:53 +0000)]
[MachineCombiner][NFC] Prevent dereferencing past-the-end object in an MRI container
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350896
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Thu, 10 Jan 2019 21:47:15 +0000 (21:47 +0000)]
[MemorySSA] Disable checkClobberSanity for SkipSelfWalker.
Sanity will fail for this, since we're exploring getting a clobber
further than the sanity check expects.
Ideally we need to teach the sanity check to differentiate between the
two walkers based on the SkipSelf bool in the query.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350895
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 10 Jan 2019 21:47:10 +0000 (21:47 +0000)]
gn build: Merge r350893
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350894
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Thu, 10 Jan 2019 21:28:24 +0000 (21:28 +0000)]
[llvm-objcopy] [COFF] Add support for removing symbols
Differential Revision: https://reviews.llvm.org/D55881
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350893
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 10 Jan 2019 20:12:09 +0000 (20:12 +0000)]
Avoid use-after-free in ~LegacyRTDyldObjectLinkingLayer
Reviewers: lhames
Subscribers: mcrosier, jlebar, bixia, llvm-commits
Differential Revision: https://reviews.llvm.org/D56521
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350886
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Davis [Thu, 10 Jan 2019 19:56:03 +0000 (19:56 +0000)]
[GVN] Update BlockRPONumber prior to use.
Summary:
The original patch addressed the use of BlockRPONumber by forcing a sequence point when accessing that map in a conditional. In short we found cases where that map was being accessed with blocks that had not yet been added to that structure. For context, I've kept the wall of text below, to what we are trying to fix, by always ensuring a updated BlockRPONumber.
== Backstory ==
I was investigating an ICE (segfault accessing a DenseMap item). This failure happened non-deterministically, with no apparent reason and only on a Windows build of LLVM (from October 2018).
After looking into the crashes (multiple core files) and running DynamoRio, the cores and DynamoRio (DR) log pointed to the same code in `GVN::performScalarPRE()`. The values in the map are unsigned integers, the keys are `llvm::BasicBlock*`. Our test case that triggered this warning and periodic crash is rather involved. But the problematic line looks to be:
GVN.cpp: Line 2197
```
if (BlockRPONumber[P] >= BlockRPONumber[CurrentBlock] &&
```
To test things out, I cooked up a patch that accessed the items in the map outside of the condition, by forcing a sequence point between accesses. DynamoRio stopped warning of the issue, and the test didn't seem to crash after 1000+ runs.
My investigation was on an older version of LLVM, (source from October this year). What it looks like was occurring is the following, and the assembly from the latest pull of llvm in December seems to confirm this might still be an issue; however, I have not witnessed the crash on more recent builds. Of course the asm in question is generated from the host compiler on that Windows box (not clang), but it hints that we might want to consider how we access the BlockRPONumber map in this conditional (line 2197, listed above). In any case, I don't think the host compiler is wrong, rather I think it is pointing out a possibly latent bug in llvm.
1) There is no sequence point for the `>=` operation.
2) A call to a `DenseMapBase::operator[]` can have the side effect of the map reallocating a larger store (more Buckets, via a call to `DenseMap::grow`).
3) It seems perfectly legal for a host compiler to generate assembly that stores the result of a call to `operator[]` on the stack (that's what my host compile of GVN.cpp is doing) . A second call to `operator[]` //might// encourage the map to 'grow' thus making any pointers to the map's store invalid. The `>=` compares the first and second values. If the first happens to be a pointer produced from operator[], it could be invalid when dereferenced at the time of comparison.
The assembly generated from the Window's host compiler does show the result of the first access to the map via `operator[]` produces a pointer to an unsigned int. And that pointer is being stored on the stack. If a second call to the map (which does occur) causes the map to grow, that address (on the stack) is now invalid.
Reviewers: t.p.northover, efriedma
Reviewed By: efriedma
Subscribers: efriedma, llvm-commits
Differential Revision: https://reviews.llvm.org/D55974
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350880
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Thu, 10 Jan 2019 19:29:04 +0000 (19:29 +0000)]
Use MemorySSA in LICM to do sinking and hoisting.
Summary:
Step 2 in using MemorySSA in LICM:
Use MemorySSA in LICM to do sinking and hoisting, all under "EnableMSSALoopDependency" flag.
Promotion is disabled.
Enable flag in LICM sink/hoist tests to test correctness of this change. Moved one test which
relied on promotion, in order to test all sinking tests.
Reviewers: sanjoy, davide, gberry, george.burgess.iv
Subscribers: llvm-commits, Prazek
Differential Revision: https://reviews.llvm.org/D40375
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350879
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 10 Jan 2019 19:05:34 +0000 (19:05 +0000)]
[X86] Call SimplifyDemandedBits on conditions of X86ISD::SHRUNKBLEND
This extends to combineVSelectToShrunkBlend to be able to resimplify SHRUNKBLENDS that have already been created.
This should help some of the regressions from D56387
Differential Revision: https://reviews.llvm.org/D56421
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350875
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 10 Jan 2019 19:02:14 +0000 (19:02 +0000)]
[X86] Simplify the BRCOND handling for FCMP_UNE.
Despite what the comment says, FCMP_UNE would be an OR not an AND. In the lowering code the first branch created still goes to the original destination. The second branch was exchanged to go to where the subsequent unconditional branch went. This is different than what we do for FCMP_OEQ where both branches that we create go to the original unconditional branch.
As far as I can tell, I think this means we don't need to exchange the branch target with the unconditional branch for FCMP_UNE at all.
Differential Revision: https://reviews.llvm.org/D56309
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350873
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Thu, 10 Jan 2019 18:32:30 +0000 (18:32 +0000)]
[llvm-objdump][MachO] Fix test to work on Windows
This fails in http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/3208/steps/stage%201%20check/logs/stdio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350871
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Thu, 10 Jan 2019 17:47:44 +0000 (17:47 +0000)]
[lit] Make it possible for the lit test suite to pass with
`FILECHECK_OPTS=-v` set in the environment.
Follow up to r350850 as requested by Joel E. Denny in
https://reviews.llvm.org/D56541 .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350854
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Thu, 10 Jan 2019 17:36:54 +0000 (17:36 +0000)]
[llvm-objdump][MachO] Fix error reporting after r350848 and r350849
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350851
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Thu, 10 Jan 2019 17:24:06 +0000 (17:24 +0000)]
[FileCheck] Don't propagate `FILECHECK_DUMP_INPUT_ON_FAILURE` and
`FILECHECK_OPTS` into environment for FileCheck tests.
Summary:
This fixes the following FileCheck tests:
* FileCheck/dump-input-enable.txt
* FileCheck/match-full-lines.txt
when `FILECHECK_DUMP_INPUT_ON_FAILURE` is set in the environment.
By default llvm-lit propagates `FILECHECK_DUMP_INPUT_ON_FAILURE` and
`FILECHECK_OPTS` from llvm-lit's environment into the test environment.
Unfortunately this can break FileCheck's tests because they expect that
these environment variables not to be set.
rdar://problem/
47176262
Reviewers: jdenny, probinson, george.karpenkov
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D56541
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350850
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Thu, 10 Jan 2019 17:16:42 +0000 (17:16 +0000)]
[llvm-objdump][MachO] Use the -dsym file name when reporting errors
Instead of using the binary filename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350849
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Thu, 10 Jan 2019 17:16:37 +0000 (17:16 +0000)]
[llvm-objdump][MachO] Correctly handle the llvm::Error when -dsym has errors
In an assert build, the Error gets destroyed and we get "Program aborted
due to an unhandled Error:".
In release, we get an empty message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350848
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 10 Jan 2019 17:02:55 +0000 (17:02 +0000)]
[Docs] fix typo, adjust text order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350846
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 10 Jan 2019 16:57:28 +0000 (16:57 +0000)]
[Docs] add note to avoid 'errno' for better vectorization (PR40265)
This is a partial fix for the documentation improvements requested in:
https://bugs.llvm.org/show_bug.cgi?id=40265
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350845
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 10 Jan 2019 16:47:42 +0000 (16:47 +0000)]
[DAGCombiner] simplify code; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350844
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Thu, 10 Jan 2019 16:43:26 +0000 (16:43 +0000)]
Repair compilation of llvm-stress after r350835.
Apparently it doesn't get built by 'ninja check'. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350843
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Thu, 10 Jan 2019 16:25:47 +0000 (16:25 +0000)]
[SelectionDAGBuilder] Refactor GetRegistersForValue. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350841
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Thu, 10 Jan 2019 16:24:10 +0000 (16:24 +0000)]
[llvm-objdump] - Do not include reserved undefined symbol in -t output.
This is https://bugs.llvm.org/show_bug.cgi?id=26892,
GNU objdump hides the special symbol entry:
SYMBOL TABLE:
000000000000a7e0 l F .text
00000000000003f9 bi_copymodules
while llvm-objdump does not:
SYMBOL TABLE:
0000000000000000 *UND*
00000000
000000000000a7e0 l F .text
000003f9 bi_copymodules
Patch makes the behavior of the llvm-objdump to be consistent with the GNU objdump.
Differential revision: https://reviews.llvm.org/D56076
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350840
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Thu, 10 Jan 2019 16:22:19 +0000 (16:22 +0000)]
[SelectionDAGBuilder] Fix formatting. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350839
91177308-0d34-0410-b5e6-
96231b3b80d8
Neil Henning [Thu, 10 Jan 2019 16:21:08 +0000 (16:21 +0000)]
[AMDGPU] Fix dwordx3/southern-islands failures.
This commit fixes the dwordx3/southern-islands failures that were found
in bugzilla https://bugs.llvm.org/show_bug.cgi?id=40129, by not
generating the dwordx3 variants of load/store instructions that were
added to the ISA after southern islands.
Differential Revision: https://reviews.llvm.org/D56434
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350838
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Thu, 10 Jan 2019 16:18:18 +0000 (16:18 +0000)]
[SelectionDAGBuilder] Refactor visitInlineAsm. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350837
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Thu, 10 Jan 2019 16:07:20 +0000 (16:07 +0000)]
[opaque pointer types] Remove some calls to generic Type subtype accessors.
That is, remove many of the calls to Type::getNumContainedTypes(),
Type::subtypes(), and Type::getContainedType(N).
I'm not intending to remove these accessors -- they are
useful/necessary in some cases. However, removing the pointee type
from pointers would potentially break some uses, and reducing the
number of calls makes it easier to audit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350835
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitry Venikov [Thu, 10 Jan 2019 15:33:35 +0000 (15:33 +0000)]
[llvm-symbolizer] Add -p as alias to -pretty-print
Summary: Provides -p as a short alias for -pretty-print. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40076
Reviewers: samsonov, khemant, ruiu, rnk, fjricci, jhenderson
Reviewed By: jhenderson
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D56542
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350832
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 10 Jan 2019 15:33:17 +0000 (15:33 +0000)]
[RISCV][MC] Add support for evaluating constant symbols as immediates
This further improves compatibility with GNU as, allowing input such as the
following to be assembled:
.equ CONST, 0x123456
li a0, CONST
addi a0, a0, %lo(CONST)
.equ CONST, 1
slli a0, a0, CONST
Note that we don't have perfect compatibility with gas, as it will avoid
emitting a relocation in this case:
addi a0, a0, %lo(CONST2)
.equ CONST2, 0x123456
Thanks to Shiva Chen for suggesting a better way to approach this during review.
Differential Revision: https://reviews.llvm.org/D52298
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350831
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 10 Jan 2019 15:27:23 +0000 (15:27 +0000)]
[x86] fix remaining miscompile bug in horizontal binop matching (PR40243)
When we use the partial-matching function on a 128-bit chunk, we must
account for the possibility that we've matched undef halves of the
original source vectors, so the outputs may need to be reset.
This should allow closing PR40243:
https://bugs.llvm.org/show_bug.cgi?id=40243
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350830
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 10 Jan 2019 15:16:32 +0000 (15:16 +0000)]
gn build: Merge r350819
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350829
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 10 Jan 2019 15:04:52 +0000 (15:04 +0000)]
[x86] fix horizontal binop matching for 256-bit vectors (PR40243)
This is a partial fix for:
https://bugs.llvm.org/show_bug.cgi?id=40243
...as seen in the integer test, we still need to correct the result when using the
existing (old) horizontal op matching function because it does not model the way
x86 256-bit horizontal ops return results (each 128-bit half is its own horizontal-op).
A potential follow-up change for that is discussed in the bug report - see also D56490.
This generally duplicates a lot of the existing matching code, but we can't just remove
that without introducing regressions, so the existing code is renamed and used less often.
Follow-ups may try to reduce that overlap.
Differential Revision: https://reviews.llvm.org/D56450
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350826
91177308-0d34-0410-b5e6-
96231b3b80d8
Bryan Chan [Thu, 10 Jan 2019 15:02:37 +0000 (15:02 +0000)]
[AArch64] Fix operation actions for FP16 vector intrinsics
Summary:
This patch changes the legalization action for some half-precision floating-
point vector intrinsics (FSIN, FLOG, etc.) from Promote to Expand. These ops
are not supported in hardware for half-precision vectors, but promotion is
not always possible (for v8f16 operands). Changing the action to Expand fixes
an assertion failure in the legalizer when the frontend produces such ops.
In addition, a quick microbenchmark shows that, in the v4f16 case,
expanding introduces fewer spills and is therefore slightly faster than
promoting.
Reviewers: t.p.northover, SjoerdMeijer
Reviewed By: SjoerdMeijer
Subscribers: javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D56296
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350825
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Thu, 10 Jan 2019 14:55:26 +0000 (14:55 +0000)]
[llvm-objdump] - Implement -z/--disassemble-zeroes.
This is https://bugs.llvm.org/show_bug.cgi?id=37151,
GNU objdump spec says that "Normally the disassembly output will skip blocks of zeroes.",
but currently, llvm-objdump prints them.
The patch implements the -z/--disassemble-zeroes option and switches the default to always
skip blocks of zeroes.
Differential revision: https://reviews.llvm.org/D56083
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350823
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 10 Jan 2019 14:26:15 +0000 (14:26 +0000)]
[X86] Add SSE41 vector abs tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350822
91177308-0d34-0410-b5e6-
96231b3b80d8
James Henderson [Thu, 10 Jan 2019 14:10:02 +0000 (14:10 +0000)]
[llvm-symbolizer] Add support for specifying addresses on command-line
See https://bugs.llvm.org/show_bug.cgi?id=40070.
GNU addr2line accepts input addresses both on the command-line and via
stdin. llvm-symbolizer previously only supported the latter. This
change adds support for the former. As with addr2line, the new
behaviour is to only look for addresses on stdin if no positional
arguments were provided to llvm-symbolizer.
Reviewed by: ruiu
Differential Revision: https://reviews.llvm.org/D56272
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350821
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Thu, 10 Jan 2019 13:59:13 +0000 (13:59 +0000)]
[MCA] Fix wrong definition of ResourceUnitMask in DefaultResourceStrategy.
Field ResourceUnitMask was incorrectly defined as a 'const unsigned' mask. It
should have been a 64 bit quantity instead. That means, ResourceUnitMask was
always implicitly truncated to a 32 bit quantity.
This issue has been found by inspection. Surprisingly, that bug was latent, and
it never negatively affected any existing upstream targets.
This patch fixes the wrong definition of ResourceUnitMask, and adds a bunch of
extra debug prints to help debugging potential issues related to invalid
processor resource masks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350820
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Thu, 10 Jan 2019 10:47:23 +0000 (10:47 +0000)]
[ARM] Fix for verifier buildbot
Copy the MachineOperand first and then change the flags instead of
making a copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350811
91177308-0d34-0410-b5e6-
96231b3b80d8
Fedor Sergeev [Thu, 10 Jan 2019 10:01:53 +0000 (10:01 +0000)]
[LoopUnroll] add parsing for unroll parameters in -passes pipeline
Allow to specify loop-unrolling with optional parameters explicitly
spelled out in -passes pipeline specification.
Introducing somewhat generic way of specifying parameters parsing via
FUNCTION_PASS_PARAMETRIZED pass registration.
Syntax of parametrized unroll pass name is as follows:
'unroll<' parameter-list '>'
Where parameter-list is ';'-separate list of parameter names and optlevel
optlevel: 'O[0-3]'
parameter: { 'partial' | 'peeling' | 'runtime' | 'upperbound' }
negated: 'no-' parameter
Example:
-passes=loop(unroll<O3;runtime;no-upperbound>)
this invokes LoopUnrollPass configured with OptLevel=3,
Runtime, no UpperBound, everything else by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350808
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Pettersson [Thu, 10 Jan 2019 09:58:23 +0000 (09:58 +0000)]
Fix RUN line in test/Transforms/LoopDeletion/crashbc.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350807
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Thu, 10 Jan 2019 08:36:33 +0000 (08:36 +0000)]
[ARM] Size reduce teq to eors
Add t2TEQrr to the map of instructions with can be reduced down into
a T1 instruction. This is a special case because TEQ just sets the
CPSR and doesn't write to a GPR, which is not the case for EOR. So,
we need to ensure that the EOR can write to the first operand.
Differential Revision: https://reviews.llvm.org/D56255
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350801
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 10 Jan 2019 07:43:54 +0000 (07:43 +0000)]
[X86] Disable DomainReassignment pass when AVX512BW is disabled to avoid injecting VK32/VK64 references into the MachineIR
Summary:
This pass replaces GR8/GR16/GR32/GR64 with their equivalent sized mask register classes. But VK32/VK64 aren't legal without AVX512BW. Apparently this mostly appears to work if the register coalescer is able to remove the VK32/VK64 register class reference. Or if we don't ever spill it. But there's no guarantee of that.
Another Intel employee managed to trigger a crash due to this with ISPC. Unfortunately, I've lost the test case he sent me at the time. I'm trying to get him to reproduce it for me. I'd like to get this in before 8.0 branches since its a little scary.
The regressions here are unfortunate, but I think we can make some improvements to DAG combine, load folding, etc. to fix them. Just not sure if we can get that done for 8.0.
Fixes PR39741
Reviewers: RKSimon, spatel
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D56460
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350800
91177308-0d34-0410-b5e6-
96231b3b80d8
Zi Xuan Wu [Thu, 10 Jan 2019 06:20:14 +0000 (06:20 +0000)]
Recommit "[PowerPC] Fix assert from machine verify pass that unmatched register class about fcmp selection in fast-isel"
This re-commit r350685.
Differential Revision: https://reviews.llvm.org/D55686
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350799
91177308-0d34-0410-b5e6-
96231b3b80d8
Mandeep Singh Grang [Thu, 10 Jan 2019 04:59:44 +0000 (04:59 +0000)]
[AArch64] Emit the correct MCExpr relocations specifiers like VK_ABS_G0, etc
Summary:
D55896 and D56029 add support to emit fixups for :abs_g0: , :abs_g1_s: , etc.
This patch adds the necessary enums and MCExpr needed for lowering these.
Reviewers: rnk, mstorsjo, efriedma
Reviewed By: efriedma
Subscribers: javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D56037
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350798
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Thu, 10 Jan 2019 04:09:25 +0000 (04:09 +0000)]
Revert "[WebAssembly] Add simd128-unimplemented subtarget feature"
This reverts rL350791.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350795
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Thu, 10 Jan 2019 03:25:20 +0000 (03:25 +0000)]
[AMDGPU] Separate feature dot-insts
Differential Revision: https://reviews.llvm.org/D56524
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350793
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Thu, 10 Jan 2019 02:55:52 +0000 (02:55 +0000)]
[WebAssembly] Add simd128-unimplemented subtarget feature
This is a second attempt at r350778, which was reverted in
r350789. The only change is that the unimplemented-simd128 feature has
been renamed simd128-unimplemented, since naming it
unimplemented-simd128 somehow made the simd128 feature flag enable the
unimplemented-simd128 feature on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350791
91177308-0d34-0410-b5e6-
96231b3b80d8
Jorge Gorbe Moya [Thu, 10 Jan 2019 01:51:54 +0000 (01:51 +0000)]
Revert "Fix go bindings for r350647: missed a function rename"
This reverts commit
a74266858a8164cfb23d4e138cd4c7c37be0b5d1. SVN revision r350657.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350790
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Thu, 10 Jan 2019 01:37:44 +0000 (01:37 +0000)]
Revert "[WebAssembly] Add unimplemented-simd128 subtarget feature"
This reverts L350778.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350789
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Thu, 10 Jan 2019 00:16:54 +0000 (00:16 +0000)]
[MemorySSA] Remove optimized value when reseting optimized.
Summary:
If we don't reset the optimized value O for access A, even though A is no longer optimized to O, A will still show up in that O's users list.
This fails verification when hoisting a Def outside a loop, even though the updates are correct.
The reason is that the phi in the loop header still find as user the hoisted def, because the Def has a pointer to the Phi in its optimized operand.
Reviewers: george.burgess.iv
Subscribers: sanjoy, jlebar, Prazek, llvm-commits
Differential Revision: https://reviews.llvm.org/D56467
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350783
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 10 Jan 2019 00:14:27 +0000 (00:14 +0000)]
[X86] After turning VSELECT into SHRUNKBLEND, make we push the VSELECT into the worklist so it can be deleted.
Found while trying to figure out why my second version of D56421 worked better than the first version. We weren't deleting the vselect in a timely fashion and that caused SimplfyDemandedBit to see an additional user.
The new version doesn't have this problem so this fix isn't needed there, but seemed like the right thing to do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350781
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Wed, 9 Jan 2019 23:59:37 +0000 (23:59 +0000)]
[WebAssembly] Add unimplemented-simd128 subtarget feature
Summary:
This replaces the old ad-hoc -wasm-enable-unimplemented-simd
flag. Also makes the new unimplemented-simd128 feature imply the
simd128 feature.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits, alexcrichton
Differential Revision: https://reviews.llvm.org/D56501
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350778
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 9 Jan 2019 23:57:15 +0000 (23:57 +0000)]
[llvm-mca] Display masks in hex
Display the resources masks as hexadecimal. Otherwise, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350777
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 9 Jan 2019 23:39:26 +0000 (23:39 +0000)]
[SimplifyLibCalls] Fix memchr expansion for constant strings.
The C standard says "The memchr function locates the first
occurrence of c (converted to an unsigned char)[...]". The expansion
was missing the conversion to unsigned char.
Fixes https://bugs.llvm.org/show_bug.cgi?id=39041 .
Differential Revision: https://reviews.llvm.org/D55947
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350775
91177308-0d34-0410-b5e6-
96231b3b80d8
David Major [Wed, 9 Jan 2019 23:36:32 +0000 (23:36 +0000)]
Don't require a null terminator when loading objects
When a null terminator is required and the file size is a multiple of the system page size, MemoryBuffer will prefer pread() over mmap(), which can result in excessive memory usage.
Patch by Mike Hommey!
Differential Revision: https://reviews.llvm.org/D56475
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350774
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Wed, 9 Jan 2019 23:05:21 +0000 (23:05 +0000)]
[WebAssembly] Print a debug message at the start of each pass
Summary:
Looks like many passes print its pass description as a debug message at
the start of each pass, so added that to (mostly newly added) other
passes as well.
Reviewers: dschuff
Subscribers: jgravelle-google, sbc100, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D56142
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350771
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 9 Jan 2019 21:04:36 +0000 (21:04 +0000)]
[AArch64] Add test for constant shrinking with multiple users (NFC).
Test to avoid regression fixed by rL350684.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350762
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Wed, 9 Jan 2019 20:10:27 +0000 (20:10 +0000)]
Refactor synthetic profile count computation. NFC.
Summary:
Instead of using two separate callbacks to return the entry count and the
relative block frequency, use a single callback to return callsite
count. This would allow better supporting hybrid mode in the future as
the count of callsite need not always be derived from entry count (as in
sample PGO).
Reviewers: davidxl
Subscribers: mehdi_amini, steven_wu, dexonsmith, dang, llvm-commits
Differential Revision: https://reviews.llvm.org/D56464
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350755
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Wed, 9 Jan 2019 19:46:15 +0000 (19:46 +0000)]
[CodeGen] Ignore return sext/zext attributes of unused results for tail calls
If the caller's return type does not have a zeroext attribute but the
callee does a tail call zeroext, we won't consider the tail call during
CodeGenPrepare because the attributes don't match.
However, if the result of the tail call has no uses, it makes sense to
drop the sext/zext attributes.
Differential Revision: https://reviews.llvm.org/D56486
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350753
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Wed, 9 Jan 2019 19:26:17 +0000 (19:26 +0000)]
[Inliner] Assert that the computed inline threshold is non-negative.
Reviewers: chandlerc
Subscribers: haicheng, llvm-commits
Differential Revision: https://reviews.llvm.org/D56409
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350751
91177308-0d34-0410-b5e6-
96231b3b80d8
David Callahan [Wed, 9 Jan 2019 19:12:38 +0000 (19:12 +0000)]
refactor BlockFrequencyInfo::view to take a title parameter
Summary: All a non-default title for the debugging this debugging aide
Reviewers: twoh, Kader, modocache
Reviewed By: twoh
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D56499
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350749
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 9 Jan 2019 18:59:56 +0000 (18:59 +0000)]
Fix visualization of intrusive reference counted objects in MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350748
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Wed, 9 Jan 2019 18:13:11 +0000 (18:13 +0000)]
[WebAssembly] Standardize order of SIMD bitselect arguments
Summary:
For some reason the backend assumed that the condition mask would be
the first argument to the LLVM intrinsic, but everywhere else the
condition mask is the third argument.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D56412
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350746
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 9 Jan 2019 17:29:18 +0000 (17:29 +0000)]
[x86] use 'nounwind' to remove test noise; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350745
91177308-0d34-0410-b5e6-
96231b3b80d8
Hubert Tong [Wed, 9 Jan 2019 16:00:39 +0000 (16:00 +0000)]
[unittests][Support] AIX: Skip sticky bit file tests
On AIX, attempting (without root) to set the sticky bit on a file with
the `chmod` utility will give:
```
chmod: not all requested changes were made to <file>
```
The same occurs when modifying other permission bits on a file with the
sticky bit already set.
It seems that the `chmod` function will report success despite failing
to set the sticky bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350735
91177308-0d34-0410-b5e6-
96231b3b80d8
Aleksandar Beserminji [Wed, 9 Jan 2019 15:58:02 +0000 (15:58 +0000)]
[mips][micrompis] Emit 16bit NOPs by default
Emit 16bit NOPs by default.
Use 32bit NOPs in delay slots where necessary.
Differential https://reviews.llvm.org/D55323
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350733
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Wed, 9 Jan 2019 15:41:44 +0000 (15:41 +0000)]
[DEBUGINFO][NVPTX]Make tests more strict, NFC.
NVPTX format requires that no labels/label arithmetics is used in the
debug info sections. To avoid possible problems with the adding/modifying the debug info functionality, made these tests more strict.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350731
91177308-0d34-0410-b5e6-
96231b3b80d8
Valery Pykhtin [Wed, 9 Jan 2019 15:21:53 +0000 (15:21 +0000)]
Revert "[AMDGPU] Fix DPP combiner"
This reverts commit
e3e2923a39cbec3b3bc3a7d3f0e9a77a4115080e, svn revision rL350721
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350730
91177308-0d34-0410-b5e6-
96231b3b80d8
Kristof Beyls [Wed, 9 Jan 2019 15:13:34 +0000 (15:13 +0000)]
Initial AArch64 SLH implementation.
This is an initial implementation for Speculative Load Hardening for
AArch64. It builds on top of the recently introduced
AArch64SpeculationHardening pass.
This doesn't implement (yet) some of the optimizations implemented for
the X86SpeculativeLoadHardening pass. I thought introducing the
optimizations incrementally in follow-up patches should make this easier
to review.
Differential Revision: https://reviews.llvm.org/D55929
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350729
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Wed, 9 Jan 2019 14:43:33 +0000 (14:43 +0000)]
[llvm-objdump] - Print symbol addressed when dumping disassembly output (-d)
When GNU objdump dumps the input with -d it prints the symbol addresses,
for example:
0000000000000031 <foo>:
31: 00 00 add %al,(%rax)
...
llvm-objdump currently does not do that.
Patch changes the behavior to match the GNU objdump.
That is useful for implementing -z/--disassemble-zeroes (D56083),
it allows omitting first zero bytes and keep the information
about the symbol address in the output.
Differential revision: https://reviews.llvm.org/D56123
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350726
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 9 Jan 2019 14:20:20 +0000 (14:20 +0000)]
Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350725
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 9 Jan 2019 13:46:14 +0000 (13:46 +0000)]
[X86][SSE] Cleanup shuffle combining test check prefixes
Share prefixes whenever possible, use X86 instead of X32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350722
91177308-0d34-0410-b5e6-
96231b3b80d8
Valery Pykhtin [Wed, 9 Jan 2019 13:43:32 +0000 (13:43 +0000)]
[AMDGPU] Fix DPP combiner
Fixed issue with identity values and other cases, f32/f16 identity values to be added later. fma/mac instructions is disabled for now.
Test is fully reworked, added comments. Other fixes:
1. dpp move with uses and old reg initializer should be in the same BB.
2. bound_ctrl:0 is only considered when bank_mask and row_mask are fully enabled (0xF). Othervise the old register value is checked for identity.
3. Added add, subrev, and, or instructions to the old folding function.
4. Kill flag is cleared for the src0 (DPP register) as it may be copied into more than one user.
Differential revision: https://reviews.llvm.org/D55444
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350721
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 9 Jan 2019 13:32:16 +0000 (13:32 +0000)]
Revert r350647: "[NewPM] Port tsan"
This patch breaks thread sanitizer on some macOS builders, e.g.
http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/52725/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350719
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 9 Jan 2019 13:23:28 +0000 (13:23 +0000)]
[X86] Enable combining shuffles to PACKSS/PACKUS for 256/512-bit vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350716
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 9 Jan 2019 13:03:01 +0000 (13:03 +0000)]
[MSP430] Optimize 'shl x, 8[+ N] -> swpb(zext(x)) [<< N]' for i16
Perform additional simplification to reduce shift amount.
Patch by Kristina Bessonova!
Differential Revision: https://reviews.llvm.org/D56016
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350712
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 9 Jan 2019 12:57:52 +0000 (12:57 +0000)]
[gn build] Run `git ls-files '*.gn' '*.gni' | xargs -n 1 gn format`
Looks like I forgot to do that for the PowerPC target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350711
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 9 Jan 2019 12:52:15 +0000 (12:52 +0000)]
[MSP430] Fix crash while lowering llvm.stacksave/stackrestore
Perform the usual expansion of stacksave / restore intrinsics.
Patch by Kristina Bessonova!
Differential Revision: https://reviews.llvm.org/D54890
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350710
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 9 Jan 2019 12:48:06 +0000 (12:48 +0000)]
[gn build] Merge r350669
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350709
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 9 Jan 2019 12:46:04 +0000 (12:46 +0000)]
[gn build] Add a TODO.txt file
Differential Revision: https://reviews.llvm.org/D56420
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350708
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 9 Jan 2019 12:34:10 +0000 (12:34 +0000)]
[X86] Add extra test coverage for combining shuffles to PACKSS/PACKUS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350707
91177308-0d34-0410-b5e6-
96231b3b80d8
Diogo N. Sampaio [Wed, 9 Jan 2019 11:24:15 +0000 (11:24 +0000)]
[AArch64] Move feature predctrl to predres
Follow up patch of rL350385, for adding predres
command line option. This patch renames the
feature as to keep it aligned with the option
passed by/to clang
Differential Revision: https://reviews.llvm.org/D56484
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350702
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 9 Jan 2019 11:18:49 +0000 (11:18 +0000)]
[X86] Fix gcc7 -Wunused-but-set-variable warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350701
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Wed, 9 Jan 2019 10:49:44 +0000 (10:49 +0000)]
Make the write_cmake_config.py script python3-compatible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350700
91177308-0d34-0410-b5e6-
96231b3b80d8
David Stenberg [Wed, 9 Jan 2019 09:58:59 +0000 (09:58 +0000)]
[DebugInfo] Omit location list entries with empty ranges
Summary:
This fixes PR39710. In that case we emitted a location list looking like
this:
.Ldebug_loc0:
.quad .Lfunc_begin0-.Lfunc_begin0
.quad .Lfunc_begin0-.Lfunc_begin0
.short 1 # Loc expr size
.byte 85 # DW_OP_reg5
.quad .Lfunc_begin0-.Lfunc_begin0
.quad .Lfunc_end0-.Lfunc_begin0
.short 1 # Loc expr size
.byte 85 # super-register DW_OP_reg5
.quad 0
.quad 0
As seen, the first entry's beginning and ending addresses evalute to 0,
which meant that the entry inadvertently became an "end of list" entry,
resulting in the location list ending sooner than expected.
To fix this, omit all entries with empty ranges. Location list entries
with empty ranges do not have any effect, as specified by DWARF, so we
might as well drop them:
"A location list entry (but not a base address selection or end of list
entry) whose beginning and ending addresses are equal has no effect
because the size of the range covered by such an entry is zero."
Reviewers: davide, aprantl, dblaikie
Reviewed By: aprantl
Subscribers: javed.absar, JDevlieghere, llvm-commits
Tags: #debug-info
Differential Revision: https://reviews.llvm.org/D55919
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350698
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 9 Jan 2019 07:51:52 +0000 (07:51 +0000)]
GlobalISel: Implement fewerElements for implicit_def
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350697
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 9 Jan 2019 07:34:14 +0000 (07:34 +0000)]
GlobalISel: Implement widenScalar for implicit_def
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350695
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Wed, 9 Jan 2019 07:28:13 +0000 (07:28 +0000)]
[IPT] Drop cache less eagerly in GVN and LoopSafetyInfo
Current strategy of dropping `InstructionPrecedenceTracking` cache is to
invalidate the entire basic block whenever we change its contents. In fact,
`InstructionPrecedenceTracking` has 2 internal strictures: `OrderedInstructions`
that is needed to be invalidated whenever the contents changes, and the map
with first special instructions in block. This second map does not need an
update if we add/remove a non-special instuction because it cannot
affect the contents of this map.
This patch changes API of `InstructionPrecedenceTracking` so that it now
accounts for reasons under which we invalidate blocks. This should lead
to much less recalculations of the map and should save us some compile time
because in practice we don't typically add/remove special instructions.
Differential Revision: https://reviews.llvm.org/D54462
Reviewed By: efriedma
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350694
91177308-0d34-0410-b5e6-
96231b3b80d8
Zi Xuan Wu [Wed, 9 Jan 2019 06:12:24 +0000 (06:12 +0000)]
Revert "[PowerPC] Fix assert from machine verify pass that unmatched register class about fcmp selection in fast-isel"
This reverts commit r350685.
See compile assert in compiler-rt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350693
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Inoue [Wed, 9 Jan 2019 05:11:10 +0000 (05:11 +0000)]
[NFC] fix trivial typos in comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350690
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 9 Jan 2019 04:39:29 +0000 (04:39 +0000)]
gn build: Copy file permissions from input file in configure_file() emulation.
Most significantly, this makes bin/llvm-lit executable so that it
can be run in the usual way.
Differential Revision: https://reviews.llvm.org/D56423
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350688
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 9 Jan 2019 04:21:12 +0000 (04:21 +0000)]
[X86] Correct the MaskVT for avx512 gather/scatter intrinsics to use the min of the number of index and data elements.
When the result type is v2i64/v2f64 and the index element size is i32, the index vector has two unused elements making the type v4i32. The mask VT should match the number of memory accesses that will be made.
This is consistent with the isel patterns used for the target independent gather/scatter intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350687
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 9 Jan 2019 04:05:07 +0000 (04:05 +0000)]
gn build: Fix a Python2ism in write_vcsrevision.py.
Convert the output of "git rev-parse --short HEAD" to a string before
substituting it into the output file. Without this the output file
will look like this on Python 3:
#define LLVM_REVISION "git-b'
6a4895a025f'"
Differential Revision: https://reviews.llvm.org/D56459
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350686
91177308-0d34-0410-b5e6-
96231b3b80d8
Zi Xuan Wu [Wed, 9 Jan 2019 02:31:10 +0000 (02:31 +0000)]
[PowerPC] Fix assert from machine verify pass that unmatched register class about fcmp selection in fast-isel
Bad machine code: Illegal virtual register for instruction
function: TestULE
basic block: %bb.0 entry (0x1000a39b158)
instruction: %2:crrc = FCMPUD %1:vsfrc, %3:f8rc
operand 1: %1:vsfrc
Fix assert about missing match between fcmp instruction and register class.
We should use vsx related cmp instruction xvcmpudp instead of fcmpu when vsx is opened.
add -verifymachineinstrs option into related test cases to enable the verify pass.
Differential Revision: https://reviews.llvm.org/D55686
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350685
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Wed, 9 Jan 2019 02:24:22 +0000 (02:24 +0000)]
Remove check for single use in ShrinkDemandedConstant
This removes check for single use from general ShrinkDemandedConstant
to the BE because of the AArch64 regression after D56289/rL350475.
After several hours of experiments I did not come up with a testcase
failing on any other targets if check is not performed.
Moreover, direct call to ShrinkDemandedConstant is not really needed
and superceed by SimplifyDemandedBits.
Differential Revision: https://reviews.llvm.org/D56406
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350684
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 8 Jan 2019 23:22:18 +0000 (23:22 +0000)]
RegisterCoalescer: Assume CR_Replace for SubRangeJoin
Currently it's possible for following
check on V.WriteLanes (which is not really meaningful
during SubRangeJoin) to pass for one half of the pair,
and then fall through to to one of the impossible
or unresolved states. This then fails as inconsistent
on the other half.
During the main range join, the check between V.WriteLanes
and OtherV.ValidLanes must have passed, meaning this
should be a CR_Replace.
Fixes most of the testcases in bugs 39542 and 39602
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350678
91177308-0d34-0410-b5e6-
96231b3b80d8