Commit Graph

180465 Commits

Author SHA1 Message Date
David L. Jones
549c0968d1 Revert r361811: 'Re-commit r357452 (take 2): "SimplifyCFG SinkCommonCodeFromPredecessors ...'
We have observed some failures with internal builds with this revision.

- Performance regressions:
  - llvm's SingleSource/Misc evalloop shows performance regressions (although these may be red herrings).
  - Benchmarks for Abseil's SwissTable.
- Correctness:
  - Failures for particular libicu tests when building the Google AppEngine SDK (for PHP).

hwennborg has already been notified, and is aware of reproducer failures.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363220 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-13 02:04:45 +00:00
Dinar Temirbulatov
ffe57b5e41 [SLP] Update propagate_ir_flags.ll test to check that we do retain the common subset, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363218 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-13 00:19:50 +00:00
Philip Reames
aac3847fc2 [Tests] Highlight impact of multiple exit LFTR (D62625) as requested by reviewer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363217 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 23:39:49 +00:00
Cameron McInally
9eacbf2b36 [NFC][CodeGen] Add unary FNeg tests to X86/avx512-intrinsics-fast-isel.ll
Patch 1 of n.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363215 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 22:50:44 +00:00
Mircea Trofin
1422127962 [llvm] Expose DWARFDebugLine::LineTable::getFileNameEntry
Summary:
This is useful for scenarios where Prologue was directly used and DWARF
5 awareness is required. The current alternative would be to either
duplicate the logic in getFileNameEntry, or to use getFileNameByIndex.
The latter isn't quite an in-place replacement - it performs some
processing, and it produces a string instead of a StringRef, meaning
the caller needs to handle its lifetime.

Reviewers: tamur, dblaikie, JDevlieghere

Reviewed By: tamur, JDevlieghere

Subscribers: aprantl, llvm-commits

Tags: #llvm, #debug-info

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363210 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 22:02:07 +00:00
Sanjay Patel
d761cdb403 [x86] add tests for vector shifts; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363203 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 21:30:06 +00:00
Serge Guelton
becd3ddef1 Sanitize llvm-extract -help output
Filter out irrelevant options

