OSDN Git Service

android-x86/external-llvm.git
6 years agollvm-readobj: Print AMDGPU note contents
Konstantin Zhuravlyov [Sat, 14 Oct 2017 18:21:42 +0000 (18:21 +0000)]
llvm-readobj: Print AMDGPU note contents

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315819 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoPull out repeated calls to VT.getVectorNumElements(). NFCI.
Simon Pilgrim [Sat, 14 Oct 2017 17:37:42 +0000 (17:37 +0000)]
Pull out repeated calls to VT.getVectorNumElements(). NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315818 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoCleanup update_llc_test_checks.py notes.
Simon Pilgrim [Sat, 14 Oct 2017 17:37:03 +0000 (17:37 +0000)]
Cleanup update_llc_test_checks.py notes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315817 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAMDGPU: Cleanup elf-notes.ll test
Konstantin Zhuravlyov [Sat, 14 Oct 2017 17:36:53 +0000 (17:36 +0000)]
AMDGPU: Cleanup elf-notes.ll test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315816 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoUse DAG::getBitcast() helper. NFCI.
Simon Pilgrim [Sat, 14 Oct 2017 17:14:42 +0000 (17:14 +0000)]
Use DAG::getBitcast() helper. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315815 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agollvm-readobj: Print AMDGPU note type names
Konstantin Zhuravlyov [Sat, 14 Oct 2017 16:43:46 +0000 (16:43 +0000)]
llvm-readobj: Print AMDGPU note type names

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315813 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAMDGPU: Improve note directive verification in assembler
Konstantin Zhuravlyov [Sat, 14 Oct 2017 16:15:28 +0000 (16:15 +0000)]
AMDGPU: Improve note directive verification in assembler

  - Do not allow amd_amdgpu_isa directives on non-amdgcn architectures
  - Do not allow amd_amdgpu_hsa_metadata on non-amdhsa OSes
  - Do not allow amd_amdgpu_pal_metadata on non-amdpal OSes

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315812 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAMDGPU: Do not emit deprecated notes for code object v3
Konstantin Zhuravlyov [Sat, 14 Oct 2017 15:59:07 +0000 (15:59 +0000)]
AMDGPU: Do not emit deprecated notes for code object v3

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315810 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAMDGPU: Add support for isa version note
Konstantin Zhuravlyov [Sat, 14 Oct 2017 15:40:33 +0000 (15:40 +0000)]
AMDGPU: Add support for isa version note

  - Emit NT_AMD_AMDGPU_ISA
  - Add assembler parsing for isa version directive
    - If isa version directive does not match command line arguments, then return error

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315808 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86][SSE] Support combining AND(EXTRACT(SHUF(X)), C) -> EXTRACT(SHUF(X))
Simon Pilgrim [Sat, 14 Oct 2017 15:01:36 +0000 (15:01 +0000)]
[X86][SSE] Support combining AND(EXTRACT(SHUF(X)), C) -> EXTRACT(SHUF(X))

If we are applying a byte mask to a value extracted from a shuffle, see if we can combine the mask into shuffle.

Fixes the last issue with PR22415

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315807 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add patterns for vzmovl+cvtpd2dq/cvttpd2dq with a load.
Craig Topper [Sat, 14 Oct 2017 07:04:48 +0000 (07:04 +0000)]
[X86] Add patterns for vzmovl+cvtpd2dq/cvttpd2dq with a load.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315802 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add AVX512 versions of VCVTPD2PS to load folding tables.
Craig Topper [Sat, 14 Oct 2017 05:55:43 +0000 (05:55 +0000)]
[X86] Add AVX512 versions of VCVTPD2PS to load folding tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315801 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add patterns for vzmovl+cvtpd2ps with a load.
Craig Topper [Sat, 14 Oct 2017 05:55:42 +0000 (05:55 +0000)]
[X86] Add patterns for vzmovl+cvtpd2ps with a load.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315800 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Remove some patterns for bitcasted alignednonedtemporalloads.
Craig Topper [Sat, 14 Oct 2017 04:18:11 +0000 (04:18 +0000)]
[X86] Remove some patterns for bitcasted alignednonedtemporalloads.

These select the same instruction as the non-bitcasted pattern. So this provides no additional value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315799 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Remove unnecessary bitconverts as the root of patterns for zero extended VCVTPD...
Craig Topper [Sat, 14 Oct 2017 04:18:10 +0000 (04:18 +0000)]
[X86] Remove unnecessary bitconverts as the root of patterns for zero extended VCVTPD2UDQZ128rr and VCVTTPD2UDQZ128rr.

We don't need a bitconvert as a root pattern in these cases. The types in the other parts of the pattern are sufficient to express the behavior of these instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315798 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add additional patterns for folding loads with 128-bit VCVTDQ2PD and VCVTUDQ2PD.
Craig Topper [Sat, 14 Oct 2017 04:18:09 +0000 (04:18 +0000)]
[X86] Add additional patterns for folding loads with 128-bit VCVTDQ2PD and VCVTUDQ2PD.

