OSDN Git Service

android-x86/external-llvm.git
5 years ago[PDB] Copy inlinee lines records into the PDB
Reid Kleckner [Mon, 3 Jun 2019 18:15:38 +0000 (18:15 +0000)]
[PDB] Copy inlinee lines records into the PDB

Summary:
- Fixes inline call frame line table display in windbg.
- Improve llvm-pdbutil to dump extra file ids.
- Warn on unknown subsections so we don't have this kind of bug in the
  future.

Reviewers: inglorion, akhuang, aganea

Subscribers: eraman, zturner, llvm-commits

Tags: #llvm

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

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

5 years agogn build: Merge r362352
Nico Weber [Mon, 3 Jun 2019 18:13:29 +0000 (18:13 +0000)]
gn build: Merge r362352

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

5 years agoFix a crash when the default of a switch is removed
Andrew Kaylor [Mon, 3 Jun 2019 17:54:15 +0000 (17:54 +0000)]
Fix a crash when the default of a switch is removed

This patch fixes a problem that occurs in LowerSwitch when a switch statement has a PHI node as its condition, and the PHI node only has two incoming blocks, and one of those incoming blocks is through an unreachable default in the switch statement. When this condition occurs, LowerSwitch holds a pointer to the condition value, but removes the switch block as a predecessor of the PHI block, causing the PHI node to be replaced. LowerSwitch then tries to use its stale pointer to the original condition value, causing a crash.

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

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

5 years ago[Tests] Add LFTR tests for multiple exit loops (try 2)
Philip Reames [Mon, 3 Jun 2019 17:41:12 +0000 (17:41 +0000)]
[Tests] Add LFTR tests for multiple exit loops (try 2)

(Recommit after fixing a keymash in the run line.  Sorry for breakage.)

This is preparation for D62625 <https://reviews.llvm.org/D62625>

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

5 years agotools: add `llvm-nm` and `llvm-objcopy` to tools
Saleem Abdulrasool [Mon, 3 Jun 2019 17:17:09 +0000 (17:17 +0000)]
tools: add `llvm-nm` and `llvm-objcopy` to tools

Add `nm` and `objcopy` to the default value for the tools that we install now
that they are sufficiently feature complete to replace bintuils' implementation.

Patch by Jiang Yi!

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

5 years agoInclude what you use in Lanai.h
Dmitri Gribenko [Mon, 3 Jun 2019 17:02:15 +0000 (17:02 +0000)]
Include what you use in Lanai.h

Other files were not relying on these transitive includes, so I'm
submitting this change separately.

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

5 years agoInclude what you use in LanaiAsmPrinter.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 17:02:07 +0000 (17:02 +0000)]
Include what you use in LanaiAsmPrinter.cpp

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

5 years agoInclude what you use in LanaiMemAluCombiner.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 17:02:02 +0000 (17:02 +0000)]
Include what you use in LanaiMemAluCombiner.cpp

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

5 years agoInclude what you use in LanaiISelDAGToDAG.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 17:01:57 +0000 (17:01 +0000)]
Include what you use in LanaiISelDAGToDAG.cpp

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

5 years agoInclude what you use in LanaiFrameLowering.{cpp,h}
Dmitri Gribenko [Mon, 3 Jun 2019 17:01:52 +0000 (17:01 +0000)]
Include what you use in LanaiFrameLowering.{cpp,h}

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

5 years agoRevert "[Tests] Add LFTR tests for multiple exit loops"
Dmitri Gribenko [Mon, 3 Jun 2019 16:58:11 +0000 (16:58 +0000)]
Revert "[Tests] Add LFTR tests for multiple exit loops"

This reverts commit r362417.  There's a syntax error in the RUN line.

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

5 years ago[Tests] Add LFTR tests for multiple exit loops
Philip Reames [Mon, 3 Jun 2019 16:46:03 +0000 (16:46 +0000)]
[Tests] Add LFTR tests for multiple exit loops

This is preparation for D62625

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

5 years agoInclude what you use in LanaiRegisterInfo.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 16:31:37 +0000 (16:31 +0000)]
Include what you use in LanaiRegisterInfo.cpp

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

5 years ago[LoopPred] Convert a second member function to a static helper [NFC]
Philip Reames [Mon, 3 Jun 2019 16:23:20 +0000 (16:23 +0000)]
[LoopPred] Convert a second member function to a static helper [NFC]

(And remember to actually mark the first one static.)

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

5 years ago[WebAssembly] Remove fptosi(undef) and fptoui(undef) from reduced test case.
Simon Pilgrim [Mon, 3 Jun 2019 16:21:58 +0000 (16:21 +0000)]
[WebAssembly] Remove fptosi(undef) and fptoui(undef) from reduced test case.

Pre-commit for D62811 - which adds DAG fpto[us]i(undef) --> undef constant fold

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

5 years agoRevert "[llvm-ar] Fix relative thin archive path handling"
Dmitri Gribenko [Mon, 3 Jun 2019 16:21:37 +0000 (16:21 +0000)]
Revert "[llvm-ar] Fix relative thin archive path handling"

This reverts commit r362407.  It broke compilation of
llvm/lib/Object/ArchiveWriter.cpp:

error: type 'llvm::sys::path::const_iterator' does not provide a call
operator

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

5 years ago[PowerPC] Set PROT_READ flag for MF_EXEC to prevent segfaults on PPC machines
Nemanja Ivanovic [Mon, 3 Jun 2019 16:20:59 +0000 (16:20 +0000)]
[PowerPC] Set PROT_READ flag for MF_EXEC to prevent segfaults on PPC machines

