Craig Topper [Mon, 14 Oct 2019 23:48:24 +0000 (23:48 +0000)]
[X86] Teach X86MCodeEmitter to properly encode zmm16-zmm31 as index register to vgatherpf/vscatterpf.
We need to encode bit 4 into the EVEX.V' bit. We do this right
for regular gather/scatter which use either MRMSrcMem or MRMDestMem
formats. The prefetches use MRM*m formats.
Fixes an issue recently added to PR36202.
llvm-svn: 374849
Craig Topper [Mon, 14 Oct 2019 23:48:12 +0000 (23:48 +0000)]
[X86] Add encoding tests for avx512pf vgatherpf/vscatterpf instructions.
llvm-svn: 374848
Julian Lettner [Mon, 14 Oct 2019 23:43:18 +0000 (23:43 +0000)]
[lit] Add argument check: --timeout must be non-negative integer
llvm-svn: 374847
Walter Erquinigo [Mon, 14 Oct 2019 23:32:46 +0000 (23:32 +0000)]
fix
llvm-svn: 374846
Jorge Gorbe Moya [Mon, 14 Oct 2019 23:25:25 +0000 (23:25 +0000)]
Revert "Dead Virtual Function Elimination"
This reverts commit
9f6a873268e1ad9855873d9d8007086c0d01cf4f.
llvm-svn: 374844
Eric Christopher [Mon, 14 Oct 2019 23:14:24 +0000 (23:14 +0000)]
Temporarily Revert [Modules][PCH] Hash input files content
as it's breaking a few bots.
This reverts r374841 (git commit
2a1386c81de504b5bda44fbecf3f7b4cdfd748fc)
llvm-svn: 374842
Bruno Cardoso Lopes [Mon, 14 Oct 2019 23:02:03 +0000 (23:02 +0000)]
[Modules][PCH] Hash input files content
Summary:
When files often get touched during builds, the mtime based validation
leads to different problems in implicit modules builds, even when the
content doesn't actually change:
- Modules only: module invalidation due to out of date files. Usually causing rebuild traffic.
- Modules + PCH: build failures because clang cannot rebuild a module if it comes from building a PCH.
- PCH: build failures because clang cannot rebuild a PCH in case one of the input headers has different mtime.
This patch proposes hashing the content of input files (headers and
module maps), which is performed during serialization time. When looking
at input files for validation, clang only computes the hash in case
there's a mtime mismatch.
I've tested a couple of different hash algorithms availble in LLVM in
face of building modules+pch for `#import <Cocoa/Cocoa.h>`:
- `hash_code`: performace diff within the noise, total module cache increased by 0.07%.
- `SHA1`: 5% slowdown. Haven't done real size measurements, but it'd be BLOCK_ID+20 bytes per input file, instead of BLOCK_ID+8 bytes from `hash_code`.
- `MD5`: 3% slowdown. Like above, but BLOCK_ID+16 bytes per input file.
Given the numbers above, the patch uses `hash_code`. The patch also
improves invalidation error msgs to point out which type of problem the
user is facing: "mtime", "size" or "content".
rdar://problem/
29320105
Reviewers: dexonsmith, arphaman, rsmith, aprantl
Subscribers: jkorous, cfe-commits, ributzka
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67249
llvm-svn: 374841
Eric Christopher [Mon, 14 Oct 2019 23:01:48 +0000 (23:01 +0000)]
Add -fno-experimental-pass-manager to make clear which pass manager
we're running and to make flipping the default not regress testing.
llvm-svn: 374840
Eric Christopher [Mon, 14 Oct 2019 22:56:07 +0000 (22:56 +0000)]
In the new pass manager use PTO.LoopUnrolling to determine when and how
we will unroll loops. Also comment a few occasions where we need to
know whether or not we're forcing the unwinder or not.
The default before and after this patch is for LoopUnroll to be enabled,
and for it to use a cost model to determine whether to unroll the loop
(`OnlyWhenForced = false`). Before this patch, disabling loop unroll
would not run the LoopUnroll pass. After this patch, the LoopUnroll pass
is being run, but it restricts unrolling to only the loops marked by a
pragma (`OnlyWhenForced = true`).
In addition, this patch disables the UnrollAndJam pass when disabling unrolling.
Testcase is in clang because it's controlling how the loop optimizer
is being set up and there's no other way to trigger the behavior.
llvm-svn: 374838
Jian Cai [Mon, 14 Oct 2019 22:51:12 +0000 (22:51 +0000)]
[clang] add requirements to -Wa,-W test cases.
Include linux as a test requirement.
llvm-svn: 374837
Eli Friedman [Mon, 14 Oct 2019 22:44:42 +0000 (22:44 +0000)]
[test] Fix test failure
The version mismatch symbol is version 9 on 32 bit android. Since
this test isn't actually testing any android specific functionality,
we force the target triple to x86_64-unknown-unknown in order to have
a consistent version number. It seems the test was already trying to
do this, just not doing it right
Patch by Christopher Tetrault
Differential Revision: https://reviews.llvm.org/D68882
llvm-svn: 374836
Philip Reames [Mon, 14 Oct 2019 22:42:35 +0000 (22:42 +0000)]
[Tests] Add a SCEV analysis test for llvm.widenable.condition
Mostly because we don't appear to have one and a prototype patch I just saw would have broken the example committed.
llvm-svn: 374835
Jian Cai [Mon, 14 Oct 2019 22:28:03 +0000 (22:28 +0000)]
Add support to -Wa,-W in clang
Summary:
Currently clang does not support -Wa,-W, which suppresses warning
messages in GNU assembler. Add this option for gcc compatibility.
https://bugs.llvm.org/show_bug.cgi?id=43651. Reland with differential
information.
Reviewers: bcain
Reviewed By: bcain
Subscribers: george.burgess.iv, gbiv, llozano, manojgupta, nickdesaulniers, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68884
llvm-svn: 374834
Jian Cai [Mon, 14 Oct 2019 22:28:01 +0000 (22:28 +0000)]
Revert "Add support to -Wa,-W in clang"
This reverts commit
e72eeca43b9577be2aae55f7603febbf223a6ab3.
llvm-svn: 374833
Jian Cai [Mon, 14 Oct 2019 22:22:26 +0000 (22:22 +0000)]
[ARM][AsmParser] handles offset expression in parentheses
Summary:
Integrated assembler does not accept offset expressions surrounded by
parenthesis. Handle this case for GAS compability.
https://bugs.llvm.org/show_bug.cgi?id=43631
Subscribers: kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68764
llvm-svn: 374832
David Blaikie [Mon, 14 Oct 2019 22:12:45 +0000 (22:12 +0000)]
DebugInfo: Remove unnecessary/mistaken inclusion of Bitcode/BitcodeAnalyzer.h
Introduced in r374582, Michael Spencer pointed out this broke the
modules build due to a missing tblgen dependency on
llvm/IR/Attributes.inc.
Michael fixed the dependency in r374827.
So this removes the inclusion and the new dependency (effectively
reverting r374827 and including the alternative fix of removing rather
than supporting the new dependency).
Thanks for the quick fix/notice, Michael!
llvm-svn: 374831
Roman Tereshin [Mon, 14 Oct 2019 22:01:58 +0000 (22:01 +0000)]
[update_mir_test_checks] Handle MI flags properly
previously we would generate literal check lines w/ no reg-exps for
vregs as MI flags (nsw, ninf, etc.) won't be recognized as a part of MI.
Fixing that. Includes updating the MIR tests that suffered from the
problem.
Reviewed By: bogner
Differential Revision: https://reviews.llvm.org/D68905
llvm-svn: 374829
Sanjay Patel [Mon, 14 Oct 2019 21:56:40 +0000 (21:56 +0000)]
[InstCombine] fold a shifted bool zext to a select
For a constant shift amount, add the following fold.
shl (zext (i1 X)), ShAmt --> select (X, 1 << ShAmt, 0)
https://rise4fun.com/Alive/IZ9
Fixes PR42257.
Based on original patch by @zvi (Zvi Rackover)
Differential Revision: https://reviews.llvm.org/D63382
llvm-svn: 374828
Michael J. Spencer [Mon, 14 Oct 2019 21:53:51 +0000 (21:53 +0000)]
[Modules Build] Add missing dependency.
A previous commit made libLLVMDebugInfoDWARF depend on the LLVM_Bitcode module which depends on the LLVM_intrinsic_gen module which depends onĀ "llvm/IR/Attributes.inc" which is a generated header not depended on by libLLVMDebugInfo. Add that dependency.
llvm-svn: 374827
Richard Smith [Mon, 14 Oct 2019 21:53:03 +0000 (21:53 +0000)]
PR43080: Do not build context-sensitive expressions during name classification.
Summary:
We don't know what context to use until the classification result is
consumed by the parser, which could happen in a different semantic
context. So don't build the expression that results from name
classification until we get to that point and can handle it properly.
This covers everything except C++ implicit class member access, which
is a little awkward to handle properly in the face of the protected
member access check. But it at least fixes all the currently-filed
instances of PR43080.
Reviewers: efriedma
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68896
llvm-svn: 374826
Lawrence D'Anna [Mon, 14 Oct 2019 21:51:02 +0000 (21:51 +0000)]
build fix for SBInstruction.
oops! I cherry-picked rL374820 thinking it was completely
independent of D68737, but it wasn't. It makes an incidental
use of SBFile::GetFile, which is introduced there, so I broke the
build.
The docs say you can commit without review for "obvious". I think
this qualifies. If this kind of fix isn't considered obvious, let
me know and I'll revert instead.
Fixes: rL374820
llvm-svn: 374825
Julian Lettner [Mon, 14 Oct 2019 21:23:40 +0000 (21:23 +0000)]
[lit] Create Run object later and only when it is needed
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D68843
llvm-svn: 374823
Jian Cai [Mon, 14 Oct 2019 21:21:39 +0000 (21:21 +0000)]
Add support to -Wa,-W in clang
Currently clang does not support -Wa,-W, which suppresses warning
messages in GNU assembler. Add this option for gcc compatibility.
https://bugs.llvm.org/show_bug.cgi?id=43651
llvm-svn: 374822
Jan Korous [Mon, 14 Oct 2019 21:06:11 +0000 (21:06 +0000)]
[NFC] Fix ClangScanDeps/static-analyzer.c test on Windows
Follow-up to
c5d14b5c6fa
llvm-svn: 374821
Lawrence D'Anna [Mon, 14 Oct 2019 20:59:57 +0000 (20:59 +0000)]
remove FILE* bindings from SBInstruction.
Summary:
This patch replaces the FILE* python bindings for SBInstruction and
SBInstructionList and replaces them with the new, safe SBFile and FileSP
bindings.
I also re-enable `Test_Disassemble_VST1_64`, because now we can use
the file bindings as an additional test of the disassembler, and we
can use the disassembler test as a test of the file bindings.
The bugs referred to in the comments appear to have been fixed. The
radar is closed now and the bugzilla bug does not reproduce with the
instructions given.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68890
llvm-svn: 374820
Alexey Bataev [Mon, 14 Oct 2019 20:44:34 +0000 (20:44 +0000)]
[OPNEMP]Allow num_tasks clause in combined task-based directives.
The expression of the num_tasks clause must be captured in the combined
task-based directives, like 'parallel master taskloop' directive.
llvm-svn: 374819
Sanjay Patel [Mon, 14 Oct 2019 20:28:03 +0000 (20:28 +0000)]
[InstCombine] add tests for select/shift transforms; NFC
A transform proposal for the shift form is in D63382.
llvm-svn: 374818
Lawrence D'Anna [Mon, 14 Oct 2019 20:15:34 +0000 (20:15 +0000)]
uint32_t options -> File::OpenOptions options
Summary:
This patch re-types everywhere that passes a File::OpenOptions
as a uint32_t so it actually uses File::OpenOptions.
It also converts some OpenOptions related functions that fail
by returning 0 or NULL into llvm::Expected
split off from https://reviews.llvm.org/D68737
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68853
llvm-svn: 374817
Lawrence D'Anna [Mon, 14 Oct 2019 20:15:28 +0000 (20:15 +0000)]
remove FILE* usage from ReportEventState() and HandleProcessEvent()
Summary:
This patch adds FileSP and SBFile versions of the API methods
ReportEventState and HandleProcessEvent. It points the SWIG
wrappers at these instead of the ones that use FILE* streams.
Reviewers: JDevlieghere, jasonmolenda, labath, jingham
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68546
llvm-svn: 374816
Jan Korous [Mon, 14 Oct 2019 20:15:01 +0000 (20:15 +0000)]
[clang-scan-deps] Support for clang --analyze in clang-scan-deps
The goal is to have 100% fidelity in clang-scan-deps behavior when
--analyze is present in compilation command.
At the same time I don't want to break clang-tidy which expects
__static_analyzer__ macro defined as built-in.
I introduce new cc1 options (-setup-static-analyzer) that controls
the macro definition and is conditionally set in driver.
Differential Revision: https://reviews.llvm.org/D68093
llvm-svn: 374815
Joel E. Denny [Mon, 14 Oct 2019 19:59:30 +0000 (19:59 +0000)]
[lit] Extend internal diff to support -U
When using lit's internal shell, RUN lines like the following
accidentally execute an external `diff` instead of lit's internal
`diff`:
```
# RUN: program | diff -U1 file -
```
Such cases exist now, in `clang/test/Analysis` for example. We are
preparing patches to ensure lit's internal `diff` is called in such
cases, which will then fail because lit's internal `diff` doesn't
recognize `-U` as a command-line option. This patch adds `-U`
support.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D68668
llvm-svn: 374814
Philip Reames [Mon, 14 Oct 2019 19:49:40 +0000 (19:49 +0000)]
[Tests] Add a test demonstrating a miscompile in the off-by-default loop-pred transform
Credit goes to Evgeny Brevnov for figuring out the problematic case.
Fuzzing probably also found it (lots of failures), but due to some silly infrastructure problems I hadn't gotten to the results before Evgeny hand reduced it from a benchmark.
llvm-svn: 374812
Roman Lebedev [Mon, 14 Oct 2019 19:46:34 +0000 (19:46 +0000)]
[LoopIdiom] BCmp: loop exit count must not be wider than size_t that `bcmp` takes
As reported by Joerg Sonnenberger in IRC, for 32-bit systems,
where pointer and size_t are 32-bit, if you use 64-bit-wide variable
in the loop, you could end up with loop exit count being of the type
wider than the size_t. Now, i'm not sure if we can produce `bcmp`
from that (just truncate?), but we certainly should not assert/miscompile.
llvm-svn: 374811
Alexey Bataev [Mon, 14 Oct 2019 19:29:52 +0000 (19:29 +0000)]
[OPNEMP]Allow grainsize clause in combined task-based directives.
The expression of the grainsize clause must be captured in the combined
task-based directives, like 'parallel master taskloop' directive.
llvm-svn: 374810
Cameron McInally [Mon, 14 Oct 2019 19:17:31 +0000 (19:17 +0000)]
[ASan] Fix IRTests/InstructionsTest.UnaryOperator
Fix ASan regression from r374782.
llvm-svn: 374808
Philip Reames [Mon, 14 Oct 2019 19:10:39 +0000 (19:10 +0000)]
[Tests] Add a few more tests for idioms with FP induction variables
llvm-svn: 374807
Casey Carter [Mon, 14 Oct 2019 19:05:04 +0000 (19:05 +0000)]
[libc++][test] Portability fix for std::any tests
Ensure that `large_tracked_t` defined in `any_helpers.h` is in fact too large to fit in `std::any`'s small object buffer.
llvm-svn: 374806
Puyan Lotfi [Mon, 14 Oct 2019 18:57:29 +0000 (18:57 +0000)]
[clang][IFS][test] Fixing lit test breakages on macOS due to r374798
Adding the quotes breaks tests because on Darwin the name mangling is prefixed
with an underscore.
llvm-svn: 374805
Lawrence D'Anna [Mon, 14 Oct 2019 18:53:27 +0000 (18:53 +0000)]
Fix test breakage caused by r374424
Summary:
The build directory name is based on the test method name, so having
two test methods with the same name in the same test file is a
problem, even if they're in different test classes.
On linux and darwin this conflict can go unnoticed, but windows
has different filesystem semantics and it will fail when one
process tries to delete files still held open by another.
The problem is fixed just by changing the name of one of the test
methods.
Reviewers: JDevlieghere, jasonmolenda, labath, stella.stamenova
Reviewed By: stella.stamenova
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68951
llvm-svn: 374803
Teresa Johnson [Mon, 14 Oct 2019 18:37:31 +0000 (18:37 +0000)]
[ThinLTO] Fix printing of NoInline function summary flag
Summary:
The guard for printing function flags in the summary was not checking
the NoInline flag.
Reviewers: wmi
Subscribers: mehdi_amini, inglorion, hiraditya, steven_wu, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68948
llvm-svn: 374802
Matt Arsenault [Mon, 14 Oct 2019 18:30:31 +0000 (18:30 +0000)]
AMDGPU: Fix redundant setting of m0 for atomic load/store
Atomic load/store would have their setting of m0 handled twice, which
happened to be optimized out later.
llvm-svn: 374801
Matt Arsenault [Mon, 14 Oct 2019 18:30:29 +0000 (18:30 +0000)]
AMDGPU: Remove unnecessary IR from test
llvm-svn: 374800
Nathan Ridge [Mon, 14 Oct 2019 18:26:13 +0000 (18:26 +0000)]
[clangd] Improve semantic highlighting in dependent contexts (fixes #154)
Reviewers: hokein
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67901
llvm-svn: 374799
Puyan Lotfi [Mon, 14 Oct 2019 18:03:03 +0000 (18:03 +0000)]
[clang][IFS] Escape mangled names so MS ABI doesn't break YAML parsing.
Microsoft's ABI mangles names differently than Itanium and this breaks the LLVM
yaml parser unless the name is escaped in quotes. Quotes are being added to the
mangled names of the IFS file generation so that llvm-ifs doesn't break when
Windows triples are passed to the driver.
Differential Revision: https://reviews.llvm.org/D68915
llvm-svn: 374798
Casey Carter [Mon, 14 Oct 2019 18:00:34 +0000 (18:00 +0000)]
[libc++][test] Add license headers to test/support/archetypes.*
Differential Revision: https://reviews.llvm.org/D68947
llvm-svn: 374797
Hans Wennborg [Mon, 14 Oct 2019 17:52:31 +0000 (17:52 +0000)]
Fix copy-pasto in r374759
llvm-svn: 374796
Jordan Rupprecht [Mon, 14 Oct 2019 17:47:17 +0000 (17:47 +0000)]
[llvm-objdump] Adjust spacing and field width for --section-headers
Summary:
- Expand the "Name" column past 13 characters when any of the section names are longer. Current behavior is a staggard output instead of a nice table if a single name is longer.
- Only print the required number of hex chars for addresses (i.e. 8 characters for 32-bit, 16 characters for 64-bit)
- Fix trailing spaces
Reviewers: grimar, jhenderson, espindola
Reviewed By: grimar
Subscribers: emaste, sbc100, arichardson, aheejin, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68730
llvm-svn: 374795
Michael Berg [Mon, 14 Oct 2019 17:39:32 +0000 (17:39 +0000)]
Add FMF to vector ops for phi
Summary: Small amendment to handle vector cases for D67564.
Reviewers: spatel, eli.friedman, hfinkel, cameron.mcinally, arsenm, jmolloy, bogner
Reviewed By: cameron.mcinally, bogner
Subscribers: llvm-commits, efriedma, reames, bogner, wdng
Differential Revision: https://reviews.llvm.org/D68748
llvm-svn: 374794
Jordan Rupprecht [Mon, 14 Oct 2019 17:29:15 +0000 (17:29 +0000)]
Reapply: [llvm-size] Tidy up error messages (PR42970)
Clean up some formatting inconsistencies in the error messages and correctly exit with non-zero in all error cases.
Originally submitted as r374771 and then reverted as r374780, this patch fixes the libObject test case in Object/macho-invalid.test.
Patch by Alex Cameron
Differential Revision: https://reviews.llvm.org/D68906
llvm-svn: 374793
Vedant Kumar [Mon, 14 Oct 2019 17:20:22 +0000 (17:20 +0000)]
[llvm-profdata] Weaken "malformed-ptr-to-counter-array.test" to appease arm bots
There are a number arm bots failing after r374617 landed, and I'm not
sure why. It looks a bit like the error message llvm-profdata is
expected to print to stderr isn't flushed.
Weaken the test in an attempt to appease the arm bots: if this doesn't
work, that means that llvm-profdata is actually *not failing*, and that
will be a clear indication that some logic error is actually happening.
http://lab.llvm.org:8011/builders/clang-cmake-armv7-global-isel/builds/5604/
llvm-svn: 374792
Alexey Bataev [Mon, 14 Oct 2019 17:17:41 +0000 (17:17 +0000)]
[OPENMP50]Add support for 'parallel master taskloop' construct.
Added parsing/sema/codegen support for 'parallel master taskloop'
constructs. Some of the clauses, like 'grainsize', 'num_tasks', 'final'
and 'priority' are not supported in full, only constant expressions can
be used currently in these clauses.
llvm-svn: 374791
Artem Belevich [Mon, 14 Oct 2019 16:53:34 +0000 (16:53 +0000)]
[NVPTX] Restructure shfl instrinsics and add variants that return a predicate.
Also, amend constraints for non-sync variants that are no longer
available on sm_70+ with PTX6.4+.
Differential Revision: https://reviews.llvm.org/D68892
llvm-svn: 374790
Simon Pilgrim [Mon, 14 Oct 2019 16:46:21 +0000 (16:46 +0000)]
BitsInit::resolveReferences - silence static analyzer null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, assert to check that the loop has set the cached pointer.
llvm-svn: 374789
Simon Pilgrim [Mon, 14 Oct 2019 16:46:11 +0000 (16:46 +0000)]
XCOFFObjectWriter - silence static analyzer dyn_cast<> null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, but we should be able to use cast<> directly and if not assert will fire for us.
llvm-svn: 374788
Alexey Bataev [Mon, 14 Oct 2019 16:44:01 +0000 (16:44 +0000)]
[OPENMP]Fix codegen for private variably length vars in combined
constructs.
If OpenMP construct includes several capturing regions and the variable
is declared as private, the length of the inner variable length array is
not captured in outer captured regions, only in the innermost region.
Patch fixes this bug.
llvm-svn: 374787
Simon Pilgrim [Mon, 14 Oct 2019 16:30:17 +0000 (16:30 +0000)]
[CostModel][X86] Add CTLZ scalar costs
Add specific scalar costs for CTLZ instructions, we can't discriminate between CTLZ and CTLZ_ZERO_UNDEF so we have to assume the worst. Given how BSR is often a microcoded nightmare on some older targets we might still be underestimating it.
For targets supporting LZCNT (Intel Haswell+ or AMD Fam10+), we provide overrides that assume 1cy costs.
llvm-svn: 374786
Diogo N. Sampaio [Mon, 14 Oct 2019 16:29:26 +0000 (16:29 +0000)]
[ARM] Preserve fpu behaviour for '-crypto'
Summary:
This patch restores the behaviour that -fpu overwrites the
architecture obtained from -march or -mcpu flags, not enforcing to
disable 'crypto' if march=armv7 and mfpu=neon-fp-armv8.
However, it does warn that 'crypto' is ignored when passing
mfpu=crypto-neon-fp-armv8.
Reviewers: peter.smith, labrinea
Reviewed By: peter.smith
Subscribers: nickdesaulniers, kristof.beyls, dmgreen, cfe-commits, krisb
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67608
llvm-svn: 374785
Joerg Sonnenberger [Mon, 14 Oct 2019 16:15:14 +0000 (16:15 +0000)]
Reapply r374743 with a fix for the ocaml binding
Add a pass to lower is.constant and objectsize intrinsics
This pass lowers is.constant and objectsize intrinsics not simplified by
earlier constant folding, i.e. if the object given is not constant or if
not using the optimized pass chain. The result is recursively simplified
and constant conditionals are pruned, so that dead blocks are removed
even for -O0. This allows inline asm blocks with operand constraints to
work all the time.
The new pass replaces the existing lowering in the codegen-prepare pass
and fallbacks in SDAG/GlobalISEL and FastISel. The latter now assert
on the intrinsics.
Differential Revision: https://reviews.llvm.org/D65280
llvm-svn: 374784
Sanjay Patel [Mon, 14 Oct 2019 15:53:55 +0000 (15:53 +0000)]
[x86] adjust select to sra tests; NFC
Avoid demanded-bits-based specializations (that may not be ideal,
but that's another problem).
llvm-svn: 374783
Cameron McInally [Mon, 14 Oct 2019 15:35:01 +0000 (15:35 +0000)]
[IRBuilder] Update IRBuilder::CreateFNeg(...) to return a UnaryOperator
Reapply r374240 with fix for Ocaml test, namely Bindings/OCaml/core.ml.
Differential Revision: https://reviews.llvm.org/D61675
llvm-svn: 374782
David Green [Mon, 14 Oct 2019 15:19:33 +0000 (15:19 +0000)]
[ARM] Selection for MVE VMOVN
The adds both VMOVNt and VMOVNb instruction selection from the appropriate
shuffles. We detect shuffle masks of the form:
0, N, 2, N+2, 4, N+4, ...
or
0, N+1, 2, N+3, 4, N+5, ...
ISel will also try the opposite patterns, with inputs reversed. These are
selected to VMOVNt and VMOVNb respectively.
Differential Revision: https://reviews.llvm.org/D68283
llvm-svn: 374781
Nico Weber [Mon, 14 Oct 2019 14:44:26 +0000 (14:44 +0000)]
Revert r374771 "[llvm-size] Tidy up error messages (PR42970)"
This reverts commit
83e52f5e1150018329b8907bb014c77ac382d611.
Makes Object/macho-invalid.test fail everywhere, e.g. here:
http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/23669/steps/test-llvm/logs/FAIL%3A%20LLVM%3A%3Amacho-invalid.test
llvm-svn: 374780
Sanjay Patel [Mon, 14 Oct 2019 14:43:06 +0000 (14:43 +0000)]
[x86] add tests for possible select to sra transforms; NFC
llvm-svn: 374779
Casey Carter [Mon, 14 Oct 2019 14:38:12 +0000 (14:38 +0000)]
[libc++][test] Silence more warnings in variant tests
More cases of signed-to-unsigned conversion warnings that missed the train for
d2623522.
llvm-svn: 374778
David Green [Mon, 14 Oct 2019 14:29:26 +0000 (14:29 +0000)]
[ARM] Add some VMOVN tests. NFC
llvm-svn: 374777
Pavel Labath [Mon, 14 Oct 2019 14:16:39 +0000 (14:16 +0000)]
minidump: Use yaml for memory info tests
Also, delete some minidump binary files that are no longer used in any
test.
llvm-svn: 374776
Simon Pilgrim [Mon, 14 Oct 2019 14:07:43 +0000 (14:07 +0000)]
[CostModel][X86] Add CTPOP scalar costs (PR43656)
Add specific scalar costs for ctpop instructions, these are based on the llvm-mca's SLM throughput numbers (the oldest model we have).
For targets supporting POPCNT, we provide overrides that assume 1cy costs.
llvm-svn: 374775
Sam Elliott [Mon, 14 Oct 2019 14:00:13 +0000 (14:00 +0000)]
[RISCV] enable LTO support, pass some options to linker.
Summary:
1. enable LTO need to pass target feature and abi to LTO code generation
RISCV backend need the target feature to decide which extension used in
code generation.
2. move getTargetFeatures to CommonArgs.h and add ForLTOPlugin flag
3. add general tools::getTargetABI in CommonArgs.h because different target uses different
way to get the target ABI.
Patch by Kuan Hsu Chen (khchen)
Reviewers: lenary, lewis-revill, asb, MaskRay
Reviewed By: lenary
Subscribers: hiraditya, dschuff, aheejin, fedor.sergeev, mehdi_amini, inglorion, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, steven_wu, rogfer01, MartinMosbeck, brucehoult, the_o, dexonsmith, rkruppe, PkmX, jocewei, psnobl, benna, Jim, lenary, s.egerton, pzheng, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67409
llvm-svn: 374774
Guillaume Chatelet [Mon, 14 Oct 2019 13:14:34 +0000 (13:14 +0000)]
[Alignment][NFC] Move and type functions from MathExtras to Alignment
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68942
llvm-svn: 374773
Sander de Smalen [Mon, 14 Oct 2019 13:11:34 +0000 (13:11 +0000)]
[AArch64] Stackframe accesses to SVE objects.
Materialize accesses to SVE frame objects from SP or FP, whichever is
available and beneficial.
This patch still assumes the objects are pre-allocated. The automatic
layout of SVE objects within the stackframe will be added in a separate
patch.
Reviewers: greened, cameron.mcinally, efriedma, rengolin, thegameg, rovka
Reviewed By: cameron.mcinally
Differential Revision: https://reviews.llvm.org/D67749
llvm-svn: 374772
Fangrui Song [Mon, 14 Oct 2019 12:51:47 +0000 (12:51 +0000)]
[llvm-size] Tidy up error messages (PR42970)
Clean up some formatting inconsistencies in the error messages and correctly exit with non-zero in all error cases.
Differential Revision: https://reviews.llvm.org/D68906
Patch by Alex Cameron
llvm-svn: 374771
David Stenberg [Mon, 14 Oct 2019 12:49:58 +0000 (12:49 +0000)]
[DebugInfo] Fix truncation of call site immediates
Summary:
This addresses a bug in collectCallSiteParameters() where call site
immediates would be truncated from int64_t to unsigned.
This fixes PR43525.
Reviewers: djtodoro, NikolaPrica, aprantl, vsk
Reviewed By: aprantl
Subscribers: hiraditya, llvm-commits
Tags: #debug-info, #llvm
Differential Revision: https://reviews.llvm.org/D68869
llvm-svn: 374770
Pavel Labath [Mon, 14 Oct 2019 12:49:06 +0000 (12:49 +0000)]
DWARFExpression: Fix/add support for (v4) debug_loc base address selection entries
The DWARFExpression is parsing the location lists in about five places.
Of those, only one actually had proper support for base address
selection entries.
Since r374600, llvm has started to produce location expressions with
base address selection entries more aggresively, which caused some tests
to fail.
This patch adds support for these entries to the places which had it
missing, fixing the failing tests. It also adds a targeted test for the
two of the three fixes, which should continue testing this functionality
even if the llvm output changes. I am not aware of a way to write a
targeted test for the third fix (DWARFExpression::Evaluate).
llvm-svn: 374769
Dmitri Gribenko [Mon, 14 Oct 2019 12:22:48 +0000 (12:22 +0000)]
Revert "Add a pass to lower is.constant and objectsize intrinsics"
This reverts commit r374743. It broke the build with Ocaml enabled:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/19218
llvm-svn: 374768
Alexander Timofeev [Mon, 14 Oct 2019 12:01:10 +0000 (12:01 +0000)]
[AMDGPU] Come back patch for the 'Assign register class for cross block values according to the divergence.'
Detailed description:
After https://reviews.llvm.org/D59990 submit several issues were discovered.
Changes in common code were preserved but AMDGPU specific part was reverted to keep the backend working correctly.
Discovered issues were addressed in the following commits:
https://reviews.llvm.org/D67662
https://reviews.llvm.org/D67101
https://reviews.llvm.org/D63953
https://reviews.llvm.org/D63731
This change brings back AMDGPU specific changes.
Reviewed by: rampitec, arsenm
Differential Revision: https://reviews.llvm.org/D68635
llvm-svn: 374767
Victor Campos [Mon, 14 Oct 2019 11:12:23 +0000 (11:12 +0000)]
Fixing typo in llvm/IR/Intrinsics.td
Fixing typo in comment line.
llvm-svn: 374766
Andrea Di Biagio [Mon, 14 Oct 2019 11:12:18 +0000 (11:12 +0000)]
[X86][BtVer2] Improved latency and throughput of float/vector loads and stores.
This patch introduces the following changes to the btver2 scheduling model:
- The number of micro opcodes for YMM loads and stores is now 2 (it was
incorrectly set to 1 for both aligned and misaligned loads/stores).
- Increased the number of AGU resource cycles for YMM loads and stores
to 2cy (instead of 1cy).
- Removed JFPU01 and JFPX from the list of resources consumed by pure
float/vector loads (no MMX).
I verified with llvm-exegesis that pure XMM/YMM loads are no-pipe. Those
are dispatched to the FPU but not really issues on JFPU01.
Differential Revision: https://reviews.llvm.org/D68871
llvm-svn: 374765
Sam Parker [Mon, 14 Oct 2019 10:00:21 +0000 (10:00 +0000)]
[NFC][TTI] Add Alignment for isLegalMasked[Load/Store]
Add an extra parameter so the backend can take the alignment into
consideration.
Differential Revision: https://reviews.llvm.org/D68400
llvm-svn: 374763
Guillaume Chatelet [Mon, 14 Oct 2019 09:31:00 +0000 (09:31 +0000)]
Fix D68936
llvm-svn: 374761
Hans Wennborg [Mon, 14 Oct 2019 09:08:57 +0000 (09:08 +0000)]
build_llvm_package.bat: Run check-clang-tools and check-clangd tests.
llvm-svn: 374759
Guillaume Chatelet [Mon, 14 Oct 2019 09:04:15 +0000 (09:04 +0000)]
[Alignment][NFC] Support compile time constants
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68936
llvm-svn: 374758
Sjoerd Meijer [Mon, 14 Oct 2019 07:40:36 +0000 (07:40 +0000)]
[docs] loop pragmas: options implying transformations
Following our discussion on the cfe dev list:
http://lists.llvm.org/pipermail/cfe-dev/2019-August/063054.html,
I have added a paragraph that is explicit about loop pragmas, and
transformation options implying the corresponding transformation.
Differential Revision: https://reviews.llvm.org/D66199
llvm-svn: 374756
Craig Topper [Mon, 14 Oct 2019 06:47:56 +0000 (06:47 +0000)]
[X86] Teach EmitTest to handle ISD::SSUBO/USUBO in order to use the Z flag from the subtract directly during isel.
This prevents isel from emitting a TEST instruction that
optimizeCompareInstr will need to remove later.
In some of the modified tests, the SUB gets duplicated due to
the flags being needed in two places and being clobbered in
between. optimizeCompareInstr was able to optimize away the TEST
that was using the result of one of them, but optimizeCompareInstr
doesn't know to turn SUB into CMP after removing the TEST. It
only knows how to turn SUB into CMP if the result was already
dead.
With this change the TEST never exists, so optimizeCompareInstr
doesn't have to remove it. Then it can just turn the SUB into
CMP immediately.
Fixes PR43649.
llvm-svn: 374755
Michal Gorny [Mon, 14 Oct 2019 05:33:23 +0000 (05:33 +0000)]
[clang] [clang-offload-bundler] Fix finding installed llvm-objcopy
Allow finding installed llvm-objcopy in PATH if it's not present
in the directory containing clang-offload-bundler. This is the case
if clang is being built stand-alone, and llvm-objcopy is already
installed while the c-o-b tool is still present in build directory.
This is consistent with how e.g. llvm-symbolizer is found in LLVM.
However, most of similar searches in LLVM and Clang are performed
without special-casing the program directory.
Fixes r369955.
Differential Revision: https://reviews.llvm.org/D68931
llvm-svn: 374754
Nico Weber [Mon, 14 Oct 2019 03:44:47 +0000 (03:44 +0000)]
clangd tests: use extended regex with sed
The escaped parens seem to confuse the combination of lit, cygwin
quoting, and cygwin's sed. unxutils sed in cmd.exe is fine with both
forms, so use the extended regex form that doesn't need an escaped
paren.
llvm-svn: 374753
Nico Weber [Mon, 14 Oct 2019 02:21:12 +0000 (02:21 +0000)]
convert another test to unix line endings
llvm-svn: 374752
Nico Weber [Mon, 14 Oct 2019 02:14:18 +0000 (02:14 +0000)]
convert a test to unix line endings
llvm-svn: 374751
Nico Weber [Mon, 14 Oct 2019 01:44:29 +0000 (01:44 +0000)]
fix typo in 374747
llvm-svn: 374750
Nico Weber [Mon, 14 Oct 2019 01:41:56 +0000 (01:41 +0000)]
Prefer 'env not' over 'not env' in tests.
That way, lit's builtin 'env' command can be used for the 'env' bit.
Also it's clearer that way that the 'not' shouldn't cover 'env'
failures.
llvm-svn: 374749
Craig Topper [Mon, 14 Oct 2019 01:41:04 +0000 (01:41 +0000)]
[X86] Autogenerate complete checks. NFC
llvm-svn: 374748
Nico Weber [Mon, 14 Oct 2019 01:19:53 +0000 (01:19 +0000)]
Make symbols.test pass on Windows.
See commit message of r374746 for details.
Hopefully final bit of PR43592.
llvm-svn: 374747
Nico Weber [Mon, 14 Oct 2019 01:00:33 +0000 (01:00 +0000)]
Make code-action-request.test and request-reply.test pass on Windows.
clangd's test:// scheme expands to /clangd-test on non-Win and to
C:/clang-test on Win, so it can't be mixed freely with
file:///clangd-test since that's wrong on Windows. This makes both
tests consistenly use the test:// scheme. (Alternatively, we could use
the //INPUT_DIR pattern used in a few other tests.)
Part of PR43592.
llvm-svn: 374746
Nico Weber [Mon, 14 Oct 2019 00:45:02 +0000 (00:45 +0000)]
Don't run background-index.test on Windows.
The test had a "UNSUPPORTED: win32" line, but the spelling of that
changed in r339307 a year ago. Finally update this test too.
Part of PR43592.
llvm-svn: 374745
Florian Hahn [Sun, 13 Oct 2019 23:34:13 +0000 (23:34 +0000)]
[NewGVN] Use m_Br to simplify code a bit. (NFC)
llvm-svn: 374744
Joerg Sonnenberger [Sun, 13 Oct 2019 23:00:15 +0000 (23:00 +0000)]
Add a pass to lower is.constant and objectsize intrinsics
This pass lowers is.constant and objectsize intrinsics not simplified by
earlier constant folding, i.e. if the object given is not constant or if
not using the optimized pass chain. The result is recursively simplified
and constant conditionals are pruned, so that dead blocks are removed
even for -O0. This allows inline asm blocks with operand constraints to
work all the time.
The new pass replaces the existing lowering in the codegen-prepare pass
and fallbacks in SDAG/GlobalISEL and FastISel. The latter now assert
on the intrinsics.
Differential Revision: https://reviews.llvm.org/D65280
llvm-svn: 374743
Joerg Sonnenberger [Sun, 13 Oct 2019 22:33:46 +0000 (22:33 +0000)]
Improve __builtin_constant_p lowering
__builtin_constant_p used to be short-cut evaluated to false when
building with -O0. This is undesirable as it means that constant folding
in the front-end can give different results than folding in the back-end.
It can also create conditional branches on constant conditions that don't
get folded away. With the pending improvements to the llvm.is.constant
handling on the LLVM side, the short-cut is no longer useful.
Adjust various codegen tests to not depend on the short-cut or the
backend optimisations.
Differential Revision: https://reviews.llvm.org/D67638
llvm-svn: 374742
Simon Atanasyan [Sun, 13 Oct 2019 22:10:06 +0000 (22:10 +0000)]
merge-request.sh: Update 9.0 metabug for 9.0.1
llvm-svn: 374741
Johannes Doerfert [Sun, 13 Oct 2019 21:25:53 +0000 (21:25 +0000)]
[Attributor] Shortcut no-return through will-return
No-return and will-return are exclusive, assuming the latter is more
prominent we can avoid updates of the former unless will-return is not
known for sure.
llvm-svn: 374739
Johannes Doerfert [Sun, 13 Oct 2019 20:48:26 +0000 (20:48 +0000)]
[Attributor][FIX] NullPointerIsDefined needs the pointer AS (AANonNull)
Also includes a shortcut via AADereferenceable if possible.
llvm-svn: 374737
Johannes Doerfert [Sun, 13 Oct 2019 20:47:16 +0000 (20:47 +0000)]
[Attributor][MemBehavior] Fallback to the function state for arguments
Even if an argument is captured, we cannot have an effect the function
does not have. This is fine except for the special case of `inalloca` as
it does not behave by the rules.
TODO: Maybe the special rule for `inalloca` is wrong after all.
llvm-svn: 374736