This matches the patterns we have for the SSE/AVX version.

This is a prerequisite for D38714.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315797 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add AVX512 flavors of VCVTDQ2PD plus VCVTUDQ2PD to the load folding tables.
Craig Topper [Sat, 14 Oct 2017 04:18:08 +0000 (04:18 +0000)]
[X86] Add AVX512 flavors of VCVTDQ2PD plus VCVTUDQ2PD to the load folding tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315796 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Remove TB_NO_REVERSE from VCVTDQ2PDYrr and VCVTPS2PDYrr in the load folding...
Craig Topper [Sat, 14 Oct 2017 04:18:07 +0000 (04:18 +0000)]
[X86] Remove TB_NO_REVERSE from VCVTDQ2PDYrr and VCVTPS2PDYrr in the load folding tables.

I believe these were added incorrectly under the belief that the load size was smaller than the input register size, but that's not true.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315795 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add an additional isel pattern to CVTDQ2PDrm/VCVTDQ2PDrm to enable load folding...
Craig Topper [Sat, 14 Oct 2017 04:18:06 +0000 (04:18 +0000)]
[X86] Add an additional isel pattern to CVTDQ2PDrm/VCVTDQ2PDrm to enable load folding without the peephole pass.

This pattern is already used in AVX512VL version of these instructions. Though AVX512VL version is missing other patterns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315794 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRevert "lit.py: Add new %{shared_output(LABEL)} substitution"
Jordan Rose [Sat, 14 Oct 2017 04:01:27 +0000 (04:01 +0000)]
Revert "lit.py: Add new %{shared_output(LABEL)} substitution"

This reverts r315697 and my ill-fated attempts to fix it on Windows.
I'll try again when I get access to a Windows machine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315793 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agolit.py: Give up and disable the new shared-output.py test on Windows
Jordan Rose [Sat, 14 Oct 2017 03:33:46 +0000 (03:33 +0000)]
lit.py: Give up and disable the new shared-output.py test on Windows

"No such file or directory: C:\\...\\tests\\Output\\shared-output.py.tmp/Output/Shared/SHARED.tmp"

And yet other forward-slashes don't seem to be causing the same
problem. I'll see if I can get ahold of a Windows machine to poke at
this directly later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315792 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoFix assembler for alloca of multiple elements in non-zero addr space
Yaxun Liu [Sat, 14 Oct 2017 03:23:18 +0000 (03:23 +0000)]
Fix assembler for alloca of multiple elements in non-zero addr space

Currently llvm assembler emits parsing error for valid IR assembly

alloca i32, i32 9, addrspace(5)
when alloca addr space is 5.

This patch fixes that.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315791 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Dominators] Remove the NCA check
Jakub Kuderski [Sat, 14 Oct 2017 03:00:56 +0000 (03:00 +0000)]
[Dominators] Remove the NCA check

Summary:
This patch removes the `verifyNCD` check.

The reason for this is that the other checks are sufficient to prove or disprove correctness of any DominatorTree, and that `verifyNCD` doesn't provide (in my option) better error messages then the other ones.
Additionally, this should give a (small) improvement to the total verification time, as the check is O(n), and checking the sibling property takes O(n^3).

Reviewers: dberlin, grosser, davide, brzycki

Reviewed By: brzycki

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315790 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-cov] Factor out logic to iterate over line coverage stats (NFC)
Vedant Kumar [Sat, 14 Oct 2017 02:27:29 +0000 (02:27 +0000)]
[llvm-cov] Factor out logic to iterate over line coverage stats (NFC)

