]> granicus.if.org Git - llvm/log
llvm
5 years ago[FileCollector] test: disable the directory entry collection checks on windows
Alex Lorenz [Tue, 30 Jul 2019 00:27:33 +0000 (00:27 +0000)]
[FileCollector] test: disable the directory entry collection checks on windows

Looks like one of the entries isn't found on windows. I'm investigating why.
In the meantime, I'll disable this part of the test on windows.

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

5 years ago[FileCollector] Add a VFS that records FS accesses using the FileCollector
Alex Lorenz [Mon, 29 Jul 2019 23:38:30 +0000 (23:38 +0000)]
[FileCollector] Add a VFS that records FS accesses using the FileCollector

This patch adds a VFS that can be overlaid on top of another VFS
to record file system accesses using the FileCollector.
This can help to gather files that are needed for reproducers.

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

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

5 years ago[NFC] avoid AlignedCharArray in LLVM
JF Bastien [Mon, 29 Jul 2019 23:37:48 +0000 (23:37 +0000)]
[NFC] avoid AlignedCharArray in LLVM

As discussed in D65249, don't use AlignedCharArray or std::aligned_storage. Just use alignas(X) char Buf[Size];. This will allow me to remove AlignedCharArray entirely, and works on the current minimum version of Visual Studio.

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

5 years ago[llvm-lipo] Fix test on Windows
Anusha Basana [Mon, 29 Jul 2019 22:27:27 +0000 (22:27 +0000)]
[llvm-lipo] Fix test on Windows

Error message outputs with lowercase on Windows.
Made test work on Widnows.

For example:
llvm-lipo: error: 'i386': no such file or directory

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

5 years ago[clang-tidy]: Google: new check 'google-upgrade-googletest-case'
Eric Fiselier [Mon, 29 Jul 2019 21:38:56 +0000 (21:38 +0000)]
[clang-tidy]: Google: new check 'google-upgrade-googletest-case'

Introduce a new check to upgrade user code based on API changes in Googletest.

The check finds uses of old Googletest APIs with "case" in their name and replaces them with the new APIs named with "suite".

Patch by Alex Strelnikov (strel@google.com)
Reviewed as D62977.

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

5 years agogit-llvm: Restore compatibility with git 1.8.3.
James Y Knight [Mon, 29 Jul 2019 21:01:11 +0000 (21:01 +0000)]
git-llvm: Restore compatibility with git 1.8.3.

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

5 years ago[IR] Consolidate fixed metadata kind definitions (NFC)
Vedant Kumar [Mon, 29 Jul 2019 20:24:20 +0000 (20:24 +0000)]
[IR] Consolidate fixed metadata kind definitions (NFC)

Put the list of fixed metadata kinds in one place.

Testing: check-llvm with+without LLVM_ENABLE_MODULES=On

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

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

5 years ago[PowerPC][NFC]Fix a typo in comment.
Jinsong Ji [Mon, 29 Jul 2019 19:27:54 +0000 (19:27 +0000)]
[PowerPC][NFC]Fix a typo in comment.

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

5 years ago[X86] Fix typo in comment. We're looking at a right shift not a left shift. NFC
Craig Topper [Mon, 29 Jul 2019 19:22:51 +0000 (19:22 +0000)]
[X86] Fix typo in comment. We're looking at a right shift not a left shift. NFC

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

5 years ago[llvm-lipo] Implement -replace
Anusha Basana [Mon, 29 Jul 2019 18:46:34 +0000 (18:46 +0000)]
[llvm-lipo] Implement -replace

Replaces specified architecture in universal binary input file with
slice from the file_name argument passed into the replace command.

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

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

5 years agogn build: Merge r367071
Vitaly Buka [Mon, 29 Jul 2019 17:48:02 +0000 (17:48 +0000)]
gn build: Merge r367071

llvm-svn: 366289

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

5 years ago[UpdateTestChecks] Emit warning when invalid value for -check-prefix(es) option
David Bolvansky [Mon, 29 Jul 2019 17:41:00 +0000 (17:41 +0000)]
[UpdateTestChecks] Emit warning when invalid value for -check-prefix(es) option

Summary:
The script is silent for the following issue:
FileCheck %s -check-prefix=CHECK,POPCOUNT

FileCheck will catch it later, but I think we can warn here too.

Now it warns:
 ./update_llc_test_checks.py file.ll
WARNING: Supplied prefix 'CHECK,POPCOUNT' is invalid. Prefix must contain only alphanumeric characters, hyphens and underscores. Did you mean --check-prefixes=CHECK,POPCOUNT?

Reviewers: lebedev.ri, spatel, RKSimon, craig.topper, nikic, gbedwell

Reviewed By: RKSimon

Subscribers: llvm-commits

Tags: #llvm

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

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

5 years ago[Remarks] Update error message format string
Francis Visoiu Mistrih [Mon, 29 Jul 2019 17:40:34 +0000 (17:40 +0000)]
[Remarks] Update error message format string

All the clang-cmake-armv{7,8} bots are failing this test. This is an
attempt to fix this.

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

5 years agoThinLTOBitcodeWriter: Include globals associated with type metadata globals in the...
Peter Collingbourne [Mon, 29 Jul 2019 17:22:40 +0000 (17:22 +0000)]
ThinLTOBitcodeWriter: Include globals associated with type metadata globals in the merged module.

Globals that are associated with globals with type metadata need to appear
in the merged module because they will reference the global's section directly.

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

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

5 years ago[X86] resolveTargetShuffleInputs - add depth to limit recursion.
Simon Pilgrim [Mon, 29 Jul 2019 17:17:58 +0000 (17:17 +0000)]
[X86] resolveTargetShuffleInputs - add depth to limit recursion.

Avoids slow downs from calls to ComputeNumSignBits/computeKnownBits going too deep.

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