New output:

    OVERVIEW: llvm extractor

    USAGE: llvm-extract [options] <input bitcode file>

    OPTIONS:

    Generic Options:

      --help              - Display available options (--help-hidden for more)
      --help-list         - Display list of available options (--help-list-hidden for more)
      --version           - Display the version of this program

    llvm-extract Options:

      --alias=<alias>     - Specify alias to extract
      --bb=<function:bb>  - Specify <function, basic block> pairs to extract
      --delete            - Delete specified Globals from Module
      -f                  - Enable binary output on terminals
      --func=<function>   - Specify function to extract
      --glob=<global>     - Specify global to extract
      -o=<filename>       - Specify output filename
      --ralias=<ralias>   - Specify alias(es) to extract using a regular expression
      --recursive         - Recursively extract all called functions
      --rfunc=<rfunction> - Specify function(s) to extract using a regular expression
      --rglob=<rglobal>   - Specify global(s) to extract using a regular expression

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363201 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 21:08:19 +00:00
Cameron McInally
c2c5135f15 [NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll
Patch 3 of 3 for X86/avx512vl-intrinsics-fast-isel.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363200 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 20:56:59 +00:00
Jordan Rupprecht
efb200a423 [llvm-readobj] Fix output interleaving issue caused by using multiple streams at the same time.
Summary:
Use llvm::fouts() as the default stream for outputing. No new stream
should be constructed to output at the same time.

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

Reviewers: jhenderson, grimar, MaskRay, phosek, rupprecht

Reviewed By: rupprecht

Subscribers: llvm-commits

Tags: #llvm

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

Patch by Yuanfang Chen!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363198 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 20:16:22 +00:00
Philip Reames
39a19f7cae [IndVars] Extend diagnostic -replexitval flag w/ability to bypass hard use hueristic
Note: This does mean that "always" is now more powerful than it was. 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363196 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 19:52:05 +00:00
Cameron McInally
2da055d719 [NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll
Patch 2 of 3 for X86/avx512vl-intrinsics-fast-isel.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363194 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 19:39:42 +00:00
Philip Reames
58c9643afb [Tests] Autogen RLEV test and add tests for a future enhancement
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363193 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 19:23:10 +00:00
Philip Reames
5ea6536b43 [Tests] Add tests to highlight sibling loop optimization order issue for exit rewriting
The issue addressed in r363180 is more broadly relevant.  For the moment, we don't actually get any of these cases because we a) restrict SCEV formation due to SCEExpander needing to preserve LCSSA, and b) don't iterate between loops.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363192 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 19:04:51 +00:00
Stanislav Mekhanoshin
197b40be90 [AMDGPU] more gfx1010 tests. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363190 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 18:44:11 +00:00
Jordan Rupprecht
c861026581 [llvm-ar][test] Relax lit directory assumptions in thin-archive.test
Summary: thin-archive.test assumes the Output/<testname> structure that lit creates. Rewrite the test in a way that still tests the same thing (creating via relative path and adding via absolute path) but doesn't assume this specific lit structure, making it possible to run in a lit emulator.

Reviewers: gbreynoo

Reviewed By: gbreynoo

Subscribers: llvm-commits, bkramer

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363189 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 18:41:27 +00:00
Stanislav Mekhanoshin
57160edc26 [AMDGPU] gfx1010 dpp16 and dpp8
Differential Revision: https://reviews.llvm.org/D63203

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363186 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 18:02:41 +00:00
Stanislav Mekhanoshin
7a1388e6ef [AMDGPU] gfx1010 premlane instructions
Differential Revision: https://reviews.llvm.org/D63202

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363185 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 17:52:51 +00:00
Simon Atanasyan
81930059a1 [Mips] Add s.d instruction alias for Mips1
Add support for s.d instruction for Mips1 which expands into two swc1
instructions.

Patch by Mirko Brkusanin.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363184 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 17:52:05 +00:00
Shoaib Meenai
a5dd191d8d [llvm-lipo] Update llvm-lipo docs for -archs flag
The information for -archs flag is added to llvm-lipo.rst.

Patch by Anusha Basana <anusha.basana@gmail.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363182 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 17:37:01 +00:00
Simon Pilgrim
e6ab126b86 [X86][SSE] Avoid unnecessary stack codegen in NT merge-consecutive-stores codegen tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363181 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 17:28:48 +00:00
Philip Reames
4298a2dd20 [SCEV] Teach computeSCEVAtScope benefit from one-input Phi. PR39673
SCEV does not propagate arguments through one-input Phis so as to make it easy for the SCEV expander (and related code) to preserve LCSSA.  It's not entirely clear this restriction is neccessary, but for the moment it exists.   For this reason, we don't analyze single-entry phi inputs.  However it is possible that when an this input leaves the loop through LCSSA Phi, it is a provable constant.  Missing that results in an order of optimization issue in loop exit value rewriting where we miss some oppurtunities based on order in which we visit sibling loops.

This patch teaches computeSCEVAtScope about this case. We can generalize it later, but so far we can only replace LCSSA Phis with their constant loop-exiting values.  We should probably also add similiar logic directly in the SCEV construction path itself.

Patch by: mkazantsev (with revised commit message by me)
Differential Revision: https://reviews.llvm.org/D58113



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363180 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 17:21:47 +00:00
Simon Pilgrim
9b95d3f22f [TargetLowering] Add MachineMemOperand::Flags to allowsMemoryAccess tests (PR42123)
As discussed on D62910, we need to check whether particular types of memory access are allowed, not just their alignment/address-space.

This NFC patch adds a MachineMemOperand::Flags argument to allowsMemoryAccess and allowsMisalignedMemoryAccesses, and wires up calls to pass the relevant flags to them.

If people are happy with this approach I can then update X86TargetLowering::allowsMisalignedMemoryAccesses to handle misaligned NT load/stores.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363179 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 17:14:03 +00:00
Simon Pilgrim
630452a0de [X86][AVX] Fold concat(vpermilps(x,c),vpermilps(y,c)) -> vpermilps(concat(x,y),c)
Handles PSHUFD/PSHUFLW/PSHUFHW (AVX2) + VPERMILPS (AVX1).

An extra AVX1 PSHUFD->VPERMILPS combine will be added in a future commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363178 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 16:38:20 +00:00
Sanjay Patel
ca0b43a08c [InstCombine] add tests for fmin/fmax libcalls; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363175 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 15:29:40 +00:00
Sam Parker
d5db651934 Revert rL363156.
The patch was to fix buildbots, but rL363157 should now be fixing it
in a cleaner way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363174 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 15:28:00 +00:00
David Bolvansky
a574b409a8 [NFC[ Updated tests for D54411
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363173 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 15:01:36 +00:00
Nico Weber
3646c4faaf gn build: Add SystemZ target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363170 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 14:24:43 +00:00
Matt Arsenault
1733b9a34a StackProtector: Use PointerMayBeCaptured
This was using its own, outdated list of possible captures. This was
at minimum not catching cmpxchg and addrspacecast captures.

One change is now any volatile access is treated as capturing. The
test coverage for this pass is quite inadequate, but this required
removing volatile in the lifetime capture test.

Also fixes some infrastructure issues to allow running just the IR
pass.

Fixes bug 42238.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363169 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 14:23:33 +00:00
Matt Arsenault
ceee7cafa8 AMDGPU/GlobalISel: Fix using illegal situations in tests
These were using illegal copies as the side effecting use, so make
them legal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363168 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 14:23:28 +00:00
Mikael Holmen
50037cbd51 [ARM] Fix compiler warning
Without this fix clang 3.6 complains with:

../lib/Target/ARM/ARMAsmPrinter.cpp:1473:18: error: variable 'BranchTarget' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
      } else if (MI->getOperand(1).isSymbol()) {
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/Target/ARM/ARMAsmPrinter.cpp:1479:22: note: uninitialized use occurs here
      MCInst.addExpr(BranchTarget);
                     ^~~~~~~~~~~~
../lib/Target/ARM/ARMAsmPrinter.cpp:1473:14: note: remove the 'if' if its condition is always true
      } else if (MI->getOperand(1).isSymbol()) {
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/Target/ARM/ARMAsmPrinter.cpp:1465:33: note: initialize the variable 'BranchTarget' to silence this warning
      const MCExpr *BranchTarget;
                                ^
                                 = nullptr
1 error generated.

Discussed here:
 http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190610/661417.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363166 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 14:19:22 +00:00
Matt Arsenault
7642580362 LoopVersioning: Respect convergent
This changes the standalone pass only. Arguably the utility class
itself should assert there are no convergent calls. However, a target
pass with additional context may still be able to version a loop if
all of the dynamic conditions are sufficiently uniform.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363165 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 14:05:58 +00:00
Anton Afanasyev
5ea18e1c35 [MIR] Skip hoisting to basic block which may throw exception or return
Summary:
Fix hoisting to basic block which are not legal for hoisting cause
it can be terminated by exception or it is return block.

Reviewers: john.brawn, RKSimon, MatzeB

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363164 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 13:51:44 +00:00
Sanjay Patel
279b044b9b [InstCombine] add tests for fcmp+select with FMF (minnum/maxnum); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363163 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 13:51:33 +00:00
Matt Arsenault
81ca43cc1c LoopLoadElim: Respect convergent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363162 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 13:50:47 +00:00
Jeremy Morse
578271f7ea [DebugInfo] Add a test that fell out of an earlier commit
r362951 was supposed to contain this test, however it didn't get committed
due to operator error. This was originally part of D59431.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363161 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 13:41:56 +00:00
Matt Arsenault
4d8041c0e5 LoopDistribute/LAA: Respect convergent
This case is slightly tricky, because loop distribution should be
allowed in some cases, and not others. As long as runtime dependency
checks don't need to be introduced, this should be OK. This is further
complicated by the fact that LoopDistribute partially ignores if LAA
says that vectorization is safe, and then does its own runtime pointer
legality checks.

Note this pass still does not handle noduplicate correctly, as this
should always be forbidden with it. I'm not going to bother trying to
fix it, as it would require more effort and I think noduplicate should
be removed.

https://reviews.llvm.org/D62607

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363160 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 13:34:19 +00:00
Nico Weber
705be8ba10 gn build: Add Mips target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363159 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 13:25:58 +00:00
Matt Arsenault
e04248b7f0 LoopDistribute/LAA: Add tests to catch regressions
I broke 2 of these with a patch, but were not covered by existing
tests.

https://reviews.llvm.org/D63035

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363158 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 13:15:59 +00:00
Sam Parker
7da998a80a [NFC] Add HardwareLoops lit.local.cfg file
Set Transforms/HardwareLoops/ARM/ tests as unsupported if there isn't
an arm target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363157 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 12:54:19 +00:00
Sam Parker
4a629f5588 Attempt to fix non-Arm buildbots
Adding REQUIRES: arm to failing tests


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363156 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 12:47:35 +00:00
Nico Weber
d479c5a1e4 Fix a Wunused-lambda-capture warning.
The capture was added in the first commit of https://reviews.llvm.org/D61934
when it was used. In the reland, the use was removed but the capture
wasn't removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363155 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 12:46:46 +00:00
Nico Weber
0a40e2c608 gn build: add RISCV target
Patch from David L. Jones <dlj@google.com>, with minor tweaks by me.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363154 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 12:41:03 +00:00
Simon Pilgrim
7cbbc2df64 [X86][AVX] Tests showing missing concat(shuffle,shuffle) -> shuffle(concat) folds. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363153 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 12:40:03 +00:00
Nico Weber
4dac0addd8 gn build: Merge r363122
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363152 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 12:27:04 +00:00
Ben Dunbobbin
e9a1530f3e [Legacy LTO] Fix build bots: r363140: Fix export name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363151 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 12:17:49 +00:00
Sam Parker
79f830394d [ARM] Implement TTI::isHardwareLoopProfitable
Implement the backend target hook to drive the HardwareLoops pass.
The low-overhead branch extension for Arm M-class cores is flexible
enough that we don't have to ensure correctness at this point, except
checking that the loop counter variable can be stored in LR - a
32-bit register. For it to be profitable, we want to avoid loops that
contain function calls, or any other instruction that alters the PC.
    
This implementation uses TargetLoweringInfo, to query type and
operation actions, looks at intrinsic calls and also performs some
manual checks for remainder/division and FP operations.
    
I think this should be a good base to start and extra details can be
filled out later.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363149 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 12:00:42 +00:00
Ayke van Laethem
78ef4965f2 [bindings/go][NFC] Format code with go fmt
Run go fmt (version 1.12) over the Go bindings. This cleans up lots of
inconsistencies in the code, it does not change the code in a functional
way.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363148 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 11:59:09 +00:00
Sam Parker
951993d66b [NFC][SCEV] Add NoWrapFlag argument to InsertBinOp
'Use wrap flags in InsertBinop' (rL362687) was reverted due to
miscompiles. This patch introduces the previous change to pass
no-wrap flags but now only FlagAnyWrap is passed.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363147 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 11:53:55 +00:00
James Henderson
6db0247339 [docs][llvm-symbolizer] Fix typo and grammar error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363145 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 11:41:43 +00:00
Nico Weber
2ecbbba539 Share /machine: handling code with llvm-cvtres too
r363016 let lld-link and llvm-lib share the /machine: parsing code.
This lets llvm-cvtres share it as well.

Making llvm-cvtres depend on llvm-lib seemed a bit strange (it doesn't
need llvm-lib's dependencies on BinaryFormat and BitReader) and I
couldn't find a good place to put this code. Since it's just a few
lines, put it in lib/Object for now.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363144 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 11:32:43 +00:00