There were two copies of the logic needed to construct a line stats
object for each line in a range: this patch brings it down to one. In
the future, this will make it easier for IDE clients to display coverage
in-line in source editors. To do that, we just need to move the new
LineCoverageIterator class to libCoverage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315789 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[globalisel][tablegen] Fix an unused variable warning caused by a typo (corrected...
Daniel Sanders [Sat, 14 Oct 2017 01:51:46 +0000 (01:51 +0000)]
[globalisel][tablegen] Fix an unused variable warning caused by a typo (corrected OtherInsnID->OtherOpIdx).

The tests were passing by luck since the instruction ID and operand index happened to be the same.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315788 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[globalisel][tablegen] Fix undefined references to dump()
Daniel Sanders [Sat, 14 Oct 2017 00:56:01 +0000 (00:56 +0000)]
[globalisel][tablegen] Fix undefined references to dump()

Two debugging statements snuck into the commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315783 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agolit.py: Previous test fix was a red herring; backslashes are escapes
Jordan Rose [Sat, 14 Oct 2017 00:49:19 +0000 (00:49 +0000)]
lit.py: Previous test fix was a red herring; backslashes are escapes

I don't have access to a Windows machine at the moment, so if this
doesn't fix it I'll just revert for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315782 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[AArch64][RegisterBankInfo] Use the statically computed mappings for COPY
Quentin Colombet [Sat, 14 Oct 2017 00:43:48 +0000 (00:43 +0000)]
[AArch64][RegisterBankInfo] Use the statically computed mappings for COPY

We use to resort on the generic implementation to get the mappings for
COPYs. The generic implementation resorts on table lookup and
dynamically allocated objects to get the valid mappings.

Given we already know how to map G_BITCAST and have the static mappings
for them, use that code path for COPY as well. This is much more
efficient.

Improve the compile time of RegBankSelect by up to 20%.

Note: When we eventually generate all the mappings via TableGen, we
wouldn't have to do that dance to shave compile time. The intent of this
change was to make sure that moving to static structure really pays off.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315781 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[globalisel][tablegen] Simplify named operand/operator lookups and fix a wrong-code...
Daniel Sanders [Sat, 14 Oct 2017 00:31:58 +0000 (00:31 +0000)]
[globalisel][tablegen] Simplify named operand/operator lookups and fix a wrong-code bug this revealed.

Summary:
Operand variable lookups are now performed by the RuleMatcher rather than
searching the whole matcher hierarchy for a match. This revealed a wrong-code
bug that currently affects ARM and X86 where patterns that use a variable more
than once in the match pattern will be imported but won't check that the
operands are identical. This can cause the tablegen-erated matcher to
accept matches that should be rejected.

Depends on D36569

Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

Subscribers: aemerson, igorb, llvm-commits, kristof.beyls

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315780 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agolit.py: Fix new test harder for systems that don't use / as os.path.sep
Jordan Rose [Sat, 14 Oct 2017 00:26:48 +0000 (00:26 +0000)]
lit.py: Fix new test harder for systems that don't use / as os.path.sep

I didn't think about '%{inputs}' having the same problem. This one
should be a fully Windows path name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315779 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agolit.py: Fix new test for systems that don't use / as os.path.sep
Jordan Rose [Fri, 13 Oct 2017 22:46:40 +0000 (22:46 +0000)]
lit.py: Fix new test for systems that don't use / as os.path.sep

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315773 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRevert r315763: "[Hexagon] Rangify some loops, NFC"
Krzysztof Parzyszek [Fri, 13 Oct 2017 21:57:11 +0000 (21:57 +0000)]
Revert r315763: "[Hexagon] Rangify some loops, NFC"

Broke some builds (using libstdc++).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315769 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Use X86ISD::VBROADCAST in place of v2f64 X86ISD::MOVDDUP when AVX2 is available
Craig Topper [Fri, 13 Oct 2017 21:56:48 +0000 (21:56 +0000)]
[X86] Use X86ISD::VBROADCAST in place of v2f64 X86ISD::MOVDDUP when AVX2 is available

This is particularly important for AVX512VL where we are better able to recognize the VBROADCAST loads to fold with other operations.

For AVX512VL we now use X86ISD::VBROADCAST for all of the patterns and remove the 128-bit X86ISD::VMOVDDUP.

We may be able to use this for AVX1 as well which would allow us to remove more isel patterns.

I also had to add X86ISD::VBROADCAST as a node to call combineShuffle for so that we treat it similar to X86ISD::MOVDDUP.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315768 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Use fsub in the movddup scheduling tests to prevent a future patch from folding...
Craig Topper [Fri, 13 Oct 2017 21:56:45 +0000 (21:56 +0000)]
[X86] Use fsub in the movddup scheduling tests to prevent a future patch from folding movddup as a broadcast load.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315767 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[globalisel][tablegen] Fix a use-after free bug that manifests on non-macOS machines.
Daniel Sanders [Fri, 13 Oct 2017 21:51:20 +0000 (21:51 +0000)]
[globalisel][tablegen] Fix a use-after free bug that manifests on non-macOS machines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315765 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Hexagon] Rangify some loops, NFC
Krzysztof Parzyszek [Fri, 13 Oct 2017 21:43:00 +0000 (21:43 +0000)]
[Hexagon] Rangify some loops, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315763 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InstCombine] use m_Neg() to reduce code; NFCI
Sanjay Patel [Fri, 13 Oct 2017 21:28:50 +0000 (21:28 +0000)]
[InstCombine] use m_Neg() to reduce code; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315762 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[globalisel][tablegen] Add support for fpimm and import of APInt/APFloat based ImmLeaf.
Daniel Sanders [Fri, 13 Oct 2017 21:28:03 +0000 (21:28 +0000)]
[globalisel][tablegen] Add support for fpimm and import of APInt/APFloat based ImmLeaf.

Summary:
There's only a tablegen testcase for IntImmLeaf and not a CodeGen one
because the relevant rules are rejected for other reasons at the moment.
On AArch64, it's because there's an SDNodeXForm attached to the operand.
On X86, it's because the rule either emits multiple instructions or has
another predicate using PatFrag which cannot easily be supported at the
same time.

Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

