Commit Graph

156970 Commits

Author SHA1 Message Date
Craig Topper
2b5bbc19af [DAGCombiner] Use cast instead of an unchecked dyn_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318450 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 20:23:12 +00:00
Justin Bogner
66cc654766 llvm-objdump: Add missing requires for the test in r313921
This test needs an arm backend in addition to the arm64 one that's
already checked in the test directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318449 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 20:20:56 +00:00
Vedant Kumar
7eb1cc47be [SelectionDAG] Consolidate (t|T)ransferDbgValues methods, NFC.
TransferDbgValues (capital 'T') is wired into ReplaceAllUsesWith, and
transferDbgValues (lowercase 't') is used elsewhere (e.g in Legalize).

Both functions should be doing the exact same thing. This patch
consolidates the logic into one place.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318448 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 19:50:24 +00:00
Reid Kleckner
0ee27ca3af Fix my typo of PDB_TableType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318447 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 19:41:12 +00:00
Reid Kleckner
cc22972e40 Fix -Wreturn-type falling off the end of a function in new DIA code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318444 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 19:32:53 +00:00
Daniel Sanders
b6a6a34db6 [arc] Fix ambiguous overloaded operator error
lib/Target/ARC/ARCISelLowering.cpp:490:22: error: use of overloaded operator '<<' is ambiguous (with operand types 'llvm::raw_ostream' and 'llvm::MVT::SimpleValueType')
                     << RegVT.getSimpleVT().SimpleTy << "\n");
                     ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318443 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 19:16:56 +00:00
Yonghong Song
7a07b064e9 bpf: print backward branch target properly
Currently, it prints the backward branch offset as unsigned value
like below:
       7:       7d 34 0b 00 00 00 00 00         if r4 s>= r3 goto 11 <LBB0_3>
       8:       b7 00 00 00 00 00 00 00         r0 = 0
LBB0_2:
       9:       07 00 00 00 01 00 00 00         r0 += 1
      ......
      17:       bf 31 00 00 00 00 00 00         r1 = r3
      18:       6d 32 f6 ff 00 00 00 00         if r2 s> r3 goto 65526 <LBB0_3+0x7FFB0>

The correct print insn 18 should be:
      18:       6d 32 f6 ff 00 00 00 00         if r2 s> r3 goto -10 <LBB0_2>

To provide better clarity and be consistent with kernel verifier output,
the insn 7 output is changed to the following with "+" added to
non-negative branch offset:
       7:       7d 34 0b 00 00 00 00 00         if r4 s>= r3 goto +11 <LBB0_3>

Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318442 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 19:15:36 +00:00
Daniel Sanders
4c98672343 [arc] Update TargetInfo to include the new backend name argument
Also update a comment about the usage of RegisterTarget() that didn't mention
the new argument.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318441 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 19:10:26 +00:00
Kostya Serebryany
549203e435 [libFuzzer] add docs for -reduce_inputs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318439 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 18:58:14 +00:00
Azharuddin Mohammed
767202fb37 Fix RISCV build after r318352
Reviewers: asb, apazos, mgrang

Reviewed By: mgrang

Subscribers: rbar, johnrusso, simoncook, jordy.potman.lists, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318437 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 18:39:31 +00:00
Guozhi Wei
a448ad72b2 [PPC] Change i32 constant in store instruction to i64
This patch changes all i32 constant in store instruction to i64 with truncation, to increase the chance that the referenced constant can be shared with other i64 constant.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318436 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 18:27:34 +00:00
Zachary Turner
bb4ea6522c Resubmit "Refactor debuginfo-tests"
This was reverted due to some failures on specific darwin buildbots,
the issue being that the new lit configuration was not setting the
SDKROOT environment variable.  We've tested a fix locally and confirmed
that it works, so this patch resubmits everything with the fix
applied.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318435 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 18:26:20 +00:00
Dave Lee
9c5b799781 Add ELF dynamic symbol support to yaml2obj/obj2yaml
Summary:
This change introduces a `DynamicSymbols` field to the ELF specific YAML
supported by `yaml2obj` and `obj2yaml`. This grouping of symbols provides a way
to represent ELF dynamic symbols. The `DynamicSymbols` structure is identical to
the existing `Symbols`.

Reviewers: compnerd, jakehehrlich, silvas

Reviewed By: silvas

Subscribers: silvas, jakehehrlich, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318433 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 18:10:15 +00:00
Sanjay Patel
0394808f01 [InstCombine] add tests for pow(); NFC
Also, increase test diversity (and show another bug) by varying the types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318430 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 17:49:54 +00:00
Rafael Espindola
75fe73fb9a make exitDsymutil static.
The objective is to remove it completelly.

This first patch removes the last use outside dsymutil.cpp and makes
it static.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318429 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 17:46:43 +00:00
Dave Lee
37d08700eb Allow empty mappings for optional YAML input
Summary:
This change fixes a bug where `obj2yaml` can in some cases produce YAML that
causes `yaml2obj` to error.