The big endian PPC buildbots are all failing now due to calls to cache
invalidation in unit tests on data that has only the PROT_EXEC flag set.
This has been an issue all along on FreeBSD but it can affect Linux machines
depending on configuration.

This patch mitigates the issue the same way it is mitigated on FreeBSD.

Since this is needed to bring the buildbots back to green, I plan to commit this
and allow for post-commit review, but I thought I would also post it here for
ease of access/readability.

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

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

5 years ago[LoopPred] Convert member function to free helper function [NFC]
Philip Reames [Mon, 3 Jun 2019 16:17:14 +0000 (16:17 +0000)]
[LoopPred] Convert member function to free helper function [NFC]

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

5 years agoInclude what you use in LanaiInstrInfo.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 15:26:25 +0000 (15:26 +0000)]
Include what you use in LanaiInstrInfo.cpp

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

5 years ago[llvm-ar] Fix relative thin archive path handling
Owen Reynolds [Mon, 3 Jun 2019 15:26:07 +0000 (15:26 +0000)]
[llvm-ar] Fix relative thin archive path handling

This fixes some thin archive relative path issues, paths are shortened where possible and paths are output correctly when using the display table command.

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

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

5 years agoInclude what you use in PPCInstrInfo.h
Dmitri Gribenko [Mon, 3 Jun 2019 15:04:05 +0000 (15:04 +0000)]
Include what you use in PPCInstrInfo.h

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

5 years ago[llvm] [test] Remove non-portable EISDIR test from macho-disassemble-g-dsym.test
Michal Gorny [Mon, 3 Jun 2019 14:50:03 +0000 (14:50 +0000)]
[llvm] [test] Remove non-portable EISDIR test from macho-disassemble-g-dsym.test

Remove the test checking error message for 'is a directory'.  It does
not seem to serve any real purpose, and it relies on matching platform
error strings which are unpredictable and makes the test fragile.
Furthermore, it fails on NetBSD where read() works on directories,
and therefore does not return EISDIR at all.

Fixes r362141.

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

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

5 years agoInclude what you use in NVPTX.h
Dmitri Gribenko [Mon, 3 Jun 2019 14:37:26 +0000 (14:37 +0000)]
Include what you use in NVPTX.h

Other files were not relying on these transitive includes, so I'm
submitting this change separately.

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

5 years agoInclude what you use in NVPTX.h
Dmitri Gribenko [Mon, 3 Jun 2019 14:26:50 +0000 (14:26 +0000)]
Include what you use in NVPTX.h

I also fixed all other files that were including NVPTX.h and were
relying on transitive includes.

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

5 years ago[AMDGPU][MC] Added support of SCC, VCCZ and EXECZ operands
Dmitry Preobrazhensky [Mon, 3 Jun 2019 13:51:24 +0000 (13:51 +0000)]
[AMDGPU][MC] Added support of SCC, VCCZ and EXECZ operands

See bug 39292: https://bugs.llvm.org/show_bug.cgi?id=39292

Reviewers: rampitec, arsenm

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

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

5 years agoUnbreak non-PIC builds after r362390 / D62720
David Zarzycki [Mon, 3 Jun 2019 13:39:49 +0000 (13:39 +0000)]
Unbreak non-PIC builds after r362390 / D62720

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

5 years ago[SelectionDAG] Add [us]itofp(undef) --> 0 constant fold (PR39205)
Simon Pilgrim [Mon, 3 Jun 2019 13:02:07 +0000 (13:02 +0000)]
[SelectionDAG] Add [us]itofp(undef) --> 0 constant fold (PR39205)

We were missing this fold in the DAG, which I've copied directly from llvm::ConstantFoldCastInstruction

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

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

5 years ago[SystemZ] Remove sitofp(undef) from reduced test case.
Simon Pilgrim [Mon, 3 Jun 2019 12:58:36 +0000 (12:58 +0000)]
[SystemZ] Remove sitofp(undef) from reduced test case.

Pre-commit for D62807 - which adds DAG [us]itofp(undef) --> 0 constant fold

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

5 years agoInclude what you use in LanaiInstPrinter.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 12:53:05 +0000 (12:53 +0000)]
Include what you use in LanaiInstPrinter.cpp

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

5 years agoInclude what you use in LanaiMCCodeEmitter.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 12:42:48 +0000 (12:42 +0000)]
Include what you use in LanaiMCCodeEmitter.cpp

LanaiMCCodeEmitter.cpp was not using any APIs from Lanai.h, and was only
including it for transitive dependencies.  Doing so is problematic from
include-what-you-use perspective, but it is also a layering issue (it
creates a dependency cycle between the primary Lanai target library and
the MCTargetDesc library).

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

5 years agoInclude what you use in LanaiDisassembler.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 12:37:11 +0000 (12:37 +0000)]
Include what you use in LanaiDisassembler.cpp

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

5 years agoAMDGPU/GFX10: V_CMPX_xxx instructions still have an omod operand
Nicolai Haehnle [Mon, 3 Jun 2019 12:07:41 +0000 (12:07 +0000)]
AMDGPU/GFX10: V_CMPX_xxx instructions still have an omod operand

Summary: Change-Id: If6ee98e4a723b643bc37254fc6ef8b3812db16da

Reviewers: rampitec

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

Tags: #llvm

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

Change-Id: Id547ef152b2f92b24dc1c0efbf7e4467c4fb4b6e

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