Reviewed By: qcolombet

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315761 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other...
Eugene Zelenko [Fri, 13 Oct 2017 21:17:07 +0000 (21:17 +0000)]
[Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315760 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[RegisterBankInfo] Cache the getMinimalPhysRegClass information
Quentin Colombet [Fri, 13 Oct 2017 21:16:15 +0000 (21:16 +0000)]
[RegisterBankInfo] Cache the getMinimalPhysRegClass information

TargetRegisterInfo::getMinimalPhysRegClass is actually pretty expensive
because it has to iterate over all the register classes.
Cache this information as we need and get it so that we limit its usage.
Right now, we heavily rely on it, because this is how we get the mapping
for vregs defined by copies from physreg (i.e., the one that are ABI
related).

Improve compile time by up to 10% for that pass.

NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315759 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Legalizer] Use SmallSetVector instead of SetVector.
Quentin Colombet [Fri, 13 Oct 2017 21:16:14 +0000 (21:16 +0000)]
[Legalizer] Use SmallSetVector instead of SetVector.

NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315758 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[LegalizerInfo] Don't evaluate end boundary every time through the loop
Quentin Colombet [Fri, 13 Oct 2017 21:16:13 +0000 (21:16 +0000)]
[LegalizerInfo] Don't evaluate end boundary every time through the loop

Match the LLVM coding standard for loop conditions.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315757 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Legalizer] Only allocate the SetVectors once per function.
Quentin Colombet [Fri, 13 Oct 2017 21:16:05 +0000 (21:16 +0000)]
[Legalizer] Only allocate the SetVectors once per function.

Prior to this patch we used to create SetVectors in temporaries that
were created and destroyed for each instruction. Now, instead we create
and destroyed them only once, but clear the content for each
instruction.
This speeds up the pass by ~25%.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315756 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAMDGPU: Implement hasBitPreservingFPLogic
Matt Arsenault [Fri, 13 Oct 2017 21:10:22 +0000 (21:10 +0000)]
AMDGPU: Implement hasBitPreservingFPLogic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315754 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoLowerTypeTests: Give imported symbols a type with size 0 so that they are not assumed...
Peter Collingbourne [Fri, 13 Oct 2017 21:02:16 +0000 (21:02 +0000)]
LowerTypeTests: Give imported symbols a type with size 0 so that they are not assumed not to alias.

It is possible for both a base and a derived class to be satisfied
with a unique vtable. If a program contains casts of the same pointer
to both of those types, the CFI checks will be lowered to this
(with ThinLTO):

if (p != &__typeid_base_global_addr)
  trap();
if (p != &__typeid_derived_global_addr)
  trap();

The optimizer may then use the first condition combined
with the assumption that __typeid_base_global_addr and
__typeid_derived_global_addr may not alias to optimize away the second
comparison, resulting in an unconditional trap.

This patch fixes the bug by giving imported globals the type [0 x i8]*,
which prevents the optimizer from assuming that they do not alias.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315753 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Reassociate] auto-generate better checks; NFC
Sanjay Patel [Fri, 13 Oct 2017 20:56:35 +0000 (20:56 +0000)]
[Reassociate] auto-generate better checks; NFC

These would fail if the created variable names changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315752 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Hexagon] Avoid unused variable warnings in release builds.
Benjamin Kramer [Fri, 13 Oct 2017 20:46:14 +0000 (20:46 +0000)]
[Hexagon] Avoid unused variable warnings in release builds.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315749 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAMDGPU: Look for src mods before fp_extend
Matt Arsenault [Fri, 13 Oct 2017 20:45:49 +0000 (20:45 +0000)]
AMDGPU: Look for src mods before fp_extend

When selecting modifiers for mad_mix instructions,
look at fneg/fabs that occur before the conversion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315748 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[aarch64] Support APInt and APFloat in ImmLeaf subclasses and make AArch64 use them.
Daniel Sanders [Fri, 13 Oct 2017 20:42:18 +0000 (20:42 +0000)]
[aarch64] Support APInt and APFloat in ImmLeaf subclasses and make AArch64 use them.

Summary:
The purpose of this patch is to expose more information about ImmLeaf-like
PatLeaf's so that GlobalISel can learn to import them. Previously, ImmLeaf
could only be used to test int64_t's produced by sign-extending an APInt.
Other tests on immediates had to use the generic PatLeaf and extract the
constant using C++.

With this patch, tablegen will know how to generate predicates for APInt,
and APFloat. This will allow it to 'do the right thing' for both SelectionDAG
and GlobalISel which require different methods of extracting the immediate
from the IR.

This is NFC for SelectionDAG since the new code is equivalent to the
previous code. It's also NFC for FastISel because FastIselShouldIgnore is 1
for the ImmLeaf subclasses. Enabling FastIselShouldIgnore == 0 for these new
subclasses will require a significant re-factor of FastISel.

For GlobalISel, it's currently NFC because the relevant code to import the
affected rules is not yet present. This will be added in a later patch.

Depends on D36086

Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

Reviewed By: qcolombet