5 years agoAMDGPU/LoadStoreOptimizer: combine MMOs when merging instructions
Tom Stellard [Mon, 29 Jul 2019 16:40:58 +0000 (16:40 +0000)]
AMDGPU/LoadStoreOptimizer: combine MMOs when merging instructions

Summary:
The LoadStoreOptimizer was creating instructions with 2
MachineMemOperands, which meant they were assumed to alias with all other instructions,
because MachineInstr:mayAlias() returns true when an instruction has multiple
MachineMemOperands.

This was preventing these instructions from being merged again, and was
giving the scheduler less freedom to reorder them.

Reviewers: arsenm, nhaehnle

Reviewed By: arsenm

Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

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

5 years ago[llvm-objcopy] Improve --add-section argument string parsing
Sergey Dmitriev [Mon, 29 Jul 2019 16:22:40 +0000 (16:22 +0000)]
[llvm-objcopy] Improve --add-section argument string parsing

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

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

5 years ago[AMDGPU] Fix typo in error message
Jay Foad [Mon, 29 Jul 2019 16:17:13 +0000 (16:17 +0000)]
[AMDGPU] Fix typo in error message

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

5 years ago[NFC][FPEnv] Pre-commit tests for canonicalize negated operand of fdiv.
Cameron McInally [Mon, 29 Jul 2019 16:09:56 +0000 (16:09 +0000)]
[NFC][FPEnv] Pre-commit tests for canonicalize negated operand of fdiv.

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

5 years ago[X86] combineX86ShufflesRecursively - start recursion at depth = 0. NFCI.
Simon Pilgrim [Mon, 29 Jul 2019 15:57:06 +0000 (15:57 +0000)]
[X86] combineX86ShufflesRecursively - start recursion at depth = 0. NFCI.

As discussed on rL367171, we have a problem where the depth recursion used in combineX86ShufflesRecursively was subtly different to computeKnownBits etc. - it starts at Depth=1 instead of Depth=0 like the others and has a different maximum recursion depth.

This NFC patch fixes the recursion depth to start at 0, so we can more easily reuse depth values in calls from combineX86ShufflesRecursively and its helper functions in computeKnownBits etc.

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

5 years ago[RISCV] Fix uninitialized variable after call to evaluateConstantImm
Francis Visoiu Mistrih [Mon, 29 Jul 2019 15:52:13 +0000 (15:52 +0000)]
[RISCV] Fix uninitialized variable after call to evaluateConstantImm

For llvm/test/MC/RISCV/rv64i-aliases-invalid.s, UBSan reports:

lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:371:9: runtime error:
load of value 3879186881, which is not a valid value for type
'RISCVMCExpr::VariantKind'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:371:9 in

It turns out that evaluateConstantImm does not set `VK` and it remains
unitialized when doing comparisons in `isImmXLenLI()`.

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

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

5 years ago[InstCombine] fold fadd+fneg with fdiv/fmul betweena
Sanjay Patel [Mon, 29 Jul 2019 13:50:25 +0000 (13:50 +0000)]
[InstCombine] fold fadd+fneg with fdiv/fmul betweena

The backend already does this via isNegatibleForFree(),
but we may want to alter the fneg IR canonicalizations
that currently exist, so we need to try harder to fold
fneg in IR to avoid regressions.

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

5 years ago[ValueTracking] Remove volatile check in isGuaranteedToTransferExecutionToSuccessor
Hideto Ueno [Mon, 29 Jul 2019 13:35:34 +0000 (13:35 +0000)]
[ValueTracking] Remove volatile check in isGuaranteedToTransferExecutionToSuccessor

Summary: As clarified in D53184, volatile load and store do not trap. Therefore, we should remove volatile checks for instructions in  `isGuaranteedToTransferExecutionToSuccessor`.

Reviewers: jdoerfert, efriedma, nikic

Reviewed By: nikic

Subscribers: hiraditya, jfb, llvm-commits

Tags: #llvm

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

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

5 years ago[InstCombine] reduce code for fadd with fneg operand; NFC
Sanjay Patel [Mon, 29 Jul 2019 13:20:46 +0000 (13:20 +0000)]
[InstCombine] reduce code for fadd with fneg operand; NFC

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

5 years ago[InstCombine] add tests for fadd with negated operand; NFC
Sanjay Patel [Mon, 29 Jul 2019 12:49:36 +0000 (12:49 +0000)]
[InstCombine] add tests for fadd with negated operand; NFC

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

5 years ago[AMDGPU] Add amdgpu_kernel for consistency with other tests
Jay Foad [Mon, 29 Jul 2019 11:48:17 +0000 (11:48 +0000)]
[AMDGPU] Add amdgpu_kernel for consistency with other tests

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

5 years ago[DAGCombine] narrowInsertExtractVectorBinOp - early out for binops that change value...
Simon Pilgrim [Mon, 29 Jul 2019 11:34:45 +0000 (11:34 +0000)]
[DAGCombine] narrowInsertExtractVectorBinOp - early out for binops that change value type. NFCI.

This is implicit in the value type checks in getSubVectorSrc - this just makes it upfront and obvious.

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

5 years ago[DivergenceAnalysis] Add methods for querying divergence at use
Jay Foad [Mon, 29 Jul 2019 10:22:09 +0000 (10:22 +0000)]
[DivergenceAnalysis] Add methods for querying divergence at use

Summary:
The existing isDivergent(Value) methods query whether a value is
divergent at its definition. However even if a value is uniform at its
definition, a use of it in another basic block can be divergent because
of divergent control flow between the def and the use.

This patch adds new isDivergent(Use) methods to DivergenceAnalysis,
LegacyDivergenceAnalysis and GPUDivergenceAnalysis.