5 years agoInclude what you use in HexagonInstPrinter.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 11:41:22 +0000 (11:41 +0000)]
Include what you use in HexagonInstPrinter.cpp

HexagonInstPrinter.cpp was not using any APIs from HexagonAsmPrinter.h.
Doing so is problematic from include-what-you-use perspective, but it is
also a layering issue (it creates a dependency cycle between the primary
Hexagon target library and the MCTargetDesc library).

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

5 years agoInclude what you use in HexagonAsmPrinter.h
Dmitri Gribenko [Mon, 3 Jun 2019 11:41:18 +0000 (11:41 +0000)]
Include what you use in HexagonAsmPrinter.h

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

5 years agoInclude what you use in HexagonMCInstrInfo.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 11:25:37 +0000 (11:25 +0000)]
Include what you use in HexagonMCInstrInfo.cpp

HexagonMCInstrInfo.cpp was not using any APIs from Hexagon.h.  Doing so
is problematic from include-what-you-use perspective, but it is also a
layering issue (it creates a dependency cycle between the primary
Hexagon target library and the MCTargetDesc library).

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

5 years agoInclude what you use in HexagonMCCodeEmitter.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 11:20:53 +0000 (11:20 +0000)]
Include what you use in HexagonMCCodeEmitter.cpp

HexagonMCCodeEmitter.cpp was not using any APIs from Hexagon.h.  Doing
so is problematic from include-what-you-use perspective, but it is also
a layering issue (it creates a dependency cycle between the primary
Hexagon target library and the MCTargetDesc library).

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

5 years agoInclude what you use in HexagonMCCompound.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 11:20:48 +0000 (11:20 +0000)]
Include what you use in HexagonMCCompound.cpp

HexagonMCCompound.cpp was not using any APIs from Hexagon.h.  Doing so
is problematic from include-what-you-use perspective, but it is also a
layering issue (it creates a dependency cycle between the primary
Hexagon target library and the MCTargetDesc library).

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

5 years agoInclude what you use in HexagonShuffler.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 11:14:20 +0000 (11:14 +0000)]
Include what you use in HexagonShuffler.cpp

HexagonShuffler.cpp was not using any APIs from Hexagon.h, and was only
including it for transitive dependencies.  Doing so is problematic from
include-what-you-use perspective, but it is also a layering issue (it
creates a dependency cycle between the primary Hexagon target library
and the MCTargetDesc library).

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

5 years agoInclude what you use in HexagonMCChecker.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 11:14:15 +0000 (11:14 +0000)]
Include what you use in HexagonMCChecker.cpp

HexagonMCChecker.cpp was not using any APIs from Hexagon.h.  Doing so is
problematic from include-what-you-use perspective, but it is also a
layering issue (it creates a dependency cycle between the primary
Hexagon target library and the MCTargetDesc library).

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

5 years agoInclude what you use in HexagonMCTargetDesc.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 11:14:10 +0000 (11:14 +0000)]
Include what you use in HexagonMCTargetDesc.cpp

HexagonMCTargetDesc.cpp was not using any APIs from Hexagon.h.  Doing so
is problematic from include-what-you-use perspective, but it is also a
layering issue (it creates a dependency cycle between the primary
Hexagon target library and the MCTargetDesc library).

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

5 years agoInclude what you use in HexagonMCShuffler.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 11:14:05 +0000 (11:14 +0000)]
Include what you use in HexagonMCShuffler.cpp

HexagonMCShuffler.cpp was not using any APIs from Hexagon.h.  Doing so
is problematic from include-what-you-use perspective, but it is also a
layering issue (it creates a dependency cycle between the primary
Hexagon target library and the MCTargetDesc library).

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

5 years ago[ARM] Fix recent breakage of -mfpu=none.
Simon Tatham [Mon, 3 Jun 2019 11:02:53 +0000 (11:02 +0000)]
[ARM] Fix recent breakage of -mfpu=none.

The recent change D60691 introduced a bug in clang when handling
option combinations such as `-mcpu=cortex-m4 -mfpu=none`. Those
options together should select Cortex-M4 but disable all use of
hardware FP, but in fact, now hardware FP instructions can still be
generated in that mode.

The reason is because the handling of FPUVersion::NONE disables all
the same feature names it used to, of which the base one is `vfp2`.
But now there are further features below that, like `vfp2d16fp` and
(following D60694) `fpregs`, which also need to be turned off to
disable hardware FP completely.

Added a tiny test which double-checks that compiling a simple FP
function doesn't access the FP registers.

Reviewers: SjoerdMeijer, dmgreen

Reviewed By: dmgreen

Subscribers: lebedev.ri, javed.absar, kristof.beyls, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

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

5 years ago[AArch64][SVE2] Add CPU and arch directive tests
Cullen Rhodes [Mon, 3 Jun 2019 10:42:02 +0000 (10:42 +0000)]
[AArch64][SVE2] Add CPU and arch directive tests

Summary:
This patch adds tests for directives .arch, .arch_extension and .cpu for
all features defined in Arm SVE2 architecture extension.

Reviewed By: chill

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

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

5 years ago[llvm-readobj] - Convert gnu-sections.test to use YAML.
George Rimar [Mon, 3 Jun 2019 09:58:41 +0000 (09:58 +0000)]
[llvm-readobj] - Convert gnu-sections.test to use YAML.

gnu-sections.test currently use relocs.obj.elf-x86_64 and
relocs.obj.elf-i386 precompiled objects as an inputs.

These inputs actually initially were introduced to test the
dump of relocations and have almost nothing common with dumping
sections.