Subscribers: bjope, aemerson, rengolin, javed.absar, igorb, llvm-commits, kristof.beyls

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315747 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SmallPtrSet] Add iterator epoch tracking.
Benjamin Kramer [Fri, 13 Oct 2017 20:37:52 +0000 (20:37 +0000)]
[SmallPtrSet] Add iterator epoch tracking.

This will detect invalid iterators when ABI breaking checks are enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315746 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InstCombine] move code to remove repeated constant check; NFCI
Sanjay Patel [Fri, 13 Oct 2017 20:29:11 +0000 (20:29 +0000)]
[InstCombine] move code to remove repeated constant check; NFCI

Also, consolidate tests for this fold in one place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315745 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAMDGPU: Implement isFPExtFoldable
Matt Arsenault [Fri, 13 Oct 2017 20:18:59 +0000 (20:18 +0000)]
AMDGPU: Implement isFPExtFoldable

This helps match v_mad_mix* in some cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315744 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InstCombine] recycle adds for better efficiency
Sanjay Patel [Fri, 13 Oct 2017 20:12:21 +0000 (20:12 +0000)]
[InstCombine] recycle adds for better efficiency

Also, clean up unnecessary matcher capture variable initializations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315743 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoDAG: Add opcode and source type to isFPExtFree
Matt Arsenault [Fri, 13 Oct 2017 19:55:45 +0000 (19:55 +0000)]
DAG: Add opcode and source type to isFPExtFree

This is only currently used for mad/fma transforms.
This is the only case where it should be used for AMDGPU,
so add an opcode to be sure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315740 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Hexagon] Minimize number of repeated constant extenders
Krzysztof Parzyszek [Fri, 13 Oct 2017 19:02:59 +0000 (19:02 +0000)]
[Hexagon] Minimize number of repeated constant extenders

Each constant extender requires an extra instruction, which adds to the
code size and also reduces the number of available slots in an instruction
packet. In most cases, the value of a repeated constant extender could be
loaded into a register, and the instructions using the extender could be
replaced with their counterparts that use that register instead.

This patch adds a pass that tries to reduce the number of constant
extenders, including extenders which differ only in an immediate offset
known at compile time, e.g. @global and @global+12.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315735 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRevert r315148 [TableGen] Avoid unnecessary std::string creations
Daniel Sanders [Fri, 13 Oct 2017 19:00:01 +0000 (19:00 +0000)]
Revert r315148 [TableGen] Avoid unnecessary std::string creations

I'm about to commit a patch that makes them necessary for getPredCode() and
it would be strange for getPredCode() and getImmCode() to require different
usage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315733 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InstCombine] use local var to reduce code duplication; NFCI
Sanjay Patel [Fri, 13 Oct 2017 18:32:53 +0000 (18:32 +0000)]
[InstCombine] use local var to reduce code duplication; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315728 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[LLVMCore] fix description for OverflowingBinaryOperator; NFC
Sanjay Patel [Fri, 13 Oct 2017 18:25:23 +0000 (18:25 +0000)]
[LLVMCore] fix description for OverflowingBinaryOperator; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315726 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add initial skeleton support for knm cpu
Craig Topper [Fri, 13 Oct 2017 18:10:17 +0000 (18:10 +0000)]
[X86] Add initial skeleton support for knm cpu

This adds Intel's Knights Mill CPU to valid CPU names for the backend. For now its an alias of "knl", but ultimately we need to support AVX5124FMAPS and AVX5124VNNIW instruction sets for it.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315722 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[IPSCCP] Move common functions to ValueLatticeUtils (NFC)
Matthew Simpson [Fri, 13 Oct 2017 17:53:44 +0000 (17:53 +0000)]
[IPSCCP] Move common functions to ValueLatticeUtils (NFC)

This patch moves some common utility functions out of IPSCCP and makes them
available globally. The functions determine if interprocedural data-flow
analyses can propagate information through function returns, arguments, and
global variables.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315719 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InstCombine] add hasOneUse check to add-zext-add fold to prevent increasing instructions
Sanjay Patel [Fri, 13 Oct 2017 17:47:25 +0000 (17:47 +0000)]
[InstCombine] add hasOneUse check to add-zext-add fold to prevent increasing instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315718 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InstCombine] add tests for add (zext (add nuw X, C2)), C --> zext (add nuw X, C2...
Sanjay Patel [Fri, 13 Oct 2017 17:42:12 +0000 (17:42 +0000)]
[InstCombine] add tests for add (zext (add nuw X, C2)), C --> zext (add nuw X, C2 + C); NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315717 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-demangle-fuzzer] Add a fuzz target for ItaniumDemangler.
Matt Morehouse [Fri, 13 Oct 2017 17:35:37 +0000 (17:35 +0000)]
[llvm-demangle-fuzzer] Add a fuzz target for ItaniumDemangler.

Patch By: hctim

Reviewers: morehouse, bogner

Reviewed By: bogner

Subscribers: bogner, kcc, llvm-commits, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315716 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-cov] Reland sources-specified.test with addition of "-path-equivalence".
Max Moroz [Fri, 13 Oct 2017 17:27:39 +0000 (17:27 +0000)]
[llvm-cov] Reland sources-specified.test with addition of "-path-equivalence".

