OSDN Git Service
Jonas Devlieghere [Fri, 8 Feb 2019 18:43:11 +0000 (18:43 +0000)]
[test] Run the verifier for dsymutil module tests
Dsymutil has an option "verify" that runs the dwarf verifier on the
generated dSYM. This patch enables this for the module tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353544
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 8 Feb 2019 17:19:01 +0000 (17:19 +0000)]
[TargetLowering] Add SimplifyDemandedBits funnel shift support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353539
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Fri, 8 Feb 2019 17:08:27 +0000 (17:08 +0000)]
ArgumentPromotion should copy all metadata to new Function
Summary:
ArgumentPromotion had code to specifically move the dbg metadata over to
the new function, but other metadata such as the function_entry_count
!prof metadata was not. Replace code that moved dbg metadata with a call
to copyMetadata. The old metadata is automatically removed when the old
Function is removed.
Reviewers: davidxl
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57846
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353537
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 8 Feb 2019 17:07:54 +0000 (17:07 +0000)]
[X86] Remove isReMaterializable from X87 floating point constant loads and constant pool loads.
Summary: These instructions update FPSW so they aren't generically safe to rematerialize into any location if FPSW is live for a comparison result. They also use FPCW for exception masking control. Though the only exception they can generate is stack overflow and we manage the stack ourselves so that's not really going to occur.
Reviewers: RKSimon, spatel
Reviewed By: RKSimon
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57934
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353536
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 8 Feb 2019 16:51:16 +0000 (16:51 +0000)]
[X86] Add basic funnel shift demanded bits tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353534
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 8 Feb 2019 16:48:40 +0000 (16:48 +0000)]
[x86] fix formatting; NFC
(test commit #2 migrating to git)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353533
91177308-0d34-0410-b5e6-
96231b3b80d8
Carl Ritson [Fri, 8 Feb 2019 15:41:11 +0000 (15:41 +0000)]
[AMDGPU] Fix CS scratch setup on pre-GCN3 ASICs
Summary:
Prior to GCN3 s_load_dword offsets are in dwords rather than bytes.
Thus the scratch buffer descriptor offset must be adjusted for pre-GCN3 ASICs.
Reviewers: nhaehnle, tpr
Reviewed By: nhaehnle
Subscribers: sheredom, arsenm, kzhuravl, jvesely, wdng, yaxunl, dstuttard, t-tye, jfb, llvm-commits
Differential Revision: https://reviews.llvm.org/D56496
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353530
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Fri, 8 Feb 2019 15:21:13 +0000 (15:21 +0000)]
Revert r353416 "[DAG] Cleanup unused nodes on failed store-to-load forward combine."
This cleanup causes out-of-tree crashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353527
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 8 Feb 2019 15:06:24 +0000 (15:06 +0000)]
AMDGPU/GlobalISel: Fix shift legalization for non-power-of-2
clampScalar doesn't do anything for non-power-of-2 in range.
There should probably be a combination rule to reduce the number
of matching rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353526
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitry Preobrazhensky [Fri, 8 Feb 2019 14:57:37 +0000 (14:57 +0000)]
[AMDGPU][MC] Added support of lds_direct operand
See bug 39293: https://bugs.llvm.org/show_bug.cgi?id=39293
Reviewers: artem.tamazov, rampitec
Differential Revision: https://reviews.llvm.org/D57889
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353524
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 8 Feb 2019 14:46:27 +0000 (14:46 +0000)]
AMDGPU/GlobalISel: Fix non-power-of-2 implicit_def
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353522
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Fri, 8 Feb 2019 14:37:54 +0000 (14:37 +0000)]
[llvm-objcopy] Add few file processing directives
Differential revision: https://reviews.llvm.org/D57877
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353521
91177308-0d34-0410-b5e6-
96231b3b80d8
Petar Avramovic [Fri, 8 Feb 2019 14:27:23 +0000 (14:27 +0000)]
[MIPS GlobalISel] Select any extending load and truncating store
Make behavior of G_LOAD in widenScalar same as for G_ZEXTLOAD and
G_SEXTLOAD. That is perform widenScalarDst to size given by the target
and avoid additional checks in common code. Targets can reorder or add
additional rules in LegalizeRuleSet for the opcode to achieve desired
behavior.
Select extending load that does not have specified type of extension
into zero extending load.
Select truncating store that stores number of bytes indicated by size
in MachineMemoperand.
Differential Revision: https://reviews.llvm.org/D57454
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353520
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Fri, 8 Feb 2019 14:19:54 +0000 (14:19 +0000)]
gn build: Merge r353471, r353373.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353518
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 8 Feb 2019 14:16:11 +0000 (14:16 +0000)]
AMDGPU/GlobalISel: Don't use a copy in addrspacecast lowering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353516
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitry Preobrazhensky [Fri, 8 Feb 2019 13:51:31 +0000 (13:51 +0000)]
[AMDGPU][MC][CODEOBJECT] Added predefined symbols to access GPU minor and stepping numbers
Added the following Code Object v3 symbols:
.amdgcn.gfx_generation_minor
.amdgcn.gfx_generation_stepping
Reviewers: artem.tamazov, kzhuravl
Differential Revision: https://reviews.llvm.org/D57826
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353515
91177308-0d34-0410-b5e6-
96231b3b80d8
Valery Pykhtin [Fri, 8 Feb 2019 11:59:48 +0000 (11:59 +0000)]
[AMDGPU] Fix DPP combiner
Differential revision: https://reviews.llvm.org/D55444
dpp move with uses and old reg initializer should be in the same BB.
bound_ctrl:0 is only considered when bank_mask and row_mask are fully enabled (0xF). Otherwise the old register value is checked for identity.
Added add, subrev, and, or instructions to the old folding function.
Kill flag is cleared for the src0 (DPP register) as it may be copied into more than one user.
The pass is still disabled by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353513
91177308-0d34-0410-b5e6-
96231b3b80d8
Carlos Alberto Enciso [Fri, 8 Feb 2019 10:57:26 +0000 (10:57 +0000)]
[DWARF] LLVM ERROR: Broken function found, while removing Debug Intrinsics.
Check that when SimplifyCFG is flattening a 'br', all their debug intrinsic instructions are removed, including any dbg.label referencing a label associated with the basic blocks being removed.
Differential Revision: https://reviews.llvm.org/D57444
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353511
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Fri, 8 Feb 2019 10:51:08 +0000 (10:51 +0000)]
Attempt to fix build bot after r353509
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353510
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Fri, 8 Feb 2019 10:33:16 +0000 (10:33 +0000)]
[llvm-objcopy] Add --redefine-syms
Differential revision: https://reviews.llvm.org/D57738
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353509
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 8 Feb 2019 10:16:45 +0000 (10:16 +0000)]
Revert r353424 "[llvm-ar][libObject] Fix relative paths when nesting thin archives."
This broke the Chromium build on Windows, see https://crbug.com/930058
> Summary:
> When adding one thin archive to another, we currently chop off the relative path to the flattened members. For instance, when adding `foo/child.a` (which contains `x.txt`) to `parent.a`, whe
> lattening it we should add it as `foo/x.txt` (which exists) instead of `x.txt` (which does not exist).
>
> As a note, this also undoes the `IsNew` parameter of handling relative paths in r288280. The unit test there still passes.
>
> This was reported as part of testing the kernel build with llvm-ar: https://patchwork.kernel.org/patch/
10767545/ (see the second point).
>
> Reviewers: mstorsjo, pcc, ruiu, davide, david2050
>
> Subscribers: hiraditya, llvm-commits
>
> Tags: #llvm
>
> Differential Revision: https://reviews.llvm.org/D57842
This reverts commit
bf990ab5aab03aa0aac53c9ef47ef264307804ed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353507
91177308-0d34-0410-b5e6-
96231b3b80d8
Petar Avramovic [Fri, 8 Feb 2019 10:11:33 +0000 (10:11 +0000)]
[MIPS GlobalISel] Select mul
Legalize and select G_MUL for s32 and smaller types for MIPS32.
Differential Revision: https://reviews.llvm.org/D57816
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353506
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Fri, 8 Feb 2019 08:12:41 +0000 (08:12 +0000)]
[LoopSimplifyCFG] Use DTU.applyUpdates instead of insert/deleteEdge
`insert/deleteEdge` methods in DTU can make updates incorrectly in some cases
(see https://bugs.llvm.org/show_bug.cgi?id=40528), and it is recommended to
use `applyUpdates` methods instead when it is needed to make a mass update in CFG.
Differential Revision: https://reviews.llvm.org/D57316
Reviewed By: kuhar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353502
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Fri, 8 Feb 2019 07:57:42 +0000 (07:57 +0000)]
[ARM] Add OptMinSize to ARMSubtarget
In many places in the backend, we like to know whether we're
optimising for code size and this is performed by checking the
current machine function attributes. A subtarget is created on a
per-function basis, so it's possible to know when we're compiling for
code size on construction so record this in the new object.
Differential Revision: https://reviews.llvm.org/D57812
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353501
91177308-0d34-0410-b5e6-
96231b3b80d8
Sergey Dmitriev [Fri, 8 Feb 2019 06:55:18 +0000 (06:55 +0000)]
[CodeExtractor] Update function's assumption cache after extracting blocks from it
Summary: Assumption cache's self-updating mechanism does not correctly handle the case when blocks are extracted from the function by the CodeExtractor. As a result function's assumption cache may have stale references to the llvm.assume calls that were moved to the outlined function. This patch fixes this problem by removing extracted llvm.assume calls from the function’s assumption cache.
Reviewers: hfinkel, vsk, fhahn, davidxl, sanjoy
Reviewed By: hfinkel, vsk
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57215
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353500
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Fri, 8 Feb 2019 04:06:56 +0000 (04:06 +0000)]
[WebAssembly] Fix parseImmediate's memory alignment requirement
This fixes the current failure in the x86-64 ubsan bot caused by
r353496.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353499
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Nandakumar [Fri, 8 Feb 2019 03:32:46 +0000 (03:32 +0000)]
[GISel]: While constructing the GISelWorklist make sure we reserve at least the required size to the underlying dense map.
https://reviews.llvm.org/D57931
This should save some unnecessary growing of the DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353498
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 8 Feb 2019 02:40:47 +0000 (02:40 +0000)]
AMDGPU/GlobalISel: Legalize addrspacecast
Use a placeholder constant for now on targets
that need the load from the queue ptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353497
91177308-0d34-0410-b5e6-
96231b3b80d8
Wouter van Oortmerssen [Fri, 8 Feb 2019 01:43:23 +0000 (01:43 +0000)]
[WebAssembly] Fixed Disassembler ignoring endian swap on big endian.
Summary: This fixes: https://bugs.llvm.org/show_bug.cgi?id=40620
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57933
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353496
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 8 Feb 2019 01:14:12 +0000 (01:14 +0000)]
Fix the lowering issue of intrinsics llvm.localaddress on X86
Patch by Yuanke Luo
Reviewers: craig.topper, annita.zhang, smaslov, rnk, wxiao3
Reviewed By: rnk
Subscribers: efriedma, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57501
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353492
91177308-0d34-0410-b5e6-
96231b3b80d8
Caroline Tice [Fri, 8 Feb 2019 00:51:33 +0000 (00:51 +0000)]
lvm-dwarfdump: Stop counting out-of-line subprogram in the "inlined functions" statistic.
DW_TAG_subprogram DIEs should not be counted in the inlined function statistic. This also addresses the source variables count, as that uses the inlined function count in its calculations.
Differential revision: https://reviews.llvm.org/D57849
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353491
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 8 Feb 2019 00:44:39 +0000 (00:44 +0000)]
[X86] Add FPCW as a register and start using it as an implicit use on floating point instructions.
Summary:
FPCW contains the rounding mode control which we manipulate to implement fp to integer conversion by changing the roudning mode, storing the value to the stack, and then changing the rounding mode back. Because we didn't model FPCW and its dependency chain, other instructions could be scheduled into the middle of the sequence.
This patch introduces the register and adds it as an implciit def of FLDCW and implicit use of the FP binary arithmetic instructions and store instructions. There are more instructions that need to be updated, but this is a good start. I believe this fixes at least the reduced test case from PR40529.
Reviewers: RKSimon, spatel, rnk, efriedma, andrew.w.kaylor
Subscribers: dim, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57735
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353489
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 8 Feb 2019 00:23:35 +0000 (00:23 +0000)]
[AArch64] Fix condition for "high-vector" DUP optimizations.
AArch64 NEON has a bunch of instructions with a "2" suffix that extract
the top half of the source vectors, instead of the bottom half. We have
some DAGCombines to try to take advantage of that. However, they
assumed that any EXTRACT_VECTOR was extracting the high half of the
vector in question.
This issue has apparently existed since the AArch64 backend was merged.
Fixes https://bugs.llvm.org/show_bug.cgi?id=40632 .
Differential Revision: https://reviews.llvm.org/D57862
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353486
91177308-0d34-0410-b5e6-
96231b3b80d8
Petar Jovanovic [Thu, 7 Feb 2019 22:57:33 +0000 (22:57 +0000)]
[mips][micromips] Fix how values in .gcc_except_table are calculated
When a landing pad is calculated in a program that is compiled for micromips
with -fPIC flag, it will point to an even address.
Such an error will cause a segmentation fault, as the instructions in
micromips are aligned on odd addresses. This patch sets the last bit of the
offset where a landing pad is, to 1, which will effectively be an odd
address and point to the instruction exactly.
r344591 fixed this issue for -static compilation.
Patch by Aleksandar Beserminji.
Differential Revision: https://reviews.llvm.org/D57677
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353480
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 7 Feb 2019 22:36:55 +0000 (22:36 +0000)]
[x86] fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353477
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 7 Feb 2019 22:33:50 +0000 (22:33 +0000)]
[WebAssembly] Update test output after rL353474. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353476
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 7 Feb 2019 22:03:32 +0000 (22:03 +0000)]
[WebAssembly] Fix imported function symbol names that differ from their import names in the .o format
Add a flag to allow symbols to have a wasm import name which differs from the
linker symbol name, allowing the linker to link code using the import_module
attribute.
This is the MC/Object portion of the patch.
Differential Revision: https://reviews.llvm.org/D57632
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353474
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 7 Feb 2019 21:27:23 +0000 (21:27 +0000)]
[InstCombine] Optimize `atomicrmw <op>, 0` into `load atomic` when possible
This commit teaches InstCombine how to replace an atomicrmw operation
into a simple load atomic.
For a given `atomicrmw <op>`, this is possible when:
1. The ordering of that operation is compatible with a load (i.e.,
anything that doesn't have a release semantic).
2. <op> does not modify the value being stored
Differential Revision: https://reviews.llvm.org/D57854
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353471
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 7 Feb 2019 21:24:30 +0000 (21:24 +0000)]
gn build: Make check-{clang,lld,llvm} pass on FreeBSD.
Mostly achieved by assuming that anything that isn't Win or Mac is ELF,
which seems reasonable enough for now.
Differential Revision: https://reviews.llvm.org/D57870
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353470
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Thu, 7 Feb 2019 21:23:37 +0000 (21:23 +0000)]
[LV] Remove unnecessary assignment to UserIC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353469
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 7 Feb 2019 21:12:01 +0000 (21:12 +0000)]
[InstCombine] Fix crashing from (icmp (bitcast ([su]itofp X)), Y)
This fixes a class of bugs introduced by D44367,
which transforms various cases of icmp (bitcast ([su]itofp X)), Y to icmp X, Y.
If the bitcast is between vector types with a different number of elements,
the current code will produce bad IR along the lines of: icmp <N x i32> ..., <M x i32> <...>.
This patch suppresses the transform if the bitcast changes the number of vector elements.
Patch by: @AndrewScheidecker (Andrew Scheidecker)
Differential Revision: https://reviews.llvm.org/D57871
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353467
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 7 Feb 2019 21:03:18 +0000 (21:03 +0000)]
Move SMTSolver dump() methods out-of-line.
This broke modularized non-local-submodule-visibility builds because
the function bodies pulled in extra dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353465
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Thu, 7 Feb 2019 21:02:22 +0000 (21:02 +0000)]
[CodeGen] Handle vector UADDO, SADDO, USUBO, SSUBO
This is part of https://bugs.llvm.org/show_bug.cgi?id=40442.
Vector legalization is implemented for the add/sub overflow opcodes.
UMULO/SMULO are also handled as far as legalization is concerned, but
they don't support vector expansion yet (so no tests for them).
The vector result widening implementation is suboptimal, because it
could result in a legalization loop.
Differential Revision: https://reviews.llvm.org/D57639
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353464
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Thu, 7 Feb 2019 20:58:04 +0000 (20:58 +0000)]
[cmake] Pass LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN to NATIVE configure
We should propagate this down to host builds so that e.g. people using
an optimized tablegen can do the sub-configure successfully.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353463
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 7 Feb 2019 20:54:09 +0000 (20:54 +0000)]
[InstCombine] refactor folds for (icmp (bitcast X), Y); NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353462
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Thu, 7 Feb 2019 20:49:10 +0000 (20:49 +0000)]
[LV] Prevent interleaving if computeMaxVF returned None.
As discussed in D57382, interleaving should be avoided if computeMaxVF
returns None, same as we currently do for vectorization.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6477
Reviewers: Ayal, dcaballe, hsaito, mkuper, rengolin
Reviewed By: Ayal
Differential Revision: https://reviews.llvm.org/D57837
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353461
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 7 Feb 2019 20:44:08 +0000 (20:44 +0000)]
GlobalISel: Try to fix bot failures
Don't rely on order of evaluation of function arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353460
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 7 Feb 2019 20:14:43 +0000 (20:14 +0000)]
[DAGCombiner] (add (umax X, C), -C) --> (usubsat X, C) (PR40111)
Move the (add (umax X, C), -C) --> (usubsat X, C) X86 combine into generic DAGCombiner
First of a number of saturated arithmetic folds that can be moved out of X86-specific code for PR40111.
Differential Revision: https://reviews.llvm.org/D57754
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353457
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 7 Feb 2019 19:37:44 +0000 (19:37 +0000)]
GlobalISel: Implement narrowScalar for shift main type
This is pretty much directly ported from SelectionDAG. Doesn't include
the shift by non-constant but known bits version, since there isn't a
globalisel version of computeKnownBits yet.
This shows a disadvantage of targets not specifically which type
should be used for the shift amount. If type 0 is legalized before
type 1, the operations on the shift amount type use the wider type
(which are also less likely to legalize). This can be avoided by
targets specifying legalization actions on type 1 earlier than for
type 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353455
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 7 Feb 2019 19:10:15 +0000 (19:10 +0000)]
AMDGPU/GlobalISel: Restrict g_implicit_def legality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353452
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 7 Feb 2019 18:58:28 +0000 (18:58 +0000)]
GlobalISel: Fix artifact combiner constant legality checks for vectors
Since G_CONSTANT is illegal for vectors, this needs to check
what buildConstant will produce for a splat vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353449
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 7 Feb 2019 18:33:22 +0000 (18:33 +0000)]
AMDGPU/GlobalISel: Don't use g_implicit_def in a few tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353443
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Thu, 7 Feb 2019 18:31:05 +0000 (18:31 +0000)]
Revert "[DAG] Cleanup of unused node in SimplifySelectCC."
Causes ASAN use-after-poison errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353442
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 7 Feb 2019 18:16:22 +0000 (18:16 +0000)]
[InstrProf] Avoid reconstructing Triple, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353439
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 7 Feb 2019 18:14:39 +0000 (18:14 +0000)]
AMDGPU/GlobalISel: Legalize fsqrt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353438
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 7 Feb 2019 18:03:11 +0000 (18:03 +0000)]
AMDGPU/GlobalISel: Legalize some f16 operations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353436
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Thu, 7 Feb 2019 17:50:35 +0000 (17:50 +0000)]
[HotColdSplit] With PGO add profile entry metadata to split cold function
Summary:
When compiling with profile data, ensure the split cold function gets
cold function_entry_count metadata (just use 0 since it should be cold).
Otherwise with function sections it will not be placed in the unlikely
text section with other cold code.
Reviewers: vsk
Subscribers: sebpop, hiraditya, davidxl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57900
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353434
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 7 Feb 2019 17:43:34 +0000 (17:43 +0000)]
[DAGCombiner] fold add/sub with bool operand based on target's boolean contents
I noticed that we are missing this canonicalization in IR:
rL352515
...and then realized that we don't get this right in SDAG either,
so this has to be fixed first regardless of what we choose to do in IR.
The existing fold was limited to scalars and using the wrong predicate
to guard the transform. We have a boolean contents TLI query that can
be used to decide which direction to fold.
This may eventually lead back to the problems/question in:
https://bugs.llvm.org/show_bug.cgi?id=40486
...but it makes no difference to that yet.
Differential Revision: https://reviews.llvm.org/D57401
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353433
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 7 Feb 2019 17:38:00 +0000 (17:38 +0000)]
GlobalISel: Implement fewerElementsVector for shifts
Introduce a new function which handles instructions with multiple type
indices, but have the same number of vector elements.
Also legalize v2s16 shifts when applicable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353432
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 7 Feb 2019 17:25:51 +0000 (17:25 +0000)]
GlobalISel: Try to make legalize rules more useful for vectors
Mostly keep the existing functions on scalars, but add versions which
also operate based on the vector element size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353430
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Thu, 7 Feb 2019 17:13:55 +0000 (17:13 +0000)]
[DAG] Cleanup of unused node in SimplifySelectCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353428
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 7 Feb 2019 17:10:49 +0000 (17:10 +0000)]
[x86] split more 256/512-bit shuffles in lowering
This is intentionally a small step because it's hard to know exactly
where we might introduce a conflicting transform with the code that
tries to form wider shuffles. But I think this is safe - if we have
a wide shuffle with 2 operands, then we should do better with an
extract + narrow shuffle.
Differential Revision: https://reviews.llvm.org/D57867
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353427
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Thu, 7 Feb 2019 16:57:50 +0000 (16:57 +0000)]
[DAG] Cleanup unused node on failed SELECT Combine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353426
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rupprecht [Thu, 7 Feb 2019 16:41:06 +0000 (16:41 +0000)]
[llvm-ar][libObject] Fix relative paths when nesting thin archives.
Summary:
When adding one thin archive to another, we currently chop off the relative path to the flattened members. For instance, when adding `foo/child.a` (which contains `x.txt`) to `parent.a`, when flattening it we should add it as `foo/x.txt` (which exists) instead of `x.txt` (which does not exist).
As a note, this also undoes the `IsNew` parameter of handling relative paths in r288280. The unit test there still passes.
This was reported as part of testing the kernel build with llvm-ar: https://patchwork.kernel.org/patch/
10767545/ (see the second point).
Reviewers: mstorsjo, pcc, ruiu, davide, david2050
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57842
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353424
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Thu, 7 Feb 2019 15:43:40 +0000 (15:43 +0000)]
[X86] Simplify casing. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353417
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Thu, 7 Feb 2019 15:38:14 +0000 (15:38 +0000)]
[DAG] Cleanup unused nodes on failed store-to-load forward combine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353416
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexandre Ganea [Thu, 7 Feb 2019 15:24:18 +0000 (15:24 +0000)]
[CodeView] Fix cycles in debug info when merging Types with global hashes
When type streams with forward references were merged using GHashes, cycles
were introduced in the debug info. This was caused by
GlobalTypeTableBuilder::insertRecordAs() not inserting the record on the second
pass, thus yielding an empty ArrayRef at that record slot. Later on, upon PDB
emission, TpiStreamBuilder::commit() would skip that empty record, thus
offseting all indices that came after in the stream.
This solution comes in two steps:
1. Fix the hash calculation, by doing a multiple-step resolution, iff there are
forward references in the input stream.
2. Fix merge by resolving with multiple passes, therefore moving records with
forward references at the end of the stream.
This patch also adds support for llvm-readoj --codeview-ghash.
Finally, fix dumpCodeViewMergedTypes() which previously could reference deleted
memory.
Fixes PR40221
Differential Revision: https://reviews.llvm.org/D57790
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353412
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Thu, 7 Feb 2019 14:38:25 +0000 (14:38 +0000)]
Fix misspelled filenames in file headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353408
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Thu, 7 Feb 2019 13:32:54 +0000 (13:32 +0000)]
[LSR] Generate cross iteration indexes
Modify GenerateConstantOffsetsImpl to create offsets that can be used
by indexed addressing modes. If formulae can be generated which
result in the constant offset being the same size as the recurrence,
we can generate a pre-indexed access. This allows the pointer to be
updated via the single pre-indexed access so that (hopefully) no
add/subs are required to update it for the next iteration. For small
cores, this can significantly improve performance DSP-like loops.
Differential Revision: https://reviews.llvm.org/D55373
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353403
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 7 Feb 2019 11:05:33 +0000 (11:05 +0000)]
[ARM GlobalISel] Support G_ICMP for Thumb2
Mark as legal and use the t2* equivalents of the arm mode instructions,
e.g. t2CMPrr instead of plain CMPrr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353392
91177308-0d34-0410-b5e6-
96231b3b80d8
David Green [Thu, 7 Feb 2019 10:51:04 +0000 (10:51 +0000)]
[ARM] Reformat isRedundantFlagInstr for D57833. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353386
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiong Wang [Thu, 7 Feb 2019 10:43:09 +0000 (10:43 +0000)]
[BPF] add code-gen support for JMP32 instructions
JMP32 instructions has been added to eBPF ISA. They are 32-bit variants of
existing BPF conditional jump instructions, but the comparison happens on
low 32-bit sub-register only, therefore some unnecessary extensions could
be saved.
JMP32 instructions will only be available for -mcpu=v3. Host probe hook has
been updated accordingly.
JMP32 instructions will only be enabled in code-gen when -mattr=+alu32
enabled, meaning compiling the program using sub-register mode.
For JMP32 encoding, it is a new instruction class, and is using the
reserved eBPF class number 0x6.
This patch has been tested by compiling and running kernel bpf selftests
with JMP32 enabled.
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353384
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 7 Feb 2019 10:35:34 +0000 (10:35 +0000)]
AArch64: implement copy for paired GPR registers.
When doing 128-bit atomics using CASP we might need to copy a GPRPair to a
different register, but that was unimplemented up to now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353383
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 7 Feb 2019 06:21:28 +0000 (06:21 +0000)]
[BranchFolding] Remove dead code for handling EHPad blocks
Summary: This code tries to handle the case where IBB is an EHPad, but there's an earlier check that uses PBB->hasEHPadSuccessor(). Where PBB is a predecessor of IBB. The hasEHPadSuccessor function would have visited IBB and seen that it was an EHPad and returned false. This would prevent us from reaching this code with IBB as an EHPad.
Looks like this code was originally added in rL37427 (ancient) and made dead in rL143001.
Reviewers: rnk, void, efriedma
Reviewed By: rnk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D57358
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353375
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Thu, 7 Feb 2019 05:20:00 +0000 (05:20 +0000)]
Bump minimum toolchain version
Summary:
The RFC on moving past C++11 got good traction:
http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html
This patch therefore bumps the toolchain versions according to our policy:
llvm.org/docs/DeveloperPolicy.html#toolchain
Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane
Differential Revision: https://reviews.llvm.org/D57264
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353374
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail R. Gadelha [Thu, 7 Feb 2019 03:19:45 +0000 (03:19 +0000)]
Move the SMT API to LLVM
Moved everything SMT-related to LLVM and updated the cmake scripts.
Differential Revision: https://reviews.llvm.org/D54978
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353373
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 7 Feb 2019 02:40:49 +0000 (02:40 +0000)]
gn build: Merge the test part of r353237.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353369
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 7 Feb 2019 02:35:22 +0000 (02:35 +0000)]
[WebAssembly] Update test output after rL353357. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353368
91177308-0d34-0410-b5e6-
96231b3b80d8
Brad Smith [Thu, 7 Feb 2019 02:06:58 +0000 (02:06 +0000)]
Add OpenBSD support to be able to get the thread name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353367
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 7 Feb 2019 01:24:44 +0000 (01:24 +0000)]
[WebAssembly] Add symbol flag to the binary format llvm.used
Summary:
Rather than add a new attribute
See https://github.com/WebAssembly/tool-conventions/issues/64
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57864
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353360
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 7 Feb 2019 01:22:07 +0000 (01:22 +0000)]
Fix a minor grammar thinko.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353359
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 7 Feb 2019 01:17:34 +0000 (01:17 +0000)]
[WebAssembly] Expand symbol flags shown by llvm-objdump --symbols
Differential Revision: https://reviews.llvm.org/D57861
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353357
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Thu, 7 Feb 2019 01:12:56 +0000 (01:12 +0000)]
[cmake] Drop clang-tools-extra from LLVM_ALL_PROJECTS
We iterate over the list and only enable projects from that list that
are present in LLVM_ENABLE_PROJECTS and disable all other projects. Most
users will only specify clang in LLVM_ENABLE_PROJECTS and expect
clang-tools-extra to be implicitly enabled, so remove clang-tools-extra
from LLVM_ALL_PROJECTS so that it doesn't get disabled instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353354
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 7 Feb 2019 00:11:43 +0000 (00:11 +0000)]
Remove reference to non-existent function. NFC.
This comment is old. The code in question was removed in rL203174
Differential Revision: https://reviews.llvm.org/D57856
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353352
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rupprecht [Wed, 6 Feb 2019 21:50:45 +0000 (21:50 +0000)]
[llvm-ar] Remove leading slash when printing thin archive members
Reviewers: ruiu
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57845
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353347
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Wed, 6 Feb 2019 21:49:47 +0000 (21:49 +0000)]
[cmake] Add all subprojects to LLVM_ALL_PROJECTS
Make LLVM_ALL_PROJECTS reflect all top-level directories in the monorepo
rather than an arbitrary subset. clang-tools-extra is technically
unnecessary since it gets enabled by clang, but having it there for
consistency shouldn't hurt either.
Differential Revision: https://reviews.llvm.org/D57843
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353346
91177308-0d34-0410-b5e6-
96231b3b80d8
Roland Froese [Wed, 6 Feb 2019 21:34:44 +0000 (21:34 +0000)]
[PowerPC] Add vector truncate test to prep for D56507 NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353344
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Wed, 6 Feb 2019 21:08:17 +0000 (21:08 +0000)]
[cmake] Add openmp to LLVM_ALL_PROJECTS
It'll get ignored in LLVM_ENABLE_PROJECTS after r353148 otherwise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353343
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rupprecht [Wed, 6 Feb 2019 20:51:04 +0000 (20:51 +0000)]
[libObject][NFC] Include filename in error message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353341
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Wed, 6 Feb 2019 20:25:17 +0000 (20:25 +0000)]
[LICM/MSSA] Add promotion to scalars by building an AliasSetTracker with MemorySSA.
Summary:
Experimentally we found that promotion to scalars carries less benefits
than sinking and hoisting in LICM. When using MemorySSA, we build an
AliasSetTracker on demand in order to reuse the current infrastructure.
We only build it if less than AccessCapForMSSAPromotion exist in the
loop, a cap that is by default set to 250. This value ensures there are
no runtime regressions, and there are small compile time gains for
pathological cases. A much lower value (20) was found to yield a single
regression in the llvm-test-suite and much higher benefits for compile
times. Conservatively we set the current cap to a high value, but we will
explore lowering it when MemorySSA is enabled by default.
Reviewers: sanjoy, chandlerc
Subscribers: nemanjai, jlebar, Prazek, george.burgess.iv, jfb, jsji, llvm-commits
Differential Revision: https://reviews.llvm.org/D56625
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353339
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Wed, 6 Feb 2019 20:12:03 +0000 (20:12 +0000)]
[DAG] Immediately cleanup unused nodes from extend-based combines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353338
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Berg [Wed, 6 Feb 2019 19:57:06 +0000 (19:57 +0000)]
Move IR flag handling directly into builder calls for cases translated from Instructions in GlobalIsel
Reviewers: aditya_nandakumar, volkan
Reviewed By: aditya_nandakumar
Subscribers: rovka, kristof.beyls, volkan, Petar.Avramovic
Differential Revision: https://reviews.llvm.org/D57630
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353336
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Wed, 6 Feb 2019 19:55:12 +0000 (19:55 +0000)]
[AliasSetTracker] Pass MustAlias to addPointer more often.
Summary:
Pass the alias info to addPointer when available. Will save an alias()
call for must sets when adding a known Must or May alias.
[Part of a series of cleanup patches]
Reviewers: reames, mkazantsev
Subscribers: sanjoy, jlebar, llvm-commits
Differential Revision: https://reviews.llvm.org/D56613
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353335
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 6 Feb 2019 19:50:59 +0000 (19:50 +0000)]
[X86] Change the CPU on the test case for pr40529.ll to really show the bug. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353334
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Wed, 6 Feb 2019 19:45:47 +0000 (19:45 +0000)]
[X86][DAG] Avoid creating dangling bitcast.
combineExtractWithShuffle may leave a dangling bitcast which may
prevent further optimization in later passes. Avoid constructing it
unless it is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353333
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 6 Feb 2019 19:40:11 +0000 (19:40 +0000)]
[x86] add tests for horizontal ops (PR38971, PR33758); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353332
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Wed, 6 Feb 2019 19:23:31 +0000 (19:23 +0000)]
[SystemZ] Improved handling of the @llvm.ctlz intrinsic.
Since SystemZ supports counting of leading zeros with the FLOGR instruction,
isCheapToSpeculateCtlz() should return true, which it now does.
ISD::CTLZ_ZERO_UNDEF i32 is now handled the same way as ISD::CTLZ is, which
is needed since promotion to i64 is required and CTLZ_ZERO_UNDEF is only
expanded to CTLZ if it is Legal or Custom.
Review: Ulrich Weigand
https://reviews.llvm.org/D57710
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353330
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 6 Feb 2019 19:20:47 +0000 (19:20 +0000)]
build: Remove the cmake check for malloc.h.
As far as I can tell, malloc.h is only being used here to provide
a definition of mallinfo (malloc itself is declared in stdlib.h via
cstdlib). We already have a macro for whether mallinfo is available,
so switch to using that instead.
Differential Revision: https://reviews.llvm.org/D57807
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353329
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Wed, 6 Feb 2019 18:59:19 +0000 (18:59 +0000)]
[SystemZ] Wait with VGBM selection until after DAGCombine2.
Don't lower BUILD_VECTORs to BYTE_MASK, but instead expose the BUILD_VECTORs
to the DAGCombiner and select them to VGBM in Select(). This allows the
DAGCombiner to understand the constant vector values.
For floating point, only all-zeros vectors are now generated with VGBM, as it
turned out to be somewhat complicated to handle any arbitrary constants,
while in practice this is very rare and hardly needed.
The SystemZ ISD opcodes z_byte_mask, z_vzero and z_vones have been removed.
Review: Ulrich Weigand
https://reviews.llvm.org/D57152
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353325
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 6 Feb 2019 18:43:37 +0000 (18:43 +0000)]
[opt-viewer] Add --filter option to select remarks for displaying.
This allows limiting the displayed remarks to the ones with names
matching the filter (regular) expression.
Generating html pages for a larger project with optimization remarks can
result in a huge HTML documents and using --filter allows to focus on a
set of interesting remarks.
Reviewers: hfinkel, anemet, thegameg, serge-sans-paille
Reviewed By: anemet
Differential Revision: https://reviews.llvm.org/D57827
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353322
91177308-0d34-0410-b5e6-
96231b3b80d8