Patch converts the test to use yaml2obj. That allows to remove
relocs.obj.elf-i386 binary.
(relocs.obj.elf-x86_64 is still used by another test and can't be removed atm).

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

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

5 years agoInclude what you use in HexagonELFObjectWriter.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 09:56:40 +0000 (09:56 +0000)]
Include what you use in HexagonELFObjectWriter.cpp

HexagonELFObjectWriter.cpp was not using any APIs from Hexagon.h, and
was only including it for transitive dependencies.  Doing so is
problematic from include-what-you-use perspective, but it is also a
layering issue (it creates a dependency cycle between the primary
Hexagon target library and the MCTargetDesc library).

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

5 years ago[llvm-readobj/llvm-readelf] - Remove gnu-relocations.test completely.
George Rimar [Mon, 3 Jun 2019 09:52:32 +0000 (09:52 +0000)]
[llvm-readobj/llvm-readelf] - Remove gnu-relocations.test completely.

rL362089 introduced a set of yaml based reloc-types-*.test test cases
(instead of huge reloc-types.test that used a lot of precompiled binaries)
These test cases checks LLVM-styled dumping of the relocations.

gnu-relocations.test was a test case to check GNU styled relocations dumping.
It did that only for elf-x86 and elf-x86_64 targets. It did not test all of the
relocations though.

Now, after rL362089, it does not make sence to keep it.
This patch updates reloc-types-elf-i386.test and reloc-types-elf-x64.test tests
with llvm-readelf calls to check GNU styled output in one place.
It removes gnu-relocations.test completely.

One of intentions of doing this is also to get rid of relocs.obj.elf-i386 and
relocs.obj.elf-x86_64 precompiled objects completely (they are used in other tests still).

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

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

5 years ago[LiveDebugValues] Close range for previous variable's location when adding newly...
Nikola Prica [Mon, 3 Jun 2019 09:48:29 +0000 (09:48 +0000)]
[LiveDebugValues] Close range for previous variable's location when adding newly deduced location

When LiveDebugValues deduces new variable's location from spill, restore or
register copy instruction it should close old variable's location. Otherwise
we can have multiple block output locations for same variable. That could lead
to inserting two DBG_VALUEs for same variable to the beginning of the successor
block which results to ignoring of first DBG_VALUE.

Reviewers: aprantl, jmorse, wolfgangp, dstenb

Reviewed By: aprantl

Subscribers: probinson, asowda, ivanbaev, petarj, djtodoro

Tags: #debug-info

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

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

5 years agoInclude what you use in HexagonAsmBackend.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 09:43:05 +0000 (09:43 +0000)]
Include what you use in HexagonAsmBackend.cpp

HexagonAsmBackend.cpp was not using any APIs from Hexagon.h.  Doing so
is problematic from include-what-you-use perspective, but it is also a
layering issue (it creates a dependency cycle between the primary
Hexagon target library and the MCTargetDesc library).

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

5 years agoInclude what you use in HexagonAsmParser.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 09:38:48 +0000 (09:38 +0000)]
Include what you use in HexagonAsmParser.cpp

HexagonAsmParser.cpp was not using any APIs from Hexagon.h.  Doing so is
problematic from include-what-you-use perspective, but it is also a
layering issue (it creates a dependency cycle between the primary
Hexagon target library and the AsmParser library).

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

5 years agoInclude what you use in HexagonShuffler.h
Dmitri Gribenko [Mon, 3 Jun 2019 09:33:48 +0000 (09:33 +0000)]
Include what you use in HexagonShuffler.h

HexagonShuffler.h was not using any APIs from Hexagon.h, and was only
including it for transitive dependencies.  Doing so is problematic from
include-what-you-use perspective, but it is also a layering issue (it
creates a dependency cycle between the primary Hexagon target library
and the MCTargetDesc library).

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

5 years agoInclude what you use in BPFMCTargetDesc.cpp
Dmitri Gribenko [Mon, 3 Jun 2019 09:29:51 +0000 (09:29 +0000)]
Include what you use in BPFMCTargetDesc.cpp

BPFMCTargetDesc.cpp was not using any APIs from BPF.h.  Doing so is
problematic from include-what-you-use perspective, but it is also a
layering issue (it creates a dependency cycle between the primary
BPF target library and the MCTargetDesc library).

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

5 years ago[ARM][FIX] Ran out of registers due tail recursion
Diogo N. Sampaio [Mon, 3 Jun 2019 08:58:05 +0000 (08:58 +0000)]
[ARM][FIX] Ran out of registers due tail recursion

Summary:
- pr42062
When compiling for MinSize,
ARMTargetLowering::LowerCall decides to indirect
multiple calls to a same function. However,
it disconsiders the limitation that thumb1
indirect calls require the callee to be in a
register from r0 to r3 (llvm limiation).
If all those registers are used by arguments, the
compiler dies with "error: run out of registers
during register allocation".
This patch tells the function
IsEligibleForTailCallOptimization if we intend to
perform indirect calls, as to avoid tail call
optimization.

Reviewers: dmgreen, efriedma

Reviewed By: efriedma

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

Tags: #llvm

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

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

5 years ago[AArch64] Check for simple type in FPToUInt
Sam Parker [Mon, 3 Jun 2019 08:49:17 +0000 (08:49 +0000)]
[AArch64] Check for simple type in FPToUInt

DAGCombiner was hitting a SimpleType assertion when trying to combine
a v3f32 before type legalization.

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

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

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