Summary: This version of tests should be working properly.

Reviewers: vsk

Reviewed By: vsk

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315714 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SCEV] Maintain and use a loop->loop invalidation dependency
Sanjoy Das [Fri, 13 Oct 2017 17:13:44 +0000 (17:13 +0000)]
[SCEV] Maintain and use a loop->loop invalidation dependency

Summary:
This change uses the loop use list added in the previous change to remember the
loops that appear in the trip count expressions of other loops; and uses it in
forgetLoop.  This lets us not scan every loop in the function on a forgetLoop
call.

With this change we no longer invalidate clear out backedge taken counts on
forgetValue.  I think this is fine -- the contract is that SCEV users must call
forgetLoop(L) if their change to the IR could have changed the trip count of L;
solely calling forgetValue on a value feeding into the backedge condition of L
is not enough.  Moreover, I don't think we can strengthen forgetValue to be
sufficient for invalidating trip counts without significantly re-architecting
SCEV.  For instance, if we have the loop:

  I = *Ptr;
  E = I + 10;
  do {
    // ...
  } while (++I != E);

then the backedge taken count of the loop is 9, and it has no reference to
either I or E, i.e. there is no way in SCEV today to re-discover the dependency
of the loop's trip count on E or I.  So a SCEV client cannot change E to (say)
"I + 20", call forgetValue(E) and expect the loop's trip count to be updated.

Reviewers: atrick, sunfish, mkazantsev

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315713 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Test scalar integer absolutes on 32-bit targets with/without CMOV
Simon Pilgrim [Fri, 13 Oct 2017 17:09:20 +0000 (17:09 +0000)]
[X86] Test scalar integer absolutes on 32-bit targets with/without CMOV

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315711 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoNot all buildbots seem to dump the nuw flag in SDAG
Reid Kleckner [Fri, 13 Oct 2017 17:00:49 +0000 (17:00 +0000)]
Not all buildbots seem to dump the nuw flag in SDAG

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315710 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InstCombine] use AddOne helper to reduce code; NFC
Sanjay Patel [Fri, 13 Oct 2017 17:00:47 +0000 (17:00 +0000)]
[InstCombine] use AddOne helper to reduce code; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315709 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Updated scalar integer absolute tests to cover i8/i16/i32/i64
Simon Pilgrim [Fri, 13 Oct 2017 16:53:07 +0000 (16:53 +0000)]
[X86] Updated scalar integer absolute tests to cover i8/i16/i32/i64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315706 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InstCombine] rearrange code to remove repeated constant check; NFCI
Sanjay Patel [Fri, 13 Oct 2017 16:43:58 +0000 (16:43 +0000)]
[InstCombine] rearrange code to remove repeated constant check; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315703 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InstCombine] allow zext(bool) + C --> select bool, C+1, C for vector types
Sanjay Patel [Fri, 13 Oct 2017 16:29:38 +0000 (16:29 +0000)]
[InstCombine] allow zext(bool) + C --> select bool, C+1, C for vector types

The backend should be prepared for this transform after:
https://reviews.llvm.org/rL311731

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315701 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[TableGen] : Simplify RegisterInfoEmitter
Javed Absar [Fri, 13 Oct 2017 16:27:57 +0000 (16:27 +0000)]
[TableGen] : Simplify RegisterInfoEmitter

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315700 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoUpdate test to expect nuw flag in SDAG dump, fixes test after r315690
Reid Kleckner [Fri, 13 Oct 2017 16:13:23 +0000 (16:13 +0000)]
Update test to expect nuw flag in SDAG dump, fixes test after r315690

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315698 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agolit.py: Add new %{shared_output(LABEL)} substitution
Jordan Rose [Fri, 13 Oct 2017 16:12:23 +0000 (16:12 +0000)]
lit.py: Add new %{shared_output(LABEL)} substitution

This refers to a temporary path that can be shared across all tests,
identified by a particular label. This can be used for things like
caches.

At the moment, the character set for the LABEL is limited to C
identifier characters, plus '-', '+', '=', and '.'. This is the same
set of characters currently allowed in REQUIRES clause identifiers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315697 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Fix some inconsistent formatting in the processor feature lists.
Craig Topper [Fri, 13 Oct 2017 16:06:06 +0000 (16:06 +0000)]
[X86] Fix some inconsistent formatting in the processor feature lists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315696 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add ProcIntelBDW to BroadwellProc class not BDWFeatures class.
Craig Topper [Fri, 13 Oct 2017 16:04:08 +0000 (16:04 +0000)]
[X86] Add ProcIntelBDW to BroadwellProc class not BDWFeatures class.

This isn't a property we want inherited.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315695 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[RS4GC] Look through vector bitcasts when looking for base pointer
Daniel Neilson [Fri, 13 Oct 2017 15:59:13 +0000 (15:59 +0000)]
[RS4GC] Look through vector bitcasts when looking for base pointer

