Commit Graph

109173 Commits

Author SHA1 Message Date
Ivan A. Kosarev
b10a40f71d [IR] Support the new TBAA metadata format in IR verifier
Differential Revision: https://reviews.llvm.org/D40438


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321007 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 18:46:44 +00:00
Dimitry Andric
826e27c6e0 Fix inconsistent line endings in ARCDisassembler.cpp. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321006 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 18:45:37 +00:00
Krzysztof Parzyszek
7364392054 i[Hexagon] ANY_EXTEND_VECTOR_INREG should be Custom, not Legal in r321004
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321005 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 18:41:52 +00:00
Krzysztof Parzyszek
228589c54a [Hexagon] Generate HVX code for vector sign-, zero- and any-extends
Implement any-extend as zero-extend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321004 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 18:32:27 +00:00
Krzysztof Parzyszek
5966988685 [Hexagon] Prefer to widen HVX vectors instead of promoting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321002 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 18:21:01 +00:00
Matt Arsenault
1f57e5d6bc Removed unused DominanceFrontier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321001 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 18:01:13 +00:00
Xinliang David Li
03a6f4ae98 [PGO] add MST min edge selection heuristic to ensure non-zero entry count
Differential Revision: http://reviews.llvm.org/D41059


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320998 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 17:56:19 +00:00
Francis Visoiu Mistrih
65ad22d969 [YAML] Add support for non-printable characters
LLVM IR function names which disable mangling start with '\01'
(https://www.llvm.org/docs/LangRef.html#identifiers).

When an identifier like "\01@abc@" gets dumped to MIR, it is quoted, but
only with single quotes.

http://www.yaml.org/spec/1.2/spec.html#id2770814:

"The allowed character range explicitly excludes the C0 control block
allowed), the surrogate block #xD800-#xDFFF, #xFFFE, and #xFFFF."

http://www.yaml.org/spec/1.2/spec.html#id2776092:

"All non-printable characters must be escaped.
[...]
Note that escape sequences are only interpreted in double-quoted scalars."

This patch adds support for printing escaped non-printable characters
between double quotes if needed.

Should also fix PR31743.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320996 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 17:38:03 +00:00
Ivan A. Kosarev
d6be214351 [IR] Add MDBuilder helpers for the new TBAA metadata format
The new helpers are supposed to be used in clang to generate TBAA
information in the new format proposed in this thread:

http://lists.llvm.org/pipermail/llvm-dev/2017-November/118748.html

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320993 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 16:49:39 +00:00
Sander de Smalen
f829832e3e [AArch64][SVE] Asm: Improve diagnostics further when +sve is not specified
Summary: Patch [4/4] in a series to add parsing of predicates and properly parse SVE ZIP1/ZIP2 instructions. This patch further improves diagnostic messages for when the SVE feature is not specified.

Reviewers: rengolin, fhahn, olista01, echristo, efriedma

Reviewed By: fhahn

Subscribers: sdardis, aemerson, javed.absar, tschuett, llvm-commits, kristof.beyls

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320992 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 16:48:53 +00:00
Simon Dardis
6b66227212 Reland "[mips] Fix the target specific instruction verifier"
Fix an off by one error in the bounds checking for 'dinsu' and update
the ranges in the test comments so that they are accurate.

This version has the correct commit message.

Reviewers: atanasyan

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320991 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 15:56:40 +00:00
Sean Fertile
b71c6a9b39 [Memcpy Loop Lowering] Remove the fixed int8 lowering.
Switch over to the lowering that uses target supplied operand types.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320989 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 15:31:14 +00:00
Max Kazantsev
7a7c05d836 [LVI] Support for ashr in LVI
Enhance LVI to analyze the ‘ashr’ binary operation. This leverages the infrastructure in ConstantRange for the ashr operation.

Patch by Surya Kumari Jangala!

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320983 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 14:23:30 +00:00
Diana Picus
1346bcc16e [ARM GlobalISel] Fix G_(UN)MERGE_VALUES handling after r319524
r319524 has made more G_MERGE_VALUES/G_UNMERGE_VALUES pairs legal than
are supported by the rest of the pipeline. Restrict that to only the
cases that we can currently handle: packing 32-bit values into 64-bit
ones, when we have hardware FP.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320980 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 13:22:28 +00:00
Max Kazantsev
5cecfe96eb [ConstantRange] Support for ashr in ConstantRange computation
Extend the ConstantRange implementation to compute the range of possible values resulting from an arithmetic right shift operation.
There will be a follow up patch to leverage this constant range infrastructure in LazyValueInfo.

Patch by Surya Kumari Jangala!

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320976 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 13:01:32 +00:00
Simon Dardis
7a92215d16 Revert "[mips] Fix the target specific instruction verifier"
This reverts commit r320974. The commit message lacked the Differential Revison: line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320975 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 12:30:34 +00:00
Simon Dardis
bf081763f2 [mips] Fix the target specific instruction verifier
Fix an off by one error in the bounds checking for 'dinsu' and update
the ranges in the test comments so that they are accurate.