The ELF YAML document structure has a `Sections` mapping, which contains three
mappings, all of which are optional: `Local`, `Global`, and `Weak.` Any one of
these can be missing, but if all three are missing, then `yaml2obj` errors. This
change allows YAML input for cases like this one.

I have tested this with check-llvm and check-lld, and all tests passed.

This change is the result of test failures while working on D39582, which
introduces a `DynamicSymbols` mapping, which will be empty at times.

Reviewers: compnerd, jakehehrlich, silvas, kledzik, mehdi_amini, pcc

Reviewed By: compnerd

Subscribers: silvas, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318428 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 17:46:11 +00:00
Rafael Espindola
324f14167a Convert another use of createUniqueFile to TempFile::create.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318427 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 17:35:50 +00:00
Aaron Smith
69def8daf6 [DebugInfo/PDB] Exclude the PDB/DIA files added in my previous commit from modulemap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318425 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 17:24:49 +00:00
Sanjay Patel
da65f7f639 [InstCombine] add tests for 'afn' FMF; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318423 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 17:06:36 +00:00
Walter Lee
dbaffd4be3 [asan] Fix small X86_64 ShadowOffset for non-default shadow scale
The requirement is that shadow memory must be aligned to page
boundaries (4k in this case).  Use a closed form equation that always
satisfies this requirement.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318421 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 17:03:00 +00:00
Sanjay Patel
d572cf5326 [InstCombine] regenerate test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318420 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 17:01:09 +00:00
Rafael Espindola
d25c1a9f8c Revert "[Support][CachePruning] Fix regression in pruning interval"
This reverts commit r318397.

It broke tools/gold/X86/cache.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318419 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 17:00:48 +00:00
Sanjay Patel
ffed628837 [InstCombine] regenerate test checks; NFC
Also, remove some unnecessary bits. I don't think we need fcmp in any test here either?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318418 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 16:59:49 +00:00
Sanjay Patel
7b57df5e29 [InstCombine] regenerate test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318417 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 16:38:42 +00:00
Sanjay Patel
fc3c581e7a [InstCombine] regenerate test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318416 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 16:36:48 +00:00
Yaxun Liu
35ad126c78 Let llvm.invariant.group.barrier accepts pointer to any address space
llvm.invariant.group.barrier may accept pointers to arbitrary address space.

This patch let it accept pointers to i8 in any address space and returns
pointer to i8 in the same address space.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318413 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 16:32:16 +00:00
Igor Laevsky
4a2948db03 [FuzzMutate] Fix windows build after rL318407.
Add correct library dependence.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318409 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 16:17:32 +00:00
Sanjay Patel
f6c5e77fb2 [InstSimplify] add tests for fcmp ord/uno; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318408 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 15:25:59 +00:00
Igor Laevsky
1404e4cc81 [FuzzMutate] NFC. Move parseModule and writeModule from llvm-isel-fuzzer into FuzzMutate.
This is to be able to reuse them in the llvm-opt-fuzzer.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318407 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 15:23:08 +00:00
John Brawn
0f099769a7 Remove stray comma in sink-addrmode test
The extra comma meant it wasn't correctly checking that we weren't getting an
extra getelementptr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318406 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 15:15:00 +00:00
Sanjay Patel
40d25eb85d [InstCombine] include 'sub' in the list of narrow-able binops
// trunc (binop X, C) --> binop (trunc X, C')
      // trunc (binop (ext X), Y) --> binop X, (trunc Y)

I'm grouping sub with the other binops  because that makes the code simpler
and the transforms are valid:
https://rise4fun.com/Alive/UeF
...so even though we don't expect a sub with constant Op1 or any of the
other opcodes with constant Op0 due to canonicalization rules, we might as
well handle those situations if non-canonical code somehow reaches this
point (it should just make instcombine more efficient in reaching its
end goal).