Summary:
 In RS4GC it is possible that a base pointer is contained in a vector that
has undergone a bitcast from one element-pointertype to another. We teach
RS4GC how to look through bitcasts of vector types when looking for a base
pointer.

Reviewers: anna

Reviewed By: anna

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315694 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-cov] Temporary delete sources-specified.test, it is failing on some bots.
Max Moroz [Fri, 13 Oct 2017 15:58:58 +0000 (15:58 +0000)]
[llvm-cov] Temporary delete sources-specified.test, it is failing on some bots.

Summary: http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/5950/steps/test-stage1-compiler/logs/stdio

Reviewers: vsk, Dor1s

Reviewed By: Dor1s

Subscribers: mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315693 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Hexagon] Add patterns for cmpb/cmph with immediate arguments
Krzysztof Parzyszek [Fri, 13 Oct 2017 15:43:12 +0000 (15:43 +0000)]
[Hexagon] Add patterns for cmpb/cmph with immediate arguments

Patch by Sumanth Gundapaneni.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315692 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-cov] Fix sources-specified.test so it ignores the order of files printed.
Max Moroz [Fri, 13 Oct 2017 15:41:51 +0000 (15:41 +0000)]
[llvm-cov] Fix sources-specified.test so it ignores the order of files printed.

Summary: https://reviews.llvm.org/D38884#896964

Reviewers: vsk, Dor1s

Reviewed By: Dor1s

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315691 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoDAG: Add flags to dumps
Matt Arsenault [Fri, 13 Oct 2017 15:41:40 +0000 (15:41 +0000)]
DAG: Add flags to dumps

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315690 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-cov] An attempt to fix sources_specified.test failing on some buildbots.
Max Moroz [Fri, 13 Oct 2017 15:30:24 +0000 (15:30 +0000)]
[llvm-cov] An attempt to fix sources_specified.test failing on some buildbots.

Summary: https://reviews.llvm.org/rL315685#115380

Reviewers: vsk, Dor1s

Reviewed By: Dor1s

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315687 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Stop creating CMOV nodes with a second MVT::Glue result
Craig Topper [Fri, 13 Oct 2017 15:28:35 +0000 (15:28 +0000)]
[X86] Stop creating CMOV nodes with a second MVT::Glue result

Summary: We seem to inconsistently create CMOV nodes some with a Glue result and some without. But I can't find any cases that use the Glue result. So I've tried to remove all the place that did this.

Reviewers: RKSimon, spatel, zvi

Reviewed By: RKSimon

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315686 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-cov] Generate "report" for given source paths if sources are specified.
Max Moroz [Fri, 13 Oct 2017 14:44:51 +0000 (14:44 +0000)]
[llvm-cov] Generate "report" for given source paths if sources are specified.

Summary:
Documentation says that user can specify sources for both "show" and
"report" commands. "Show" command respects specified sources, but "report" does
not. It is useful to have both "show" and "report" generated for specified
sources. Also added tests to for both commands with sources specified.

Reviewers: vsk, kcc

Reviewed By: vsk

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315685 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRe-land "[dsymutil] Timestmap verification for __swift_ast"
Jonas Devlieghere [Fri, 13 Oct 2017 14:41:23 +0000 (14:41 +0000)]
Re-land "[dsymutil] Timestmap verification for __swift_ast"

This patch adds timestamp verification for swiftmodule files. A new flag
is provided to allows us to disable this check in order to allow testing
of this feature.

Differential revision: https://reviews.llvm.org/D38686

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315684 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SCEV] Teach SCEV to find maxBECount when loop endbound is variant
Anna Thomas [Fri, 13 Oct 2017 14:30:43 +0000 (14:30 +0000)]
[SCEV] Teach SCEV to find maxBECount when loop endbound is variant

Summary:
This patch teaches SCEV to calculate the maxBECount when the end bound
of the loop can vary. Note that we cannot calculate the exactBECount.

This will only be done when both conditions are satisfied:
1. the loop termination condition is strictly LT.
2. the IV is proven to not overflow.

This provides more information to users of SCEV and can be used to
improve identification of finite loops.

Reviewers: sanjoy, mkazantsev, silviu.baranga, atrick

Reviewed by: mkazantsev

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315683 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InstCombine] add tests for boolean extend + add; NFC
Sanjay Patel [Fri, 13 Oct 2017 14:09:45 +0000 (14:09 +0000)]
[InstCombine] add tests for boolean extend + add; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315681 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRevert r314923: "Recommit : Use the basic cost if a GEP is not used as addressing...
Daniel Jasper [Fri, 13 Oct 2017 14:04:21 +0000 (14:04 +0000)]
Revert r314923: "Recommit : Use the basic cost if a GEP is not used as addressing mode"