5 years ago[NFC][X86] extract-{low,}bits.ll: one more pattern c with truncation
Roman Lebedev [Mon, 3 Jun 2019 08:44:09 +0000 (08:44 +0000)]
[NFC][X86] extract-{low,}bits.ll: one more pattern c with truncation

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

5 years ago[TableGen] Fix std::array initializer to avoid warnings with older tool chains. NFC
Mikael Holmen [Mon, 3 Jun 2019 06:38:01 +0000 (06:38 +0000)]
[TableGen] Fix std::array initializer to avoid warnings with older tool chains. NFC

A std::array is implemented as a template with an array inside a struct.
Older versions of clang, like 3.6, require an extra set of curly braces
around std::array initializations to avoid warnings.

The C++ language was changed regarding this by CWG 1270. So more modern
tool chains does not complain even if leaving out one level of braces.

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

5 years ago[AVR] Fix incorrect source regclass of LDWRdPtr
Jim Lin [Mon, 3 Jun 2019 02:31:07 +0000 (02:31 +0000)]
[AVR] Fix incorrect source regclass of LDWRdPtr

Summary:
LDWRdPtr would be expanded to ld+ldd. ldd only accepts the pointer register is Y or Z.
So the register class of pointer of LDWRdPtr should be PTRDISPREGS instead of PTRREGS.

Reviewers: dylanmckay

Reviewed By: dylanmckay

Subscribers: dylanmckay, llvm-commits

Tags: #llvm

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

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

5 years agoRecommit r360171: [DAGCombiner] Avoid creating large tokenfactors in visitTokenFactor.
Florian Hahn [Mon, 3 Jun 2019 01:30:19 +0000 (01:30 +0000)]
Recommit r360171: [DAGCombiner] Avoid creating large tokenfactors in visitTokenFactor.

If we hit the limit, we do expand the outstanding tokenfactors.
Otherwise, we might drop nodes with users in the unexpanded
tokenfactors. This fixes the crashes reported by Jordan Rupprecht.

Reviewers: niravd, spatel, craig.topper, rupprecht

Reviewed By: niravd

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

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

5 years agollvm-undname: Add coverage for some error paths
Nico Weber [Sun, 2 Jun 2019 23:48:28 +0000 (23:48 +0000)]
llvm-undname: Add coverage for some error paths

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

5 years agoUpdate MSVC Visualizer to reflect new variadic PointerUnion
Mike Spertus [Sun, 2 Jun 2019 23:33:32 +0000 (23:33 +0000)]
Update MSVC Visualizer to reflect new variadic PointerUnion

This changed updates the MSVC Visualizer to work with the recent change
of PointerUnion into a variadic template. As an extra bonus, we
fix some bit rot in the SmallPtrSet visualizer as well

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

5 years agollvm-undname; Add more test coverage for demangleFunctionClass()
Nico Weber [Sun, 2 Jun 2019 23:26:57 +0000 (23:26 +0000)]
llvm-undname; Add more test coverage for demangleFunctionClass()

Also add two FC_Far that seem to be missing, by symmetry from
the public and protected cases. (But FC_Far isn't really a thing
anymore, so this doesn't really have an observable effect.)

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

5 years ago[DAGCombiner][X86] Fold away masked store and scatter with all zeroes mask.
Craig Topper [Sun, 2 Jun 2019 22:52:38 +0000 (22:52 +0000)]
[DAGCombiner][X86] Fold away masked store and scatter with all zeroes mask.

Similar to what was done for masked load and gather.

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

5 years ago[X86] Add test cases for masked store and masked scatter with an all zeroes mask...
Craig Topper [Sun, 2 Jun 2019 22:52:34 +0000 (22:52 +0000)]
[X86] Add test cases for masked store and masked scatter with an all zeroes mask. Fix bug in ScalarizeMaskedMemIntrin

Need to cast only to Constant instead of ConstantVector to allow
ConstantAggregateZero.

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

5 years ago[CostModel][X86] Improve masked load/store AVX1/AVX2 costs
Simon Pilgrim [Sun, 2 Jun 2019 20:37:02 +0000 (20:37 +0000)]
[CostModel][X86] Improve masked load/store AVX1/AVX2 costs

A mixture of internal tests and review of the scheduler models indicates we're overestimating the cost of a masked load, which we're estimating at 4x regular memory ops - more realistic values indicates that its closer to 2x. Masked stores costs are a lot more diverse but 8x is roughly in the middle of the range.

e.g. SandyBridge
defm : X86WriteRes<WriteFMaskedLoad, [SBPort23,SBPort05], 8, [1,2], 3>;
defm : X86WriteRes<WriteFMaskedLoadY, [SBPort23,SBPort05], 9, [1,2], 3>;
defm : X86WriteRes<WriteFMaskedStore, [SBPort4,SBPort01,SBPort23], 5, [1,1,1], 3>;
defm : X86WriteRes<WriteFMaskedStoreY, [SBPort4,SBPort01,SBPort23], 5, [1,1,1], 3>;

e.g. Btver2
defm : X86WriteRes<WriteFMaskedLoad, [JLAGU, JFPU01, JFPX], 6, [1, 2, 2], 1>;
defm : X86WriteRes<WriteFMaskedLoadY, [JLAGU, JFPU01, JFPX], 6, [2, 4, 4], 2>;
defm : X86WriteRes<WriteFMaskedStore, [JSAGU, JFPU01, JFPX], 6, [1, 1, 4], 1>;
defm : X86WriteRes<WriteFMaskedStoreY, [JSAGU, JFPU01, JFPX], 6, [2, 2, 4], 2>;

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

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

5 years ago[DAGCombiner] Replace masked loads with a zero mask with the passthru value
Craig Topper [Sun, 2 Jun 2019 18:58:46 +0000 (18:58 +0000)]
[DAGCombiner] Replace masked loads with a zero mask with the passthru value

Similar to what was recently done for gathers in r362015.

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

5 years ago[TTI][X86] Cleanup getMaskedMemoryOpCost. NFCI.
Simon Pilgrim [Sun, 2 Jun 2019 18:06:42 +0000 (18:06 +0000)]
[TTI][X86] Cleanup getMaskedMemoryOpCost. NFCI.

Prep work before resurrecting D61257.

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

5 years agoRemove code path that's dead after r358835
Nico Weber [Sun, 2 Jun 2019 17:41:07 +0000 (17:41 +0000)]
Remove code path that's dead after r358835

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

5 years agoAdd demangling test coverage for unsigned short, unsigned long
Nico Weber [Sun, 2 Jun 2019 17:29:26 +0000 (17:29 +0000)]
Add demangling test coverage for unsigned short, unsigned long

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

5 years agoAdd mangling test coverage for non-volatile const member pointers
Nico Weber [Sun, 2 Jun 2019 17:23:53 +0000 (17:23 +0000)]
Add mangling test coverage for non-volatile const member pointers

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

5 years ago[NFC][X86] extract-{low,}bits.ll: one more pattern a with truncation
Roman Lebedev [Sun, 2 Jun 2019 17:11:21 +0000 (17:11 +0000)]
[NFC][X86] extract-{low,}bits.ll: one more pattern a with truncation

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

5 years agoAdd test coverage for __pascal mangling
Nico Weber [Sun, 2 Jun 2019 16:47:07 +0000 (16:47 +0000)]
Add test coverage for __pascal mangling

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

5 years ago[test] Fix plugin tests
Don Hinton [Sun, 2 Jun 2019 15:53:43 +0000 (15:53 +0000)]
[test] Fix plugin tests

Recommit of r361790 that was temporarily reverted in r361793 due to bot breakage.

Summary:
The following changes were required to fix these tests:

1) Change LLVM_ENABLE_PLUGINS to an option and move it to
   llvm/CMakeLists.txt with an appropriate default -- which matches
   the original default behavior.