This should solve the problem that later manifests in the vectorizers in 
PR35295:
https://bugs.llvm.org/show_bug.cgi?id=35295



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318404 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 14:40:51 +00:00
Aaron Smith
4dc79d9de2 [DebugInfo/PDB] Adding getUndecoratedNameEx and IPDB interfaces for IDiaEnumTables and IDiaTable.
Initial changes to support debugging PE/COFF files with LLDB on Windows through DIA SDK.
There is another set of changes required on the LLDB side before this does anything.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318403 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 14:33:09 +00:00
Simon Pilgrim
d4b960be64 [X86] Add scheduling tests for SHLD/SHRD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318402 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 14:13:48 +00:00
Javed Absar
4992987dc4 [SCEV] simplify loop. NFC.
Change loop to range-based



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318401 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 13:49:27 +00:00
Aaron Smith
91c5da30a5 Test commit. Add a missing dash to the standard llvm file header; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318400 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 13:42:28 +00:00
Diana Picus
7e2aba3d0d [ARM GlobalISel] Add tests for BIC. NFC
Add instruction selector tests for BICrr and BICri, which are handled by
TableGen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318398 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 13:32:47 +00:00
Ben Dunbobbin
248ee6cfb2 [Support][CachePruning] Fix regression in pruning interval
Fixed broken comparison.
borked by: rL284966 (see: https://reviews.llvm.org/D25730).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318397 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 13:15:56 +00:00
Walter Lee
2746bda55f [asan] Fix size/alignment issues with non-default shadow scale
Fix a couple places where the minimum alignment/size should be a
function of the shadow granularity:
- alignment of AllGlobals
- the minimum left redzone size on the stack

Added a test to verify that the metadata_array is properly aligned
for shadow scale of 5, to be enabled when we add build support
for testing shadow scale of 5.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318395 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 12:57:19 +00:00
Diana Picus
73d6c71188 [ARM GlobalISel] Add tests for REVSH patterns. NFC
Add instruction selector tests for some of the REVSH patterns handled by
TableGen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318393 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 12:29:28 +00:00
Yaxun Liu
3c8dd1f596 Fix pointer EVT in SelectionDAGBuilder::visitAlloca
SelectionDAGBuilder::visitAlloca assumes alloca address space is 0, which is
incorrect for triple amdgcn---amdgiz and causes isel failure.

This patch fixes that.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318392 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 12:22:19 +00:00
Sam Parker
b1e1f8e9c3 [DAGCombine] Enable more srl -> load combines
Change the calculation for the desired ValueType for non-sign
extending loads, as in those cases we don't care about the
higher bits. This creates a smaller ExtVT and allows for such
combinations as:
(srl (zextload i16, [addr]), 8) -> (zextload i8, [addr + 1])

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318390 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 11:28:26 +00:00
Simon Dardis
5837c6232a [mips][mt] Add missing test cases from r318207
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318389 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 10:50:44 +00:00
Benjamin Kramer
94488e575a Assert correct removal of SUnit in LatencyPriorityQueue
The LatencyPriorityQueue doesn't currently check whether the SU being removed really exists in the Queue.
This method fails quietly when SU is not found and removes the last element from the Queue, leading to unexpected behavior.

Unfortunately, this only occurs on our custom target, with the custom scheduler. In our case, when remove() is invoked, it removes the wrong SU at the end of the Queue, which is only discovered later when VerifyScheduledDAG() is invoked and finds that some nodes were not scheduled at all.

As this is only reproducible with a lot of proprietary code, I'm hopeful this assert is straightforward enough to not necessitate a test.

Patch by Ondrej Glasnak!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318387 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 10:18:07 +00:00
Mohammed Agabaria
89ec3b09eb [TTI][X86] update costs of interleaved load\store of i64\double
This patch contains more accurate cost of interelaved load\store of stride 2 for the types int64\double on AVX2.

Reviewers: delena, RKSimon, craig.topper, dorit

Reviewed By: dorit

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318385 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 09:38:32 +00:00
Mikael Holmen
920531cc2b [MachineRegisterInfo] Avoid having dbg.values affect code generation
Summary:
Use use_nodbg_empty() rather than use_empty() in
MachineRegisterInfo::EmitLiveInCopies() when determining if a livein
register has any uses or not. Otherwise a single dbg.value can make us
generate different code, meaning -g would affect code generation.

Found when compiling code for my out-of-tree target. Unfortunately I
haven't been able to reproduce the problem on X86 or any of the other
in-tree targets that I tried, so no test case.

Reviewers: MatzeB

Reviewed By: MatzeB

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318382 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 07:01:23 +00:00
Max Kazantsev
63a8861896 [IRCE] Fix SCEVExpander's usage in IRCE
When expanding exit conditions for pre- and postloops, we may end up expanding a
recurrency from the loop to in its loop's preheader. This produces incorrect IR.

This patch ensures that IRCE uses SCEVExpander correctly and only expands code which
is safe to expand in this particular location.

Differentian Revision: https://reviews.llvm.org/D39234


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318381 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 06:06:27 +00:00
Craig Topper
7ddaab8764 [X86] Update TTI to report that v1iX/v1fX types aren't legal for masked gather/scatter/load/store.
The type legalizer will try to scalarize these operations if it sees them, but there is no handling for scalarizing them. This leads to a fatal error. With this change they will now be scalarized by the mem intrinsic scalarizing pass before SelectionDAG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318380 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 06:02:05 +00:00
Craig Topper
0761a60a58 [SelectionDAG] Use report_fatal_error instead of llvm_unreachable in some code that can be reached if targets don't configure things correctly.
For example, this is currently reachable by X86 if you use a masked store intrinsic with a v1iX type.

Using a fatal error seems like a better user experience if someone were to encounter this on a release build. There are several other similar places that have been converted from unreachable to fatal error previously.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318379 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 06:02:03 +00:00
Max Kazantsev
cb0def446f [SCEV][NFC] Introduce isSafeToExpandAt function to SCEVExpander
This function checks that:
1) It is safe to expand a SCEV;
2) It is OK to materialize it at the specified location.
For example, attempt to expand a loop's AddRec to the same loop's preheader should fail.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318377 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 05:10:56 +00:00
Eric Christopher
74e1e11745 Fix thinko in last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318374 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 03:25:02 +00:00