Significantly reduces performancei (~30%) of gipfeli
(https://github.com/google/gipfeli)

I have not yet managed to reproduce this regression with the open-source
version of the benchmark on github, but will work with others to get a
reproducer to you later today.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315680 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[FileCheck] regexp doc update/fix
Sjoerd Meijer [Fri, 13 Oct 2017 14:02:36 +0000 (14:02 +0000)]
[FileCheck] regexp doc update/fix

Minor doc update that the FileCheck matcher supports POSIX ERE.
It also fixes a minor issue in the regexp describing a variable
name: underscores are allowed too.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315679 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoDisable gcov instrumentation of functions using funclet-based exception handling
Marco Castelluccio [Fri, 13 Oct 2017 13:49:15 +0000 (13:49 +0000)]
Disable gcov instrumentation of functions using funclet-based exception handling

Summary: This patch fixes the crash from https://bugs.llvm.org/show_bug.cgi?id=34659 and https://bugs.llvm.org/show_bug.cgi?id=34833.

Reviewers: rnk, majnemer

Reviewed By: rnk, majnemer

Subscribers: majnemer, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315677 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agodocs: Improve wording on building for fuzzing
Justin Bogner [Fri, 13 Oct 2017 06:29:09 +0000 (06:29 +0000)]
docs: Improve wording on building for fuzzing

The original sentence didn't really make sense.

Patch by Vedant Kumar. Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315676 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Remove patterns that select unmasked vbroadcastf2x32/vbroadcasti2x32. Prefer...
Craig Topper [Fri, 13 Oct 2017 06:07:10 +0000 (06:07 +0000)]
[X86] Remove patterns that select unmasked vbroadcastf2x32/vbroadcasti2x32. Prefer vbroadcastsd/vpbroadcastq instead.

There's no advantage to using these instructions when they aren't masked. This enables some additional execution domain switching without needing to update the table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315674 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SCEV] Maintain loop use lists, and use them in forgetLoop
Sanjoy Das [Fri, 13 Oct 2017 05:50:52 +0000 (05:50 +0000)]
[SCEV] Maintain loop use lists, and use them in forgetLoop

Summary:
Currently we do not correctly invalidate memoized results for add recurrences
that were created directly (i.e. they were not created from a `Value`).  This
change fixes this by keeping loop use lists and using the loop use lists to
determine which SCEV expressions to invalidate.

Here are some statistics on the number of uses of in the use lists of all loops
on a clang bootstrap (config: release, no asserts):

     Count: 731310
       Min: 1
      Mean: 8.555150
50th %time: 4
95th %tile: 25
99th %tile: 53
       Max: 433

Reviewers: atrick, sunfish, mkazantsev

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315672 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SelectionDAG] Cleanup the SIGN_EXTEND_INREG handling in computeKnownBits. NFCI
Craig Topper [Fri, 13 Oct 2017 05:35:35 +0000 (05:35 +0000)]
[SelectionDAG] Cleanup the SIGN_EXTEND_INREG handling in computeKnownBits. NFCI

Use less temporary APInts. Use bit counting more. Don't call getScalarSizeInBits so many places, just capture it once.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315671 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SelectionDAG] Fix typo in comment. NFC
Craig Topper [Fri, 13 Oct 2017 05:35:34 +0000 (05:35 +0000)]
[SelectionDAG] Fix typo in comment. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315670 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agodocs: Improve the docs about llvm-isel-fuzzer on OSS Fuzz
Justin Bogner [Fri, 13 Oct 2017 00:27:35 +0000 (00:27 +0000)]
docs: Improve the docs about llvm-isel-fuzzer on OSS Fuzz

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315651 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add the test case for r315613 that I forgot to 'git add'.
Craig Topper [Fri, 13 Oct 2017 00:20:47 +0000 (00:20 +0000)]
[X86] Add the test case for r315613 that I forgot to 'git add'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315649 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SelectionDAG] Correct the early out in SelectionDAG::getZeroExtendInReg to work...
Craig Topper [Fri, 13 Oct 2017 00:18:58 +0000 (00:18 +0000)]
[SelectionDAG] Correct the early out in SelectionDAG::getZeroExtendInReg to work properly for vector types.

I don't know if we ever hit this case or not. Turning it into an assert only fired on expanding some atomic operation in a SystemZ lit test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315648 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-isel-fuzzer] Use "--" as separator rather than '='.
Matt Morehouse [Fri, 13 Oct 2017 00:18:32 +0000 (00:18 +0000)]
[llvm-isel-fuzzer] Use "--" as separator rather than '='.

Summary: OSS-Fuzz doesn't support '=' in filenames.

Reviewers: bogner, kcc

Reviewed By: kcc

Subscribers: javed.absar, hiraditya, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315647 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agollvm-isel-fuzzer: Use the right REQUIRES line for r315599
Justin Bogner [Fri, 13 Oct 2017 00:17:54 +0000 (00:17 +0000)]
llvm-isel-fuzzer: Use the right REQUIRES line for r315599

I'd mixed up ENABLE_SHARED and BUILD_SHARED_LIBS before, so these
tests were being disabled in too many places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315646 91177308-0d34-0410-b5e6-96231b3b80d8