This might allow D63953 or other similar workarounds to be removed.

Reviewers: alex-t, nhaehnle, arsenm, rtaylor, rampitec, simoll, jingyue

Reviewed By: nhaehnle

Subscribers: jfb, jvesely, wdng, hiraditya, llvm-commits

Tags: #llvm

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

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

5 years ago[SystemZ] Regenerate <8 x i31> store test
Simon Pilgrim [Mon, 29 Jul 2019 09:49:23 +0000 (09:49 +0000)]
[SystemZ] Regenerate <8 x i31> store test

To help show the diffs from an upcoming SimplifyDemandedBits patch.

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

5 years agoMark test/MC/RISCV/rv{32,64}i-aliases-invalid.s unsupported also on Windows
Hans Wennborg [Mon, 29 Jul 2019 09:49:04 +0000 (09:49 +0000)]
Mark test/MC/RISCV/rv{32,64}i-aliases-invalid.s unsupported also on Windows

Because they fail there too.

FAIL: LLVM :: MC/RISCV/rv32i-aliases-invalid.s (24397 of 32659)
******************** TEST 'LLVM :: MC/RISCV/rv32i-aliases-invalid.s' FAILED ********************
Script:
--
: 'RUN: at line 2';   not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s -triple=riscv32 -riscv-no-aliases 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s
: 'RUN: at line 3';   not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s -triple=riscv32 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s
--
Exit Code: 1

Command Output (stdout):
--
$ ":" "RUN: at line 2"
$ "not" "c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s" "-triple=riscv32" "-riscv-no-aliases"
$ "c:\src\llvm.monorepo\build.release2\bin\filecheck.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s"
C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s:10:21: error: CHECK: expected string not found in input
li t4, foo # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-21474836484294967295]
                    ^
<stdin>:5:1: note: scanning from here
li x0, -2147483649 # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-21474836484294967295]
^
<stdin>:5:1: note: with "@LINE" equal to "10"
li x0, -2147483649 # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-21474836484294967295]
^
<stdin>:5:38: note: possible intended match here
li x0, -2147483649 # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-21474836484294967295]
                                     ^

error: command failed with exit status: 1

--

--
********************
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70
FAIL: LLVM :: MC/RISCV/rv64i-aliases-invalid.s (24416 of 32659)
******************** TEST 'LLVM :: MC/RISCV/rv64i-aliases-invalid.s' FAILED ********************
Script:
--
: 'RUN: at line 2';   not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s -triple=riscv64 -riscv-no-aliases 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s
: 'RUN: at line 3';   not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s -triple=riscv64 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s
--
Exit Code: 1

Command Output (stdout):
--
$ ":" "RUN: at line 2"
$ "not" "c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s" "-triple=riscv64" "-riscv-no-aliases"
$ "c:\src\llvm.monorepo\build.release2\bin\filecheck.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s"
C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s:6:21: error: CHECK: expected string not found in input
li t4, foo # CHECK: :[[@LINE]]:8: error: operand must be a constant 64-bit integer
                    ^
<stdin>:2:1: note: scanning from here
li t5, 0x10000000000000000 # CHECK: :[[@LINE]]:8: error: unknown operand
^
<stdin>:2:1: note: with "@LINE" equal to "6"
li t5, 0x10000000000000000 # CHECK: :[[@LINE]]:8: error: unknown operand
^
<stdin>:13:67: note: possible intended match here
C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s:12:13: error: immediate must be an integer in the range [0, 63]
                                                                  ^

error: command failed with exit status: 1

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

5 years ago[ARM] Regenerate rotation tests
Simon Pilgrim [Mon, 29 Jul 2019 09:48:07 +0000 (09:48 +0000)]
[ARM] Regenerate rotation tests

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

5 years ago[AMDGPU] Regenerate v2i16 insertelement tests.
Simon Pilgrim [Mon, 29 Jul 2019 09:47:07 +0000 (09:47 +0000)]
[AMDGPU] Regenerate v2i16 insertelement tests.

To help show the diffs from an upcoming SimplifyDemandedBits patch.

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