Reviewers: atanasyan

https://reviews.llvm.org/D41183


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320974 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 12:24:17 +00:00
Sander de Smalen
9d49216ade [AArch64][SVE] Asm: Add ZIP1/ZIP2 instructions (predicate/data vectors)
Summary: Patch [2/4] in a series to add parsing of predicates and properly parse SVE ZIP1/ZIP2 instructions.

Reviewers: rengolin, kristof.beyls, fhahn, mcrosier, evandro

Reviewed By: fhahn

Subscribers: aemerson, javed.absar, llvm-commits, tschuett

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320973 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 11:29:59 +00:00
Sander de Smalen
29dd081e8d [AArch64][SVE] Asm: Add SVE predicate register definitions and parsing support
Summary: Patch [1/4] in a series to add parsing of predicates and properly parse SVE ZIP1/ZIP2 instructions.

Reviewers: rengolin, kristof.beyls, fhahn, mcrosier, evandro, echristo, efriedma

Reviewed By: fhahn

Subscribers: aemerson, javed.absar, llvm-commits, tschuett

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320970 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 11:26:34 +00:00
Eugene Leviant
0e72a729ed [ThinLTO] Remove unused code
This is a re-commit of r320464, after patch for gold plugin
was landed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320968 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 10:53:45 +00:00
Tim Northover
f66f36e9a4 AArch64: work around how Cyclone handles "movi.2d vD, #0".
For Cylone, the instruction "movi.2d vD, #0" is executed incorrectly in some rare
circumstances. Work around the issue conservatively by avoiding the instruction entirely.

This patch changes CodeGen so that problematic instructions are never
generated, and the AsmParser so that an equivalent instruction is used (with a
warning).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320965 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 10:36:00 +00:00
Igor Laevsky
b887495d4b [TargetLibraryInfo] Discard library functions with incorrectly sized integers
Differential Revision: https://reviews.llvm.org/D41184



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320964 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 10:31:58 +00:00
Sam Parker
72b2ece0db [DAGCombine] Move AND nodes to multiple load leaves
Search from AND nodes to find whether they can be propagated back to
loads, so that the AND and load can be combined into a narrow load.
We search through OR, XOR and other AND nodes and all bar one of the
leaves are required to be loads or constants. The exception node then
needs to be masked off meaning that the 'and' isn't removed, but the
loads(s) are narrowed still.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320962 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 10:04:27 +00:00
Clement Courbet
805454d207 [NFC][CodeGen][ExpandMemCmp] Fix documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320960 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 07:32:48 +00:00
Hiroshi Inoue
f8bf5c2a17 [SROA] Disable non-whole-alloca splits by default
This patch introduce a switch to control splitting of non-whole-alloca slices with default off.
The switch will be default on again after fixing an issue reported in PR35657.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320958 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 06:47:37 +00:00
Craig Topper
a9e5853a21 [X86] Fix mistake that I made when splitting up the setOperationAction calls recently.
The block I moved things that need BWI and 512-bit or VLX is incorrectly qualified with just hasBWI || hasVLX. Here I've qualified it with hasBWI && (hasAVX512 || hasVLX) where the hasAVX512 will be replaced with allowing 512-bit vectors in an upcoming patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320957 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 04:50:05 +00:00
Serguei Katkov
5f348c6a0c [CGP] Fix the handling select inst in complex addressing mode
When we put the value in select placeholder we must pass
the value through simplification tracker due to the value might
be already simplified and erased.

This is a fix for PR35658.

Reviewers: john.brawn, uabelho
Reviewed By: john.brawn
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41251


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320956 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 04:25:07 +00:00
Bjorn Steinbrink
53f8289df4 Re-commit "Properly handle multi-element and dynamically sized allocas in getPointerDereferenceableBytes()""
llvm-clang-x86_64-expensive-checks-win is still broken, so the failure
seems unrelated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320953 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-17 21:20:16 +00:00
Craig Topper
aa22588b15 [X86] Make the code that creates fmaddsub from build_vector of extracts and inserts functional and add tests.
Summary:
We had no tests for this and we couldn't do the optimization because of a bad use count check. We need to know how many non-undef pieces of the build vector were filled in and ensure our use count is equal to that. But on the shuffle combine version we need the use count to be 2.

The missing coverage was noticed during the review of D40335.

Reviewers: RKSimon, zvi, spatel

Reviewed By: RKSimon

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320950 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-17 18:23:45 +00:00
Sam Clegg
6e6de69a0f [WebAssembly] Export some more info on wasm funtions
Summary:
These fields are useful for lld's gc-sections support

Also remove an unused field.

Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320946 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-17 17:50:07 +00:00
Bjorn Steinbrink
ce542fd0ce Revert "Properly handle multi-element and dynamically sized allocas in getPointerDereferenceableBytes()"
This reverts commit 217067d517.