2) Move the plugins directory from clang/test/Analysis
   clang/lib/Analysis.  It's not enough to add an exclude to the
   lit.local.cfg file because add_lit_testsuites recurses the tree and
   automatically adds the appropriate `check-` targets, which don't
   make sense for the plugins because they aren't tests and don't
   have `RUN` statements.

   Here's a list of the `clang-check-anlysis*` targets with this
   change:

```
  $ ninja -t targets all| sed -n "s/.*\/\(check[^:]*\):.*/\1/p" | sort -u | grep clang-analysis
  check-clang-analysis
  check-clang-analysis-checkers
  check-clang-analysis-copypaste
  check-clang-analysis-diagnostics
  check-clang-analysis-engine
  check-clang-analysis-exploration_order
  check-clang-analysis-html_diagnostics
  check-clang-analysis-html_diagnostics-relevant_lines
  check-clang-analysis-inlining
  check-clang-analysis-objc
  check-clang-analysis-unified-sources
  check-clang-analysis-z3
```

3) Simplify the logic and only include the subdirectories under
   clang/lib/Analysis/plugins if LLVM_ENABLE_PLUGINS is set.

Reviewed By: NoQ

Tags: #clang, #llvm

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

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

5 years ago[X86] isHorizontalBinOp - add extract_subvector(shuffle(x)) handling (PR39921)
Simon Pilgrim [Sun, 2 Jun 2019 15:47:49 +0000 (15:47 +0000)]
[X86] isHorizontalBinOp - add extract_subvector(shuffle(x)) handling (PR39921)

Let's us match horizontal op patterns on fast-variable-shuffle targets (Haswell etc.)

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

5 years ago[X86] Add AVX2 'fast-variable-shuffle' PHADD tests (PR39921)
Simon Pilgrim [Sun, 2 Jun 2019 15:33:28 +0000 (15:33 +0000)]
[X86] Add AVX2 'fast-variable-shuffle' PHADD tests (PR39921)

Haswell etc. will combine shuffles to a extract_subvector(permd(x)) before isHorizontalBinOp can match it.

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

5 years ago[NFC][X86] extract-lowbits.ll: add one more pattern a with truncation
Roman Lebedev [Sun, 2 Jun 2019 15:07:49 +0000 (15:07 +0000)]
[NFC][X86] extract-lowbits.ll: add one more pattern a with truncation

We are also free to interpret this as 'BZHI'/'BEXTR'.
https://rise4fun.com/Alive/dD6

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