5 years ago[NFC][ARM[ParallelDSP] Cleanup of BinOpChain
Sam Parker [Mon, 29 Jul 2019 08:41:51 +0000 (08:41 +0000)]
[NFC][ARM[ParallelDSP] Cleanup of BinOpChain

- Remove some unused typedefs.
- Rename BinOpChain struct to MulCandidate.
- Remove the size method of MulCandidate.
- Store only the first input of the ValueList provided to
  MulCandidate, as it's the only value we care about. This means we
  don't have to perform any ugly (and unnecessary) iterations of the
  list later on.

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

5 years ago[AMDGPU] Enable v4f16 and above for v_pk_fma instructions
David Stuttard [Mon, 29 Jul 2019 08:15:10 +0000 (08:15 +0000)]
[AMDGPU] Enable v4f16 and above for v_pk_fma instructions

Summary:
If isel is presented with <2 x half> vectors then it will correctly select
v_pk_fma style instructions.
If isel is presented with e.g. <4 x half> vectors it will scalarize, unlike for
other instruction types (such as fadd, fmul etc.)

Added extra support to enable this. Updated one of the tests to include a test
for this (as well as extending the test to GFX9)

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, llvm-commits

Tags: #llvm

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

Change-Id: I50a4577a3f8223fb53992af3b7d26121f65b71ee

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

5 years ago[NFC][ARM][ParallelDSP] Remove AreSymmetrical
Sam Parker [Mon, 29 Jul 2019 08:12:24 +0000 (08:12 +0000)]
[NFC][ARM][ParallelDSP] Remove AreSymmetrical

We explicitly search for a parallel mac and we only care about its
inputs, checking for symmetry doesn't add anything here.

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

5 years ago[NFC][ARM][ParallelDSP] Remove PopulateLoads
Sam Parker [Mon, 29 Jul 2019 08:07:23 +0000 (08:07 +0000)]
[NFC][ARM][ParallelDSP] Remove PopulateLoads

We no longer have to check what loads are used, all this
is performed at the start of the transform, so it's not
doing anything now.

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

5 years ago[obj2yaml] - Report a error when unable to resolve a sh_link reference properly.
George Rimar [Mon, 29 Jul 2019 07:58:29 +0000 (07:58 +0000)]
[obj2yaml] - Report a error when unable to resolve a sh_link reference properly.

Because of a bug we did not report a error in the case
shown in the test. With this patch we do.

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

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

5 years ago[llvm-objcopy] - Reimplement strip-dwo-groups.test to stop using the precompiled...
George Rimar [Mon, 29 Jul 2019 07:55:39 +0000 (07:55 +0000)]
[llvm-objcopy] - Reimplement strip-dwo-groups.test to stop using the precompiled object.

When llvm-copy removes .dwo sections the index of symbol table,
the indices of the symbols and the indices of the sections which go
after the removed ones changes. That affects on SHT_GROUP sections,
which needs to be updated.

Initially this test used a precompiled object, I rewrote it to use YAML
and improved a bit.

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

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

5 years ago[X86] Don't use PMADDWD for vector add reductions of multiplies if the mul inputs...
Craig Topper [Mon, 29 Jul 2019 01:36:58 +0000 (01:36 +0000)]
[X86] Don't use PMADDWD for vector add reductions of multiplies if the mul inputs have an additional user.

The pmaddwd inserts a truncate, if that truncate would end up
creating additional instructions instead of making a zext
narrower, then we shouldn't do it.

I've restricted this to only sse4.1 targets since on prior
targets the zext will be done in stages. So the truncate will
probably not create additional instructions. Might need some
more investigation of mul shrinking and the other pmaddwd
transform to be sure this is the right decision.

There might be a slight regression on AVX1 targets due to add
splitting. Hard to say for sure. Maybe we need to look into
using the vector reduction flag to use 2 narrow loads and a
blend instead of extracting and inserting.

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

5 years ago[X86] Add test cases to show missing one use check in combineLoopMAddPattern.
Craig Topper [Mon, 29 Jul 2019 01:36:54 +0000 (01:36 +0000)]
[X86] Add test cases to show missing one use check in combineLoopMAddPattern.

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

5 years ago[NFC][InstCombine] Revisit tests in shift-amount-reassociation-with-truncation-shl.ll
Roman Lebedev [Sun, 28 Jul 2019 21:31:58 +0000 (21:31 +0000)]
[NFC][InstCombine] Revisit tests in shift-amount-reassociation-with-truncation-shl.ll

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

5 years ago[X86] In combineLoopMAddPattern and combineLoopSADPattern, preserve the vector reduct...
Craig Topper [Sun, 28 Jul 2019 18:45:42 +0000 (18:45 +0000)]
[X86] In combineLoopMAddPattern and combineLoopSADPattern, preserve the vector reduction flag on the final add. Handle unrolled loops by letting DAG combine revisit.

This reverts r340478 and r340631 and replaces them with a simpler
method of just letting DAG combine revisit the nodes to handle
the other operand.

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

5 years ago[InstCombine] fold fsub+fneg with fdiv/fmul between
Sanjay Patel [Sun, 28 Jul 2019 17:10:06 +0000 (17:10 +0000)]
[InstCombine] fold fsub+fneg with fdiv/fmul between

The backend already does this via isNegatibleForFree(),
but we may want to alter the fneg IR canonicalizations
that currently exist, so we need to try harder to fold
fneg in IR to avoid regressions.

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

5 years ago[ARM] MVE VPNOT
David Green [Sun, 28 Jul 2019 14:07:48 +0000 (14:07 +0000)]
[ARM] MVE VPNOT

This adds the patterns required to transform xor P0, -1 to a VPNOT. The
instruction operands have to change a little for this, adding an in and an out
VCCR reg and using a custom DecodeMVEVPNOT for the decode.

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

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

5 years ago[ARM] Better patterns for fp <> predicate vectors
David Green [Sun, 28 Jul 2019 13:53:39 +0000 (13:53 +0000)]
[ARM] Better patterns for fp <> predicate vectors

These are some better patterns for converting between predicates and floating
points. Much like the extends, we select "1"/"-1" or "0" depending on the
predicate value. Or we perform a compare against 0 to convert to a predicate.

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

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

5 years ago[NFC][InstCombine] Shift amount reassociation: can have trunc between shl's
Roman Lebedev [Sun, 28 Jul 2019 13:13:46 +0000 (13:13 +0000)]
[NFC][InstCombine] Shift amount reassociation: can have trunc between shl's

https://rise4fun.com/Alive/OQbM
Not so simple for lshr/ashr, so those maybe later.

https://bugs.llvm.org/show_bug.cgi?id=42391

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

5 years ago[Attributor] Deduce "align" attribute
Hideto Ueno [Sun, 28 Jul 2019 07:04:01 +0000 (07:04 +0000)]
[Attributor] Deduce "align" attribute

Summary:
Deduce "align" attribute in attributor.

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

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

5 years ago[IR] Fix getPointerAlignment for CallBase
Hideto Ueno [Sun, 28 Jul 2019 06:17:46 +0000 (06:17 +0000)]
[IR] Fix getPointerAlignment for CallBase

Summary:
In current getPointerAlignemnt implementation, CallBase.getPointerAlignement(..) checks only parameter attriutes in the callsite.  For example,

```
declare align 8 i8* @foo()

define void @bar() {
    %a = tail call align 8 i8* @foo() ; getPointerAlignment returns 8
    %b = tail call i8* @foo() ; getPointerAlignemnt returns 0
    ret void
}
```

This patch will fix the problem.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

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

5 years ago[FunctionAttrs] Annotate "willreturn" for intrinsics
Hideto Ueno [Sun, 28 Jul 2019 06:09:56 +0000 (06:09 +0000)]
[FunctionAttrs] Annotate "willreturn" for intrinsics

Summary:
In D62801, new function attribute `willreturn` was introduced. In short, a function with `willreturn` is guaranteed to come back to the call site(more precise definition is in LangRef).

In this patch, willreturn is annotated for LLVM intrinsics.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: jvesely, nhaehnle, sstefan1, llvm-commits

Tags: #llvm

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

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

5 years ago[DAGCombine] narrowInsertExtractVectorBinOp - early out for illegal op. NFCI.
Simon Pilgrim [Sat, 27 Jul 2019 19:42:58 +0000 (19:42 +0000)]
[DAGCombine] narrowInsertExtractVectorBinOp - early out for illegal op. NFCI.

If the subvector binop is illegal then early-out and avoid the subvector searches.

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

5 years agoStricter check for the memory access.
Joerg Sonnenberger [Sat, 27 Jul 2019 18:57:59 +0000 (18:57 +0000)]
Stricter check for the memory access.

The current pattern would trigger for scheduling changes of the
post-load computation, since those are commutable with the inline asm.
Avoid this by explicitly check the order of load vs asm block.

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

5 years agoRegenerate UXTB tests
Simon Pilgrim [Sat, 27 Jul 2019 18:44:15 +0000 (18:44 +0000)]
Regenerate UXTB tests

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

5 years ago[AMDGPU] Regenerate tests.
Simon Pilgrim [Sat, 27 Jul 2019 14:32:23 +0000 (14:32 +0000)]
[AMDGPU] Regenerate tests.

To help show the diffs from an upcoming SimplifyDemandedBits patch.

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

5 years ago[TargetLowering] SimplifyMultipleUseDemandedBits - add BITCAST pass through support...
Simon Pilgrim [Sat, 27 Jul 2019 14:11:59 +0000 (14:11 +0000)]
[TargetLowering] SimplifyMultipleUseDemandedBits - add BITCAST pass through support (Reapplied)

This allows us to peek through BITCASTs, attempt to simplify the source operand, and then bitcast back.

This reapplies rL367091 which was reverted at rL367118 - we were inconsistently peeking through the bitcasts to the source value.

Fixes PR42777

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

5 years ago[InstSimplify] remove quadratic time looping (PR42771)
Sanjay Patel [Sat, 27 Jul 2019 14:05:51 +0000 (14:05 +0000)]
[InstSimplify] remove quadratic time looping (PR42771)

The test case from:
https://bugs.llvm.org/show_bug.cgi?id=42771
...shows a ~30x slowdown caused by the awkward loop iteration (rL207302) that is
seemingly done just to avoid invalidating the instruction iterator. We can instead
delay instruction deletion until we reach the end of the block (or we could delay
until we reach the end of all blocks).

There's a test diff here for a degenerate case with llvm.assume that is not
meaningful in itself, but serves to verify this change in logic.

This change probably doesn't result in much overall compile-time improvement
because we call '-instsimplify' as a standalone pass only once in the standard
-O2 opt pipeline currently.

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

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

5 years ago[X86][SSE] Replace PMULDQ GetDemandedBits combine with SimplifyMultipleUseDemandedBit...
Simon Pilgrim [Sat, 27 Jul 2019 13:30:29 +0000 (13:30 +0000)]
[X86][SSE] Replace PMULDQ GetDemandedBits combine with SimplifyMultipleUseDemandedBits handler (Reapplied)

Recommit rL367100 which was reverted at rL367141. Until PR42777 is fixed, we no longer get the benefits of peeking through bitcasts but it does still remove a GetDemandedBits user and gives us the equivalent combines.

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

5 years ago[SelectionDAG] Check for any recursion depth greater than or equal to limit instead...
Simon Pilgrim [Sat, 27 Jul 2019 12:48:46 +0000 (12:48 +0000)]
[SelectionDAG] Check for any recursion depth greater than or equal to limit instead of just equal the limit.

If anything called the recursive isKnownNeverNaN/computeKnownBits/ComputeNumSignBits/SimplifyDemandedBits/SimplifyMultipleUseDemandedBits with an incorrect depth then we could continue to recurse if we'd already exceeded the depth limit.

This replaces the limit check (Depth == 6) with a (Depth >= 6) to make sure that we don't circumvent it.

This causes a couple of regressions as a mixture of calls (SimplifyMultipleUseDemandedBits + combineX86ShufflesRecursively) were calling with depths that were already over the limit. I've fixed SimplifyMultipleUseDemandedBits to not do this. combineX86ShufflesRecursively is trickier as we get a lot of regressions if we reduce its own limit from 8 to 6 (it also starts at Depth == 1 instead of Depth == 0 like the others....) - I'll see what I can do in future patches.

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

5 years ago[TargetLowering] Add depth limit to SimplifyMultipleUseDemandedBits
Simon Pilgrim [Sat, 27 Jul 2019 12:23:36 +0000 (12:23 +0000)]
[TargetLowering] Add depth limit to SimplifyMultipleUseDemandedBits

We're getting reports of massive compile time increases because SimplifyMultipleUseDemandedBits was losing track of the depth and not earlying-out. No repro yet, but consider this a pre-emptive commit.

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

5 years ago[mips] Add (dis)assembler tests for beqzl and bnezl instructions. NFC
Simon Atanasyan [Sat, 27 Jul 2019 08:13:27 +0000 (08:13 +0000)]
[mips] Add (dis)assembler tests for beqzl and bnezl instructions. NFC

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

5 years ago[AArch64][GlobalISel] Implement narrowing of G_SEXT.
Amara Emerson [Fri, 26 Jul 2019 23:46:38 +0000 (23:46 +0000)]
[AArch64][GlobalISel] Implement narrowing of G_SEXT.

We need this to narrow a sext to s128.

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

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

5 years ago[AArch64][GlobalISel] Select @llvm.aarch64.stlxr for 32-bit pointers
Jessica Paquette [Fri, 26 Jul 2019 23:28:53 +0000 (23:28 +0000)]
[AArch64][GlobalISel] Select @llvm.aarch64.stlxr for 32-bit pointers

Add partial instruction selection for intrinsics like this:

```
declare i32 @llvm.aarch64.stlxr(i64, i32*)
```

(This only handles the case where a G_ZEXT is feeding the intrinsic.)

Also make sure that the added store instruction actually has the memory op from
the original G_STORE.

Update select-stlxr-intrin.mir and arm64-ldxr-stxr.ll.

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

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

5 years ago[Remarks] Silence Wreturn-type warning
Francis Visoiu Mistrih [Fri, 26 Jul 2019 22:42:54 +0000 (22:42 +0000)]
[Remarks] Silence Wreturn-type warning

Shows up here: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/27771/steps/annotate/logs/stdio.

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

5 years ago[Remarks] Update unit test to use StringRef::lower
Francis Visoiu Mistrih [Fri, 26 Jul 2019 22:36:20 +0000 (22:36 +0000)]
[Remarks] Update unit test to use StringRef::lower

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

5 years agoRevert [IPSCCP] Add assertion to surface cases where we zap returns with overdefined...
Florian Hahn [Fri, 26 Jul 2019 22:14:08 +0000 (22:14 +0000)]
Revert [IPSCCP] Add assertion to surface cases where we zap returns with overdefined users.

This reverts r366998 (git commit 5354c83ece00690b4dbfa47925f8f5a8f33f1d9e)

This breaks a linux kernel build and we have reproducer to investigate.

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

5 years agoFix remarks unit test on Windows
Reid Kleckner [Fri, 26 Jul 2019 22:10:44 +0000 (22:10 +0000)]
Fix remarks unit test on Windows

"no such file or directory" vs "No such file or directory"

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

5 years ago[InstCombine] add tests for fsub with negated operand; NFC
Sanjay Patel [Fri, 26 Jul 2019 21:12:22 +0000 (21:12 +0000)]
[InstCombine] add tests for fsub with negated operand; NFC

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

5 years agoReland: [Remarks] Support parsing remark metadata in the YAML remark parser
Francis Visoiu Mistrih [Fri, 26 Jul 2019 21:02:02 +0000 (21:02 +0000)]
Reland: [Remarks] Support parsing remark metadata in the YAML remark parser

This adds support to the yaml remark parser to be able to parse remarks
directly from the metadata.

This supports parsing separate metadata and following the external file
with the associated metadata, and also a standalone file containing
metadata + remarks all together.

Original llvm-svn: 367148
Revert llvm-svn: 367151

This has a fix for gcc builds.

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

5 years ago[JumpThreading] Stop searching predecessor when the current bb is in a
Wei Mi [Fri, 26 Jul 2019 20:59:22 +0000 (20:59 +0000)]
[JumpThreading] Stop searching predecessor when the current bb is in a
unreachable loop.

updatePredecessorProfileMetadata in jumpthreading tries to find the
first dominating predecessor block for a PHI value by searching upwards
the predecessor block chain.

But jumpthreading may see some temporary IR state which contains
unreachable bb not being cleaned up. If an unreachable loop happens to
be on the predecessor block chain, keeping chasing the predecessor
block will run into an infinite loop.

The patch fixes it.

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

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

5 years agoRevert "[Remarks] Support parsing remark metadata in the YAML remark parser"
Francis Visoiu Mistrih [Fri, 26 Jul 2019 20:54:44 +0000 (20:54 +0000)]
Revert "[Remarks] Support parsing remark metadata in the YAML remark parser"

This reverts r367148.

Seems to fail on
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/27768.

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

5 years ago[Remarks] Support parsing remark metadata in the YAML remark parser
Francis Visoiu Mistrih [Fri, 26 Jul 2019 20:11:53 +0000 (20:11 +0000)]
[Remarks] Support parsing remark metadata in the YAML remark parser

This adds support to the yaml remark parser to be able to parse remarks
directly from the metadata.

This supports parsing separate metadata and following the external file
with the associated metadata, and also a standalone file containing
metadata + remarks all together.

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

5 years ago[InstCombine] canonicalize negated operand of fdiv
Sanjay Patel [Fri, 26 Jul 2019 19:56:59 +0000 (19:56 +0000)]
[InstCombine] canonicalize negated operand of fdiv

This is a transform that we use with fmul, so use
it for fdiv too for consistency.

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

5 years ago[InstCombine] add tests for fdiv with negated operand; NFC
Sanjay Patel [Fri, 26 Jul 2019 19:44:53 +0000 (19:44 +0000)]
[InstCombine] add tests for fdiv with negated operand; NFC

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

5 years ago[CMake] Allow LLVM_EXTERNAL_<proj>_SOURCE_DIR to be overridden if it is
Yuanfang Chen [Fri, 26 Jul 2019 19:25:57 +0000 (19:25 +0000)]
[CMake] Allow LLVM_EXTERNAL_<proj>_SOURCE_DIR to be overridden if it is
empty.

This makes adding projects to LLVM_ENABLE_PROJECTS possible.
Also its type should be PATH.

https://bugs.llvm.org/show_bug.cgi?id=42698

Reviewers: beanz, greened, chapuni

Reviewed by: beanz

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

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

5 years ago[MemorySSA & LoopPassManager] Analysis can be preserved only when all loop passes...
Alina Sbirlea [Fri, 26 Jul 2019 18:57:26 +0000 (18:57 +0000)]
[MemorySSA & LoopPassManager] Analysis can be preserved only when all loop passes preserve it.

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

5 years agoadd 'a' to chmod in llvm-lipo executability tests
Bob Haarman [Fri, 26 Jul 2019 18:44:06 +0000 (18:44 +0000)]
add 'a' to chmod in llvm-lipo executability tests

Summary:
When specifying symbolic permissions with + or -, if none of
a/u/g/o are specified, bits set in the umask are not affected.
This caused the llvm-lipo executability tests to fail on some
systems, e.g. having an umask of 027 would cause chmod -x to not
clear the executable bit for others. This change instead
uses chmod a-x, which clears all the executable bits regardless
of umask.

Reviewers: smeenai, hans, anushabasana

Reviewed By: smeenai

Subscribers: llvm-commits

Tags: #llvm

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

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

5 years agoRevert "[X86][SSE] Replace PMULDQ GetDemandedBits combine with SimplifyMultipleUseDem...
Vlad Tsyrklevich [Fri, 26 Jul 2019 18:14:21 +0000 (18:14 +0000)]
Revert "[X86][SSE] Replace PMULDQ GetDemandedBits combine with SimplifyMultipleUseDemandedBits handler."

This reverts r367100, it appears to be causing test failures after
Nico's revert of r367091.

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

5 years ago[PowerPC][AIX]Add lowering of MCSymbol MachineOperand.
Sean Fertile [Fri, 26 Jul 2019 17:25:27 +0000 (17:25 +0000)]
[PowerPC][AIX]Add lowering of MCSymbol MachineOperand.

Adds machine operand lowering for MCSymbolSDNodes to the PowerPC
backend. This is needed to produce call instructions in assembly for AIX
because the callee operand is a MCSymbolSDNode. The test is XFAIL'ed for
asserts due to a (valid) assertion in PEI that the AIX ABI isn't supported yet.

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

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

5 years ago[AMDGPU] Fix typo.
Michael Liao [Fri, 26 Jul 2019 17:13:59 +0000 (17:13 +0000)]
[AMDGPU] Fix typo.

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

5 years ago[llvm-objcopy] Add support for --add-section for COFF
Sergey Dmitriev [Fri, 26 Jul 2019 17:06:41 +0000 (17:06 +0000)]
[llvm-objcopy] Add support for --add-section for COFF

This patch enables support for --add-section=... option for COFF objects.

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

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

5 years ago[AArch64][SVE2] Rename bitperm feature to sve2-bitperm
Cullen Rhodes [Fri, 26 Jul 2019 15:57:50 +0000 (15:57 +0000)]
[AArch64][SVE2] Rename bitperm feature to sve2-bitperm

Summary:
The bitperm feature flag is now prefixed with SVE2, as it is for all other SVE2
extensions

Patch by Maciej Gabka.

Reviewers: sdesmalen, rovka, chill, SjoerdMeijer, rengolin

Reviewed By: SjoerdMeijer, rengolin

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

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

5 years ago[llvm] [lit/tests] Replace 'env -u' with more portable construct
Michal Gorny [Fri, 26 Jul 2019 15:39:05 +0000 (15:39 +0000)]
[llvm] [lit/tests] Replace 'env -u' with more portable construct

Set environment variables to empty values rather than attempting
to unset them via 'env -u', in order to fix NetBSD test regression
caused by r366980.  POSIX does not guarantee that env(1) supports '-u'
option, and indeed NetBSD env(1) does not support it.

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

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

5 years ago[llvm] [FileCheck] Use FILECHECK_DUMP_INPUT_ON_FAILURE only when non-empty
Michal Gorny [Fri, 26 Jul 2019 15:38:57 +0000 (15:38 +0000)]
[llvm] [FileCheck] Use FILECHECK_DUMP_INPUT_ON_FAILURE only when non-empty

Enable dumping output only if FILECHECK_DUMP_INPUT_ON_FAILURE is set to
a non-empty value.  This is necessary to support disabling it via
POSIX-compliant env(1) that does not support '-u' argument,
and therefore fix regression caused by r366980.

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

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

5 years agoRevert r367091, it caused PR42777.
Nico Weber [Fri, 26 Jul 2019 14:58:42 +0000 (14:58 +0000)]
Revert r367091, it caused PR42777.

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

5 years ago[ARM][ParallelDSP] Combine structs
Sam Parker [Fri, 26 Jul 2019 14:11:40 +0000 (14:11 +0000)]
[ARM][ParallelDSP] Combine structs

Combine OpChain and BinOpChain structs as OpChain is a base class to
BinOpChain that is never used.

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

5 years ago[PowerPC] Add getCRSaveOffset to improve readability. [NFC]
Sean Fertile [Fri, 26 Jul 2019 14:02:17 +0000 (14:02 +0000)]
[PowerPC] Add getCRSaveOffset to improve readability. [NFC]

In preperation for AIX support in FrameLowering: replace a number of literal
'8' that represent the stack offset of the condition register save area with
a member in PPCFrameLowering.

Patch by Chris Bowler.

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

5 years agogn build: Merge r367043
Nico Weber [Fri, 26 Jul 2019 13:27:19 +0000 (13:27 +0000)]
gn build: Merge r367043

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

5 years agogn build: Merge r366956
Nico Weber [Fri, 26 Jul 2019 13:24:56 +0000 (13:24 +0000)]
gn build: Merge r366956

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

5 years ago[MIPS GlobalISel] Fix check for void return during lowerCall
Petar Avramovic [Fri, 26 Jul 2019 13:19:37 +0000 (13:19 +0000)]
[MIPS GlobalISel] Fix check for void return during lowerCall

Void return used to have unsigned with value 0 for virtual register
but with addition of Register class and changes to arguments to lowerCall
this is no longer valid.
Check for void return by inspecting the Ty field in OrigRet.

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

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

5 years ago[AMDGPU] Move WQM/WWM intrinsic instruction selection to AMDGPUISelDAGToDAG
Carl Ritson [Fri, 26 Jul 2019 13:11:44 +0000 (13:11 +0000)]
[AMDGPU] Move WQM/WWM intrinsic instruction selection to AMDGPUISelDAGToDAG

Reviewers: arsenm, nhaehnle

Reviewed By: arsenm

Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

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

5 years ago[MIPS GlobalISel] Select inttoptr and ptrtoint
Petar Avramovic [Fri, 26 Jul 2019 13:08:06 +0000 (13:08 +0000)]
[MIPS GlobalISel] Select inttoptr and ptrtoint

Select G_INTTOPTR and G_PTRTOINT for MIPS32.

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

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

5 years ago[InstCombine] remove flop from lerp patterns
Sanjay Patel [Fri, 26 Jul 2019 11:19:18 +0000 (11:19 +0000)]
[InstCombine] remove flop from lerp patterns

(Y * (1.0 - Z)) + (X * Z) -->
Y - (Y * Z) + (X * Z) -->
Y + Z * (X - Y)

This is part of solving:
https://bugs.llvm.org/show_bug.cgi?id=42716

Factoring eliminates an instruction, so that should be a good canonicalization.
The potential conversion to FMA would be handled by the backend based on target
capabilities.

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

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

5 years ago[X86][SSE] Replace PMULDQ GetDemandedBits combine with SimplifyMultipleUseDemandedBit...
Simon Pilgrim [Fri, 26 Jul 2019 11:10:20 +0000 (11:10 +0000)]
[X86][SSE] Replace PMULDQ GetDemandedBits combine with SimplifyMultipleUseDemandedBits handler.

This removes a GetDemandedBits user and allows us to benefit from the DemandedElts propagated through SimplifyDemandedBits.

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

5 years ago[NFC][ARM][ParallelDSP] Cleanup isNarrowSequence
Sam Parker [Fri, 26 Jul 2019 10:57:42 +0000 (10:57 +0000)]
[NFC][ARM][ParallelDSP] Cleanup isNarrowSequence

Remove unused logic.

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

5 years ago[SelectionDAG] GetDemandedBits - update SIGN_EXTEND_INREG op to just call SimplifyMul...
Simon Pilgrim [Fri, 26 Jul 2019 10:03:07 +0000 (10:03 +0000)]
[SelectionDAG] GetDemandedBits - update SIGN_EXTEND_INREG op to just call SimplifyMultipleUseDemandedBits.

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

5 years ago[AMDGPU] Add llvm.amdgcn.softwqm intrinsic
Carl Ritson [Fri, 26 Jul 2019 09:54:12 +0000 (09:54 +0000)]
[AMDGPU] Add llvm.amdgcn.softwqm intrinsic

Add llvm.amdgcn.softwqm intrinsic which behaves like llvm.amdgcn.wqm
only if there is other WQM computation in the shader.

Reviewers: nhaehnle, tpr

Reviewed By: nhaehnle

Subscribers: arsenm, kzhuravl, jvesely, wdng, yaxunl, dstuttard, t-tye, llvm-commits

Tags: #llvm

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

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

5 years ago[TargetLowering] SimplifyMultipleUseDemandedBits - add SIGN_EXTEND_INREG support.
Simon Pilgrim [Fri, 26 Jul 2019 09:41:08 +0000 (09:41 +0000)]
[TargetLowering] SimplifyMultipleUseDemandedBits - add SIGN_EXTEND_INREG support.

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

5 years ago[ARM][ParallelDSP] Regenerate multi-use-loads.ll test checks
Simon Pilgrim [Fri, 26 Jul 2019 09:32:21 +0000 (09:32 +0000)]
[ARM][ParallelDSP] Regenerate multi-use-loads.ll test checks

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

5 years ago[AArch64] Define ETE and TRBE system registers
Momchil Velikov [Fri, 26 Jul 2019 09:19:08 +0000 (09:19 +0000)]
[AArch64] Define ETE and TRBE system registers

Embedded Trace Extension and Trace Buffer Extension are optional
future architecture extensions.
(cf. https://developer.arm.com/architectures/cpu-architecture/a-profile/exploration-tools)

Their system registers are documented here:
https://developer.arm.com/docs/ddi0601/a

ETE shares register names with ETM. One exception is the ETE
TRCEXTINSELR0 register, which has the same encoding as the ETM
TRCEXTINSELR register (but different semantics). This patch treats
them as aliases: the assembler will accept both names, emitting
identical encoding, and the disassembler will keep disassembling
to TRCEXRINSELR.

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

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

5 years ago[SelectionDAG] GetDemandedBits - update OR/XOR ops to just call SimplifyMultipleUseDe...
Simon Pilgrim [Fri, 26 Jul 2019 09:13:29 +0000 (09:13 +0000)]
[SelectionDAG] GetDemandedBits - update OR/XOR ops to just call SimplifyMultipleUseDemandedBits.

Eventually all of these will be moved over, but we create nodes in GetDemandedBits recursion at the moment which causes regressions when we try to remove them all.

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

5 years ago[TargetLowering] SimplifyMultipleUseDemandedBits - add BITCAST pass through support.
Simon Pilgrim [Fri, 26 Jul 2019 08:38:39 +0000 (08:38 +0000)]
[TargetLowering] SimplifyMultipleUseDemandedBits - add BITCAST pass through support.

This allows us to peek through BITCASTs and attempt simplify the source operand, and then bitcast back.

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