Fails on llvm-clang-x86_64-expensive-checks-win

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320945 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-17 15:16:58 +00:00
Bjorn Steinbrink
7bf95b403d Revert "Treat sret arguments as being dereferenceable in getPointerDereferenceableBytes()"
This reverts commit 8b7a7660a3.

I didn't mean to commit this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320944 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-17 15:16:51 +00:00
Bjorn Steinbrink
8b7a7660a3 Treat sret arguments as being dereferenceable in getPointerDereferenceableBytes()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320943 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-17 15:11:52 +00:00
Simon Pilgrim
4521272d73 Remove superfluous break after a return. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320941 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-17 11:01:33 +00:00
Craig Topper
eb51e213d1 [X86DomainReassignment] Store legal domains in a std::bitset instead of using a SmallVector that really only ever has one element as a set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320940 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-17 03:16:23 +00:00
Bjorn Steinbrink
b2ce483243 Properly handle byval arguments in getPointerDereferenceableBytes()
Summary:
For byval arguments, the number of dereferenceable bytes is equal to
the size of the pointee, not the pointer.

Reviewers: hfinkel, rnk

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320939 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-17 02:37:42 +00:00
Bjorn Steinbrink
217067d517 Properly handle multi-element and dynamically sized allocas in getPointerDereferenceableBytes()
Reviewers: hfinkel, rnk

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320938 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-17 01:54:25 +00:00
Craig Topper
43beef6ca6 [X86] Use extract_vector_elt instead of X86ISD::VEXTRACT for isel of vXi1 extractions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320937 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-17 01:35:48 +00:00
Craig Topper
036a90a54c [X86] Canonicalize extract_vector_elt from vXi1 to always return MVT::i32.
This allows us to remove some isel patterns that allowed MVT::i8 result type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320936 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-17 01:35:47 +00:00
Craig Topper
e03e617120 [X86] Don't create X86ISD::VEXTRACT nodes directly. Use EXTRACT_VECTOR_ELT and allow that to be legaized to VEXTRACT.
I think we can remove the VEXTRACT node completely and use a canonicalized EXTRACT_VECTOR_ELT instead. This is a first step.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320935 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-17 01:35:44 +00:00
Simon Pilgrim
c61df73fcb Fix unused variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320934 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-16 23:37:51 +00:00
Simon Pilgrim
9974ce94da [X86][AVX] lowerVectorShuffleAsBroadcast - aggressively peek through BITCASTs
Assuming we can safely adjust the broadcast index for the new type to keep it suitably aligned, then peek through BITCASTs when looking for the broadcast source.

Fixes PR32007

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320933 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-16 23:32:18 +00:00
Simon Pilgrim
ebebd80fc4 [X86][AVX] Use extract128BitVector helper. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320932 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-16 23:09:57 +00:00
Simon Pilgrim
e15bb62995 [X86][AVX] Fix failed broadcast fold
Strip excess BITCASTs from EXTRACT_SUBVECTOR input

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320930 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-16 22:57:17 +00:00
Sean Fertile
a9c4e7f664 [Memcpy Loop Lowering] Only calculate residual size/bytes copied when needed.
If the loop operand type is int8 then there will be no residual loop for the
unknown size expansion. Dont create the residual-size and bytes-copied values
when they are not needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320929 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-16 22:41:39 +00:00
Craig Topper
8923be6680 [X86] Don't pass a zero input to the passthru operand of getVectorMaskingNode/getScalarMaskingNode when its going to emit an ISD::OR/ISD::AND. NFCI
In those cases, the pass thru operand of the methods isn't used. The calls to the scalar version were passing a MVT::i1 zero, which is an illegal type at the stage this code runs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320928 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-16 21:12:24 +00:00
Craig Topper
ab97c302b2 [X86] Have getVectorMaskingNode return an ISD::AND for X86ISD::VPSHUFBITQMB instead of creating a select with one input being 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320927 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-16 21:12:23 +00:00
Craig Topper
be2953e6e7 [X86] When using vpopcntdq for ctpop of v8i16 vectors, only promote to v8i32.
Previously we promoted to v8i64, but we don't need to go all the way to 512-bits. If we have VLX we can use the 256-bit instruction. And even if we don't have VLX we can widen v8i32 to v16i32 and drop the upper half.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320926 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-16 19:31:36 +00:00
Craig Topper
2ab19173fc [X86] Combine some more scheduler model entries using regular expressions.
We had a lot of separate 32 and 64 instructions that had the same scheduling data. This merges them into the same regular expression. This is pretty consistent with a lot of other instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320924 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-16 18:35:31 +00:00
Craig Topper
9d5f0f873a [X86] Use instrs instead of instregex for gather/scatter instructions in the scheduler models. Combine into single InstrRW entries.
The reduces the number of scheduler groups in subtarget info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320923 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-16 18:35:29 +00:00