5 years ago[DAGCombine] Fold insert_subvector(bitcast(x),bitcast(y),c1) -> bitcast(insert_subvec...
Simon Pilgrim [Sun, 2 Jun 2019 14:42:11 +0000 (14:42 +0000)]
[DAGCombine] Fold insert_subvector(bitcast(x),bitcast(y),c1) -> bitcast(insert_subvector(x,y),c2)

Move this combine from x86 into generic DAGCombine, which currently only manages cases where the bitcast is between types of the same scalarsize.

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

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

5 years ago[DAG] isBitwiseNot / isConstOrConstSplat - add support for build vector undefs +...
Simon Pilgrim [Sun, 2 Jun 2019 11:56:39 +0000 (11:56 +0000)]
[DAG] isBitwiseNot / isConstOrConstSplat - add support for build vector undefs + truncation (PR41020)

Add (opt-in) support for implicit truncation to isConstOrConstSplat, which allows us to match truncated 'all ones' cases in isBitwiseNot.

PR41020 compares against using ISD::isBuildVectorAllOnes() instead, but that predicate silently accepts any UNDEF elements in the build vector which might not be what we want in isBitwiseNot - so I've added an opt-in 'AllowUndefs' flag that is set to false by default but will allow us to enable it on individual cases where its safe.

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

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

5 years ago[TargetLowering] SimplifyDemandedBits - don't use OriginalDemanded variables in analysis.
Simon Pilgrim [Sun, 2 Jun 2019 10:12:55 +0000 (10:12 +0000)]
[TargetLowering] SimplifyDemandedBits - don't use OriginalDemanded variables in analysis.

These might have been replaced in multiple use cases.

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

5 years ago[TargetLowering] SimplifyDemandedVectorElts - use same arg names as SimplifyDemandedB...
Simon Pilgrim [Sun, 2 Jun 2019 10:03:56 +0000 (10:03 +0000)]
[TargetLowering] SimplifyDemandedVectorElts - use same arg names as SimplifyDemandedBits. NFCI.

Helps with debugging as we recurse between them.

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

5 years ago[IndVarSimplify] Add tests for saturating math on IV; NFC
Nikita Popov [Sun, 2 Jun 2019 08:49:35 +0000 (08:49 +0000)]
[IndVarSimplify] Add tests for saturating math on IV; NFC

These saturating math ops can be replaced with simple math.

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

5 years ago[NFC][X86] extract-lowbits.ll: add patterns with truncation too
Roman Lebedev [Sun, 2 Jun 2019 08:05:24 +0000 (08:05 +0000)]
[NFC][X86] extract-lowbits.ll: add patterns with truncation too

If we look past truncations of X too eagerly (D62786), we may
end up with 64-bit 'BEXTR', even though 32-bit-one would suffice.

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

5 years ago[DAGCombiner] Replace two unchecked dyn_casts with casts.
Craig Topper [Sun, 2 Jun 2019 03:31:01 +0000 (03:31 +0000)]
[DAGCombiner] Replace two unchecked dyn_casts with casts.

The results of the dyn_casts were immediately dereferenced on the next line
so they had better not be null.

I don't think there's any way for these dyn_casts to fail, so use a cast
of adding null check.

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

5 years ago[CMake] Use libtool for runtimes when building for Apple platform
Petr Hosek [Sun, 2 Jun 2019 02:05:01 +0000 (02:05 +0000)]
[CMake] Use libtool for runtimes when building for Apple platform

LLVM CMake build already uses libtool instead of ar when building
for Apple platform and we should be using the same when building
runtimes. To do so, this change extracts the logic for finding
libtool into a separate file and then uses it from both the LLVM
build as well as the LLVM runtimes build.

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

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

5 years ago[X86] Fix several places that weren't passing what they though they were to MachineIn...
Craig Topper [Sun, 2 Jun 2019 01:36:48 +0000 (01:36 +0000)]
[X86] Fix several places that weren't passing what they though they were to MachineInstr::print

Over a year ago, MachineInstr gained a fourth boolean parameter that occurs
before the TII pointer. When this happened, several places started accidentally
passing TII into this boolean parameter instead of the TII parameter.

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

5 years ago[X86] Simplify the CHECK lines in vector-reduce-and/or/xor-widen.ll in similar way...
Craig Topper [Sun, 2 Jun 2019 00:43:02 +0000 (00:43 +0000)]
[X86] Simplify the CHECK lines in vector-reduce-and/or/xor-widen.ll in similar way to r362308.

Forgot to do the widen forms when I was doing the others.

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

5 years ago[X86] Add the SSE versions of PMULLW and PMULLD to isAssociativeAndCommutative.
Craig Topper [Sun, 2 Jun 2019 00:42:58 +0000 (00:42 +0000)]
[X86] Add the SSE versions of PMULLW and PMULLD to isAssociativeAndCommutative.

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

5 years ago[X86] Simplify the CHECK lines in vector-reduce-and/or/xor.
Craig Topper [Sun, 2 Jun 2019 00:07:52 +0000 (00:07 +0000)]
[X86] Simplify the CHECK lines in vector-reduce-and/or/xor.

The AVX512BW and AVX512VL checks were never used. And AVX512 is the same
as AVX on all tests that weren't already split for AVX1 and AVX2.

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

5 years ago[X86] Add avx512 command lines and test cases to machine-combiner.ll
Craig Topper [Sun, 2 Jun 2019 00:07:48 +0000 (00:07 +0000)]
[X86] Add avx512 command lines and test cases to machine-combiner.ll

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

5 years ago[SimplifyIndVar] Refactor overflow check elimination code; NFC
Nikita Popov [Sat, 1 Jun 2019 20:21:53 +0000 (20:21 +0000)]
[SimplifyIndVar] Refactor overflow check elimination code; NFC

Extract a willNotOverflow() helper function that is shared between
eliminateOverflowIntrinsic() and strengthenOverflowingOperation().
Use WithOverflowInst for the former.

We'll be able to reuse the same code for saturating intrinsics as
well.

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

5 years ago[InlineCost] Don't add the soft float function call cost for the fneg idiom, fsub...
Craig Topper [Sat, 1 Jun 2019 19:40:07 +0000 (19:40 +0000)]
[InlineCost] Don't add the soft float function call cost for the fneg idiom, fsub -0.0, %x

Summary: Fneg can be implemented with an xor rather than a function call so we don't need to add the function call overhead. This was pointed out in D62699

Reviewers: efriedma, cameron.mcinally

Reviewed By: efriedma

Subscribers: javed.absar, eraman, hiraditya, haicheng, llvm-commits

Tags: #llvm

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

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

5 years ago[AMDGPU] Regenerate SDIV tests for an upcoming patch
Simon Pilgrim [Sat, 1 Jun 2019 18:27:06 +0000 (18:27 +0000)]
[AMDGPU] Regenerate SDIV tests for an upcoming patch

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

5 years ago[MCA][Scheduler] Change how memory instructions are dispatched to the pending set...
Andrea Di Biagio [Sat, 1 Jun 2019 15:22:37 +0000 (15:22 +0000)]
[MCA][Scheduler] Change how memory instructions are dispatched to the pending set. NFCI

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

5 years ago[APInt] Add PR40897 test case
Simon Pilgrim [Sat, 1 Jun 2019 14:58:36 +0000 (14:58 +0000)]
[APInt] Add PR40897 test case

In reality APInt::getBitsNeeded(INT_MIN, base) cases require one less bit than is returned

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

5 years ago[X86][AVX] Add tests for CONCAT(MOVDDUP(x),MOVDDUP(y))
Simon Pilgrim [Sat, 1 Jun 2019 14:05:46 +0000 (14:05 +0000)]
[X86][AVX] Add tests for CONCAT(MOVDDUP(x),MOVDDUP(y))

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

5 years ago[mips] Extend range of register indexes accepted by cfcmsa/ctcmsa
Simon Atanasyan [Sat, 1 Jun 2019 13:55:18 +0000 (13:55 +0000)]
[mips] Extend range of register indexes accepted by cfcmsa/ctcmsa

The `cfcmsa` and `ctcmsa` instructions accept index of MSA control
register. The MIPS64 SIMD Architecture define eight MSA control
registers. But register index for `cfcmsa` and `ctcmsa` instructions
might be any number in 0..31 range. If the index is greater then 7,
`cfcmsa` writes zero to the destination registers and `ctcmsa` does
nothing [1].

[1] MIPS Architecture for Programmers Volume IV-j:
    The MIPS64 SIMD Architecture Module
https://www.mips.com/?do-download=the-mips64-simd-architecture-module

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

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

5 years ago[AVR] Disable register coalescing to the PTRDISPREGS class
Dylan McKay [Sat, 1 Jun 2019 12:38:56 +0000 (12:38 +0000)]
[AVR] Disable register coalescing to the PTRDISPREGS class

If we would allow register coalescing on PTRDISPREGS class then register
allocator can lock Z register to some virtual register. Larger instructions
requiring a memory acces then fail during the register allocation phase since
there is no available register to hold a pointer if Y register was already
taken for a stack frame. This patch prevents it by keeping Z register
spillable. It does it by not allowing coalescer to lock it.

Original discussion on https://github.com/avr-rust/rust/issues/128.

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

5 years ago[SLPVectorizer][X86] Add other tests described in PR28474
Simon Pilgrim [Sat, 1 Jun 2019 12:35:03 +0000 (12:35 +0000)]
[SLPVectorizer][X86] Add other tests described in PR28474

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

5 years ago[SLPVectorizer][X86] This test was from PR28474
Simon Pilgrim [Sat, 1 Jun 2019 12:10:29 +0000 (12:10 +0000)]
[SLPVectorizer][X86] This test was from PR28474

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

5 years ago[NFC][Codegen] shift-amount-mod.ll: drop innermost operation
Roman Lebedev [Sat, 1 Jun 2019 11:08:29 +0000 (11:08 +0000)]
[NFC][Codegen] shift-amount-mod.ll: drop innermost operation

I have initially added it in for test to display both
whether the binop w/ constant is sinked or hoisted.
But as it can be seen from the 'sub (sub C, %x), %y'
test, that actually conceals the issues it is supposed to test.

At least two more patterns are unhandled:
* 'add (sub C, %x), %y' - D62266
* 'sub (sub C, %x), %y'

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

5 years ago[IndVarSimplify] Fixup nowrap flags during LFTR (PR31181)
Nikita Popov [Sat, 1 Jun 2019 09:40:18 +0000 (09:40 +0000)]
[IndVarSimplify] Fixup nowrap flags during LFTR (PR31181)

Fix for https://bugs.llvm.org/show_bug.cgi?id=31181 and partial fix
for LFTR poison handling issues in general.

When LFTR moves a condition from pre-inc to post-inc, it may now
depend on value that is poison due to nowrap flags. To avoid this,
we clear any nowrap flag that SCEV cannot prove for the post-inc
addrec.

Additionally, LFTR may switch to a different IV that is dynamically
dead and as such may be arbitrarily poison. This patch will correct
nowrap flags in some but not all cases where this happens. This is
related to the adoption of IR nowrap flags for the pre-inc addrec.
(See some of the switch_to_different_iv tests, where flags are not
dropped or insufficiently dropped.)

Finally, there are likely similar issues with the handling of GEP
inbounds, but we don't have a test case for this yet.

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

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

5 years ago[IndVarSimplify] Add additional PR33181 tests; NFC
Nikita Popov [Sat, 1 Jun 2019 09:40:09 +0000 (09:40 +0000)]
[IndVarSimplify] Add additional PR33181 tests; NFC

Two more tests with a switch to a dynamically dead IV, with poison
occuring on the first or second iteration.

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