Roman Lebedev [Tue, 30 Jul 2019 15:46:03 +0000 (15:46 +0000)]
[DivRemPairs] Add srem-of-srem tests (PR42823, D65298, D65451)
The @srem_of_srem_expanded case exposed a RAUW pitfall in D65298.
Right now these don't appear to fail verification,
so it should be safe to precommit them.
https://reviews.llvm.org/D65298
https://bugs.llvm.org/show_bug.cgi?id=42823
https://reviews.llvm.org/D65451
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367325
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Fertile [Tue, 30 Jul 2019 15:37:01 +0000 (15:37 +0000)]
Address post commit review comments on revision 366727.
Addresses number of comment made on D64652 after commiting:
- Reorders function decls in the TargetLoweringObjectFileXCOFF class.
- Fix comment in MCSectionXCOFF to include description of external reference
csects.
- Convert several llvm_unreachables to report_fatal_error
- Convert several dyn_casts to casts as they are expected not to fail.
- Avoid copying DataLayout object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367324
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Tue, 30 Jul 2019 15:28:22 +0000 (15:28 +0000)]
[InstCombine] Fold "x ?% y ==/!= 0" to "x & (y-1) ==/!= 0" iff y is power-of-two
Summary:
I have stumbled into this by accident while preparing to extend backend `x s% C ==/!= 0` handling.
While we did happen to handle this fold in most of the cases,
the folding is indirect - we fold `x u% y` to `x & (y-1)` (iff `y` is power-of-two),
or first turn `x s% -y` to `x u% y`; that does handle most of the cases.
But we can't turn `x s% INT_MIN` to `x u% -INT_MIN`,
and thus we end up being stuck with `(x s% INT_MIN) == 0`.
There is no such restriction for the more general fold:
https://rise4fun.com/Alive/IIeS
To be noted, the fold does not enforce that `y` is a constant,
so it may indeed increase instruction count.
This is consistent with what `x u% y`->`x & (y-1)` already does.
I think it makes sense, it's at most one (simple) extra instruction,
while `rem`ainder is really much more un-simple (and likely **very** costly).
Reviewers: spatel, RKSimon, nikic, xbolva00, craig.topper
Reviewed By: RKSimon
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65046
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367322
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 30 Jul 2019 15:25:14 +0000 (15:25 +0000)]
Ask confirmation when `git llvm push` will push multiple commits
This can reduce unexpectedly pushing more than expected by the user.
Differential Revision: https://reviews.llvm.org/D64893
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367321
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 30 Jul 2019 15:25:11 +0000 (15:25 +0000)]
Fix `git llvm` script when no arguments are supplied on Python 3
Instead of displaying a help message, it was issuing an error message:
AttributeError: 'Namespace' object has no attribute 'func'
https://bugs.python.org/issue16308 has more information on the bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367320
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 30 Jul 2019 15:06:09 +0000 (15:06 +0000)]
[X86] SimplifyDemandedVectorEltsForTargetNode should be calling resolveTargetShuffleInputs not getTargetShuffleMask
Add TODO comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367318
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 30 Jul 2019 14:17:58 +0000 (14:17 +0000)]
gn build: Use rebase_path on filename args to libcxx/utils/gen_link_script.py
$ ninja -j800
[1/5] ACTION //libcxx/src:cxx_linker_script(//llvm/utils/gn/build/toolchain:stage2_unix)
FAILED: lib/libc++.so
python ../libcxx/utils/gen_link_script.py --input //build.gn/lib/libc++.so.0 --output //build.gn/lib/libc++.so c++abi unwind
GENERATING SCRIPT: 'INPUT(libc++.so.0 -lc++abi -lunwind)' as file //build.gn/lib/libc++.so
Traceback (most recent call last):
File "../libcxx/utils/gen_link_script.py", line 57, in <module>
sys.exit(main())
File "../libcxx/utils/gen_link_script.py", line 50, in main
with open(args.output, 'w') as f:
IOError: [Errno 2] No such file or directory: '//build.gn/lib/libc++.so'
ninja: build stopped: subcommand failed.
Differential revision: https://reviews.llvm.org/D65449
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367314
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Elliott [Tue, 30 Jul 2019 13:40:51 +0000 (13:40 +0000)]
[RISCV] Attempt to make rv{32,64}i-aliases-invalid.s less flaky
These tests have been disabled on Linux and Windows due to failing
there. I think that could be down to a race condition between stdout
and stderr, so I have disabled output to stdout.
For the moment, only re-enable on linux, because I don't have a windows
machine to test on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367311
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Tue, 30 Jul 2019 13:37:02 +0000 (13:37 +0000)]
[llvm-objcopy] - Stop using Inputs/alloc-symtab.o
Initially Inputs/alloc-symtab.o was added in D42222.
It contains an allocatable .symtab section. Today
we are able to create such sections using yaml2obj.
Later people started using this input for no solid reason in their tests.
Now multiple of tests are using it.
(And those tests do not need such a specific case actually).
In this patch I removed this binary and rewrote the few tests.
Differential revision: https://reviews.llvm.org/D65278
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367310
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 30 Jul 2019 11:35:13 +0000 (11:35 +0000)]
[X86][AVX] SimplifyDemandedVectorElts - handle extraction from X86ISD::SUBV_BROADCAST source (PR42819)
PR42819 showed an issue that we couldn't handle the case where we demanded a 'sub-sub-vector' of the SUBV_BROADCAST 'sub-vector' source.
This patch recognizes these cases and extracts the sub-sub-vector instead of trying to broadcast to a type smaller than the 'sub-vector' source.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367306
91177308-0d34-0410-b5e6-
96231b3b80d8
Rainer Orth [Tue, 30 Jul 2019 10:33:20 +0000 (10:33 +0000)]
[CMake] Define _FILE_OFFSET_BITS=64 on Solaris
This is the compantion patch to https://reviews.llvm.org/D64482, needed to ensure
that builds with host compilers that don't yet predefine _FILE_OFFSET_BITS=64 on
Solaris succeed by always making the host and freshly built clang consistent.
Tested on x86_64-pc-solaris2.11.
Differential Revision: https://reviews.llvm.org/D64483
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367304
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Tue, 30 Jul 2019 08:14:28 +0000 (08:14 +0000)]
[ARM][LowOverheadLoops] Enable by default
The code is now in a good enough state to pass the bunch of tests that
I have run (after fixing the bugs), so let's enable it by default.
Differential Revision: https://reviews.llvm.org/D65277
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367297
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Tue, 30 Jul 2019 08:08:44 +0000 (08:08 +0000)]
[ARM][LowOverheadLoops] Revert non-header LE target
Revert the hardware loop upon finding a LoopEnd that doesn't target
the loop header, instead of asserting a failure.
Differential Revision: https://reviews.llvm.org/D65268
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367296
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Tue, 30 Jul 2019 08:00:49 +0000 (08:00 +0000)]
[NFC][X86][AArch64] Revisit test coverage for X s% C == 0 fold - add tests for negative divisors, INT_MIN divisors
As discussed in the review, that fold is only valid for positive
divisors, so while we can negate negative divisors,
we have to special-case INT_MIN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367294
91177308-0d34-0410-b5e6-
96231b3b80d8
Cullen Rhodes [Tue, 30 Jul 2019 07:47:48 +0000 (07:47 +0000)]
[AArch64][AsmParser] Remove SVE and SVE2 from ARMTargetParser
Summary:
Patch removes SVE and SVE2 features from ARMTargetParser as these
features are not supported on ARM.
Reviewed By: rengolin
Differential Revision: https://reviews.llvm.org/D65385
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367292
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Tue, 30 Jul 2019 07:44:58 +0000 (07:44 +0000)]
Revert "[DivRemPairs] Handling for expanded-form rem - recomposition (PR42673)"
test-suite/MultiSource/Benchmarks/DOE-ProxyApps-C/miniGMG broke:
Only PHI nodes may reference their own value!
%sub33 = srem i32 %sub33, %ranks_in_i
This reverts commit r367288.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367289
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Tue, 30 Jul 2019 07:10:00 +0000 (07:10 +0000)]
[DivRemPairs] Handling for expanded-form rem - recomposition (PR42673)
Summary:
While `-div-rem-pairs` pass can decompose rem in div+rem pair when div-rem pair
is unsupported by target, nothing performs the opposite fold.
We can't do that in InstCombine or DAGCombine since neither of those has access to TTI.
So it makes most sense to teach `-div-rem-pairs` about it.
If we matched rem in expanded form, we know we will be able to place div-rem pair
next to each other so we won't regress the situation.
Also, we shouldn't decompose rem if we matched already-decomposed form.
This is surprisingly straight-forward otherwise.
https://bugs.llvm.org/show_bug.cgi?id=42673
Reviewers: spatel, RKSimon, efriedma, ZaMaZaN4iK, bogner
Reviewed By: bogner
Subscribers: bogner, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65298
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367288
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Tue, 30 Jul 2019 07:09:41 +0000 (07:09 +0000)]
[APInt] Introduce clearLowBits()
Summary: Equivalent to `x & -2^K`.
Reviewers: RKSimon, craig.topper
Reviewed By: RKSimon, craig.topper
Subscribers: dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65369
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367287
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Pozulp [Tue, 30 Jul 2019 07:05:27 +0000 (07:05 +0000)]
Revert "[llvm-objdump] Add warning messages if disassembly + source for problematic inputs"
This reverts r367284 (git commit
b1cbe51bdf44098c74f5c74b7bcd8c041a7c6772).
My changes to LLVMSymbolizer caused a test to fail:
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/29488
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367286
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Pozulp [Tue, 30 Jul 2019 05:28:26 +0000 (05:28 +0000)]
[llvm-objdump] Add warning messages if disassembly + source for problematic inputs
Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905
Reviewers: jhenderson, rupprecht, grimar
Reviewed By: jhenderson, grimar
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62462
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367284
91177308-0d34-0410-b5e6-
96231b3b80d8
Zi Xuan Wu [Tue, 30 Jul 2019 05:22:03 +0000 (05:22 +0000)]
[NFC][PowerPC] Add test case for D65063
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367283
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Tue, 30 Jul 2019 04:03:33 +0000 (04:03 +0000)]
[NFC] use C++11 in AlignOf.h, remove AlignedCharArray
I removed all uses of AlignedCharArray since the minimum MSVC version can handle
alignas on char arrays correctly. We can therefore remove AlignedCharArray.
This patch also updates AlignedCharArrayUnion to use C++11.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367282
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 30 Jul 2019 00:27:33 +0000 (00:27 +0000)]
[FileCollector] test: disable the directory entry collection checks on windows
Looks like one of the entries isn't found on windows. I'm investigating why.
In the meantime, I'll disable this part of the test on windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367280
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Mon, 29 Jul 2019 23:38:30 +0000 (23:38 +0000)]
[FileCollector] Add a VFS that records FS accesses using the FileCollector
This patch adds a VFS that can be overlaid on top of another VFS
to record file system accesses using the FileCollector.
This can help to gather files that are needed for reproducers.
Differential Revision: https://reviews.llvm.org/D65411
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367278
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Mon, 29 Jul 2019 23:37:48 +0000 (23:37 +0000)]
[NFC] avoid AlignedCharArray in LLVM
As discussed in D65249, don't use AlignedCharArray or std::aligned_storage. Just use alignas(X) char Buf[Size];. This will allow me to remove AlignedCharArray entirely, and works on the current minimum version of Visual Studio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367277
91177308-0d34-0410-b5e6-
96231b3b80d8
Anusha Basana [Mon, 29 Jul 2019 22:27:27 +0000 (22:27 +0000)]
[llvm-lipo] Fix test on Windows
Error message outputs with lowercase on Windows.
Made test work on Widnows.
For example:
llvm-lipo: error: 'i386': no such file or directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367266
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Fiselier [Mon, 29 Jul 2019 21:38:56 +0000 (21:38 +0000)]
[clang-tidy]: Google: new check 'google-upgrade-googletest-case'
Introduce a new check to upgrade user code based on API changes in Googletest.
The check finds uses of old Googletest APIs with "case" in their name and replaces them with the new APIs named with "suite".
Patch by Alex Strelnikov (strel@google.com)
Reviewed as D62977.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367263
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Mon, 29 Jul 2019 21:01:11 +0000 (21:01 +0000)]
git-llvm: Restore compatibility with git 1.8.3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367259
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 29 Jul 2019 20:24:20 +0000 (20:24 +0000)]
[IR] Consolidate fixed metadata kind definitions (NFC)
Put the list of fixed metadata kinds in one place.
Testing: check-llvm with+without LLVM_ENABLE_MODULES=On
Differential Revision: https://reviews.llvm.org/D64437
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367257
91177308-0d34-0410-b5e6-
96231b3b80d8
Jinsong Ji [Mon, 29 Jul 2019 19:27:54 +0000 (19:27 +0000)]
[PowerPC][NFC]Fix a typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367252
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 29 Jul 2019 19:22:51 +0000 (19:22 +0000)]
[X86] Fix typo in comment. We're looking at a right shift not a left shift. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367251
91177308-0d34-0410-b5e6-
96231b3b80d8
Anusha Basana [Mon, 29 Jul 2019 18:46:34 +0000 (18:46 +0000)]
[llvm-lipo] Implement -replace
Replaces specified architecture in universal binary input file with
slice from the file_name argument passed into the replace command.
Differential Revision: https://reviews.llvm.org/D65247
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367248
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Mon, 29 Jul 2019 17:48:02 +0000 (17:48 +0000)]
gn build: Merge r367071
llvm-svn: 366289
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367245
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bolvansky [Mon, 29 Jul 2019 17:41:00 +0000 (17:41 +0000)]
[UpdateTestChecks] Emit warning when invalid value for -check-prefix(es) option
Summary:
The script is silent for the following issue:
FileCheck %s -check-prefix=CHECK,POPCOUNT
FileCheck will catch it later, but I think we can warn here too.
Now it warns:
./update_llc_test_checks.py file.ll
WARNING: Supplied prefix 'CHECK,POPCOUNT' is invalid. Prefix must contain only alphanumeric characters, hyphens and underscores. Did you mean --check-prefixes=CHECK,POPCOUNT?
Reviewers: lebedev.ri, spatel, RKSimon, craig.topper, nikic, gbedwell
Reviewed By: RKSimon
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64589
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367244
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Mon, 29 Jul 2019 17:40:34 +0000 (17:40 +0000)]
[Remarks] Update error message format string
All the clang-cmake-armv{7,8} bots are failing this test. This is an
attempt to fix this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367243
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Mon, 29 Jul 2019 17:22:40 +0000 (17:22 +0000)]
ThinLTOBitcodeWriter: Include globals associated with type metadata globals in the merged module.
Globals that are associated with globals with type metadata need to appear
in the merged module because they will reference the global's section directly.
Differential Revision: https://reviews.llvm.org/D65312
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367242
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 29 Jul 2019 17:17:58 +0000 (17:17 +0000)]
[X86] resolveTargetShuffleInputs - add depth to limit recursion.
Avoids slow downs from calls to ComputeNumSignBits/computeKnownBits going too deep.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367240
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 29 Jul 2019 16:40:58 +0000 (16:40 +0000)]
AMDGPU/LoadStoreOptimizer: combine MMOs when merging instructions
Summary:
The LoadStoreOptimizer was creating instructions with 2
MachineMemOperands, which meant they were assumed to alias with all other instructions,
because MachineInstr:mayAlias() returns true when an instruction has multiple
MachineMemOperands.
This was preventing these instructions from being merged again, and was
giving the scheduler less freedom to reorder them.
Reviewers: arsenm, nhaehnle
Reviewed By: arsenm
Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65036
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367237
91177308-0d34-0410-b5e6-
96231b3b80d8
Sergey Dmitriev [Mon, 29 Jul 2019 16:22:40 +0000 (16:22 +0000)]
[llvm-objcopy] Improve --add-section argument string parsing
Differential Revision: https://reviews.llvm.org/D65346
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367236
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Mon, 29 Jul 2019 16:17:13 +0000 (16:17 +0000)]
[AMDGPU] Fix typo in error message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367235
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Mon, 29 Jul 2019 16:09:56 +0000 (16:09 +0000)]
[NFC][FPEnv] Pre-commit tests for canonicalize negated operand of fdiv.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367233
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 29 Jul 2019 15:57:06 +0000 (15:57 +0000)]
[X86] combineX86ShufflesRecursively - start recursion at depth = 0. NFCI.
As discussed on rL367171, we have a problem where the depth recursion used in combineX86ShufflesRecursively was subtly different to computeKnownBits etc. - it starts at Depth=1 instead of Depth=0 like the others and has a different maximum recursion depth.
This NFC patch fixes the recursion depth to start at 0, so we can more easily reuse depth values in calls from combineX86ShufflesRecursively and its helper functions in computeKnownBits etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367232
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Mon, 29 Jul 2019 15:52:13 +0000 (15:52 +0000)]
[RISCV] Fix uninitialized variable after call to evaluateConstantImm
For llvm/test/MC/RISCV/rv64i-aliases-invalid.s, UBSan reports:
lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:371:9: runtime error:
load of value
3879186881, which is not a valid value for type
'RISCVMCExpr::VariantKind'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:371:9 in
It turns out that evaluateConstantImm does not set `VK` and it remains
unitialized when doing comparisons in `isImmXLenLI()`.
Differential Revision: https://reviews.llvm.org/D65347
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367230
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 29 Jul 2019 13:50:25 +0000 (13:50 +0000)]
[InstCombine] fold fadd+fneg with fdiv/fmul betweena
The backend already does this via isNegatibleForFree(),
but we may want to alter the fneg IR canonicalizations
that currently exist, so we need to try harder to fold
fneg in IR to avoid regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367227
91177308-0d34-0410-b5e6-
96231b3b80d8
Hideto Ueno [Mon, 29 Jul 2019 13:35:34 +0000 (13:35 +0000)]
[ValueTracking] Remove volatile check in isGuaranteedToTransferExecutionToSuccessor
Summary: As clarified in D53184, volatile load and store do not trap. Therefore, we should remove volatile checks for instructions in `isGuaranteedToTransferExecutionToSuccessor`.
Reviewers: jdoerfert, efriedma, nikic
Reviewed By: nikic
Subscribers: hiraditya, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65375
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367226
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 29 Jul 2019 13:20:46 +0000 (13:20 +0000)]
[InstCombine] reduce code for fadd with fneg operand; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367224
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 29 Jul 2019 12:49:36 +0000 (12:49 +0000)]
[InstCombine] add tests for fadd with negated operand; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367222
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Mon, 29 Jul 2019 11:48:17 +0000 (11:48 +0000)]
[AMDGPU] Add amdgpu_kernel for consistency with other tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367221
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 29 Jul 2019 11:34:45 +0000 (11:34 +0000)]
[DAGCombine] narrowInsertExtractVectorBinOp - early out for binops that change value type. NFCI.
This is implicit in the value type checks in getSubVectorSrc - this just makes it upfront and obvious.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367220
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Mon, 29 Jul 2019 10:22:09 +0000 (10:22 +0000)]
[DivergenceAnalysis] Add methods for querying divergence at use
Summary:
The existing isDivergent(Value) methods query whether a value is
divergent at its definition. However even if a value is uniform at its
definition, a use of it in another basic block can be divergent because
of divergent control flow between the def and the use.
This patch adds new isDivergent(Use) methods to DivergenceAnalysis,
LegacyDivergenceAnalysis and GPUDivergenceAnalysis.
This might allow D63953 or other similar workarounds to be removed.
Reviewers: alex-t, nhaehnle, arsenm, rtaylor, rampitec, simoll, jingyue
Reviewed By: nhaehnle
Subscribers: jfb, jvesely, wdng, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65141
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367218
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 29 Jul 2019 09:49:23 +0000 (09:49 +0000)]
[SystemZ] Regenerate <8 x i31> store test
To help show the diffs from an upcoming SimplifyDemandedBits patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367216
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 29 Jul 2019 09:49:04 +0000 (09:49 +0000)]
Mark test/MC/RISCV/rv{32,64}i-aliases-invalid.s unsupported also on Windows
Because they fail there too.
FAIL: LLVM :: MC/RISCV/rv32i-aliases-invalid.s (24397 of 32659)
******************** TEST 'LLVM :: MC/RISCV/rv32i-aliases-invalid.s' FAILED ********************
Script:
--
: 'RUN: at line 2'; not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s -triple=riscv32 -riscv-no-aliases 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s
: 'RUN: at line 3'; not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s -triple=riscv32 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s
--
Exit Code: 1
Command Output (stdout):
--
$ ":" "RUN: at line 2"
$ "not" "c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s" "-triple=riscv32" "-riscv-no-aliases"
$ "c:\src\llvm.monorepo\build.release2\bin\filecheck.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s"
C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s:10:21: error: CHECK: expected string not found in input
li t4, foo # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-
2147483648,
4294967295]
^
<stdin>:5:1: note: scanning from here
li x0, -
2147483649 # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-
2147483648,
4294967295]
^
<stdin>:5:1: note: with "@LINE" equal to "10"
li x0, -
2147483649 # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-
2147483648,
4294967295]
^
<stdin>:5:38: note: possible intended match here
li x0, -
2147483649 # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-
2147483648,
4294967295]
^
error: command failed with exit status: 1
--
--
********************
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70
FAIL: LLVM :: MC/RISCV/rv64i-aliases-invalid.s (24416 of 32659)
******************** TEST 'LLVM :: MC/RISCV/rv64i-aliases-invalid.s' FAILED ********************
Script:
--
: 'RUN: at line 2'; not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s -triple=riscv64 -riscv-no-aliases 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s
: 'RUN: at line 3'; not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s -triple=riscv64 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s
--
Exit Code: 1
Command Output (stdout):
--
$ ":" "RUN: at line 2"
$ "not" "c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s" "-triple=riscv64" "-riscv-no-aliases"
$ "c:\src\llvm.monorepo\build.release2\bin\filecheck.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s"
C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s:6:21: error: CHECK: expected string not found in input
li t4, foo # CHECK: :[[@LINE]]:8: error: operand must be a constant 64-bit integer
^
<stdin>:2:1: note: scanning from here
li t5, 0x10000000000000000 # CHECK: :[[@LINE]]:8: error: unknown operand
^
<stdin>:2:1: note: with "@LINE" equal to "6"
li t5, 0x10000000000000000 # CHECK: :[[@LINE]]:8: error: unknown operand
^
<stdin>:13:67: note: possible intended match here
C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s:12:13: error: immediate must be an integer in the range [0, 63]
^
error: command failed with exit status: 1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367215
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 29 Jul 2019 09:48:07 +0000 (09:48 +0000)]
[ARM] Regenerate rotation tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367214
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 29 Jul 2019 09:47:07 +0000 (09:47 +0000)]
[AMDGPU] Regenerate v2i16 insertelement tests.
To help show the diffs from an upcoming SimplifyDemandedBits patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367213
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Mon, 29 Jul 2019 08:41:51 +0000 (08:41 +0000)]
[NFC][ARM[ParallelDSP] Cleanup of BinOpChain
- Remove some unused typedefs.
- Rename BinOpChain struct to MulCandidate.
- Remove the size method of MulCandidate.
- Store only the first input of the ValueList provided to
MulCandidate, as it's the only value we care about. This means we
don't have to perform any ugly (and unnecessary) iterations of the
list later on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367208
91177308-0d34-0410-b5e6-
96231b3b80d8
David Stuttard [Mon, 29 Jul 2019 08:15:10 +0000 (08:15 +0000)]
[AMDGPU] Enable v4f16 and above for v_pk_fma instructions
Summary:
If isel is presented with <2 x half> vectors then it will correctly select
v_pk_fma style instructions.
If isel is presented with e.g. <4 x half> vectors it will scalarize, unlike for
other instruction types (such as fadd, fmul etc.)
Added extra support to enable this. Updated one of the tests to include a test
for this (as well as extending the test to GFX9)
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65325
Change-Id: I50a4577a3f8223fb53992af3b7d26121f65b71ee
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367206
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Mon, 29 Jul 2019 08:12:24 +0000 (08:12 +0000)]
[NFC][ARM][ParallelDSP] Remove AreSymmetrical
We explicitly search for a parallel mac and we only care about its
inputs, checking for symmetry doesn't add anything here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367205
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Mon, 29 Jul 2019 08:07:23 +0000 (08:07 +0000)]
[NFC][ARM][ParallelDSP] Remove PopulateLoads
We no longer have to check what loads are used, all this
is performed at the start of the transform, so it's not
doing anything now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367204
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Mon, 29 Jul 2019 07:58:29 +0000 (07:58 +0000)]
[obj2yaml] - Report a error when unable to resolve a sh_link reference properly.
Because of a bug we did not report a error in the case
shown in the test. With this patch we do.
Differential revision: https://reviews.llvm.org/D65214
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367203
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Mon, 29 Jul 2019 07:55:39 +0000 (07:55 +0000)]
[llvm-objcopy] - Reimplement strip-dwo-groups.test to stop using the precompiled object.
When llvm-copy removes .dwo sections the index of symbol table,
the indices of the symbols and the indices of the sections which go
after the removed ones changes. That affects on SHT_GROUP sections,
which needs to be updated.
Initially this test used a precompiled object, I rewrote it to use YAML
and improved a bit.
Differential revision: https://reviews.llvm.org/D65273
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367202
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 29 Jul 2019 01:36:58 +0000 (01:36 +0000)]
[X86] Don't use PMADDWD for vector add reductions of multiplies if the mul inputs have an additional user.
The pmaddwd inserts a truncate, if that truncate would end up
creating additional instructions instead of making a zext
narrower, then we shouldn't do it.
I've restricted this to only sse4.1 targets since on prior
targets the zext will be done in stages. So the truncate will
probably not create additional instructions. Might need some
more investigation of mul shrinking and the other pmaddwd
transform to be sure this is the right decision.
There might be a slight regression on AVX1 targets due to add
splitting. Hard to say for sure. Maybe we need to look into
using the vector reduction flag to use 2 narrow loads and a
blend instead of extracting and inserting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367198
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 29 Jul 2019 01:36:54 +0000 (01:36 +0000)]
[X86] Add test cases to show missing one use check in combineLoopMAddPattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367197
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Sun, 28 Jul 2019 21:31:58 +0000 (21:31 +0000)]
[NFC][InstCombine] Revisit tests in shift-amount-reassociation-with-truncation-shl.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367196
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 28 Jul 2019 18:45:42 +0000 (18:45 +0000)]
[X86] In combineLoopMAddPattern and combineLoopSADPattern, preserve the vector reduction flag on the final add. Handle unrolled loops by letting DAG combine revisit.
This reverts r340478 and r340631 and replaces them with a simpler
method of just letting DAG combine revisit the nodes to handle
the other operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367195
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 28 Jul 2019 17:10:06 +0000 (17:10 +0000)]
[InstCombine] fold fsub+fneg with fdiv/fmul between
The backend already does this via isNegatibleForFree(),
but we may want to alter the fneg IR canonicalizations
that currently exist, so we need to try harder to fold
fneg in IR to avoid regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367194
91177308-0d34-0410-b5e6-
96231b3b80d8
David Green [Sun, 28 Jul 2019 14:07:48 +0000 (14:07 +0000)]
[ARM] MVE VPNOT
This adds the patterns required to transform xor P0, -1 to a VPNOT. The
instruction operands have to change a little for this, adding an in and an out
VCCR reg and using a custom DecodeMVEVPNOT for the decode.
Differential Revision: https://reviews.llvm.org/D65133
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367192
91177308-0d34-0410-b5e6-
96231b3b80d8
David Green [Sun, 28 Jul 2019 13:53:39 +0000 (13:53 +0000)]
[ARM] Better patterns for fp <> predicate vectors
These are some better patterns for converting between predicates and floating
points. Much like the extends, we select "1"/"-1" or "0" depending on the
predicate value. Or we perform a compare against 0 to convert to a predicate.
Differential Revision: https://reviews.llvm.org/D65103
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367191
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Sun, 28 Jul 2019 13:13:46 +0000 (13:13 +0000)]
[NFC][InstCombine] Shift amount reassociation: can have trunc between shl's
https://rise4fun.com/Alive/OQbM
Not so simple for lshr/ashr, so those maybe later.
https://bugs.llvm.org/show_bug.cgi?id=42391
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367189
91177308-0d34-0410-b5e6-
96231b3b80d8
Hideto Ueno [Sun, 28 Jul 2019 07:04:01 +0000 (07:04 +0000)]
[Attributor] Deduce "align" attribute
Summary:
Deduce "align" attribute in attributor.
Reviewers: jdoerfert, sstefan1
Reviewed By: jdoerfert
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64152
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367187
91177308-0d34-0410-b5e6-
96231b3b80d8
Hideto Ueno [Sun, 28 Jul 2019 06:17:46 +0000 (06:17 +0000)]
[IR] Fix getPointerAlignment for CallBase
Summary:
In current getPointerAlignemnt implementation, CallBase.getPointerAlignement(..) checks only parameter attriutes in the callsite. For example,
```
declare align 8 i8* @foo()
define void @bar() {
%a = tail call align 8 i8* @foo() ; getPointerAlignment returns 8
%b = tail call i8* @foo() ; getPointerAlignemnt returns 0
ret void
}
```
This patch will fix the problem.
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65281
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367185
91177308-0d34-0410-b5e6-
96231b3b80d8
Hideto Ueno [Sun, 28 Jul 2019 06:09:56 +0000 (06:09 +0000)]
[FunctionAttrs] Annotate "willreturn" for intrinsics
Summary:
In D62801, new function attribute `willreturn` was introduced. In short, a function with `willreturn` is guaranteed to come back to the call site(more precise definition is in LangRef).
In this patch, willreturn is annotated for LLVM intrinsics.
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: jvesely, nhaehnle, sstefan1, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64904
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367184
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 27 Jul 2019 19:42:58 +0000 (19:42 +0000)]
[DAGCombine] narrowInsertExtractVectorBinOp - early out for illegal op. NFCI.
If the subvector binop is illegal then early-out and avoid the subvector searches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367181
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Sat, 27 Jul 2019 18:57:59 +0000 (18:57 +0000)]
Stricter check for the memory access.
The current pattern would trigger for scheduling changes of the
post-load computation, since those are commutable with the inline asm.
Avoid this by explicitly check the order of load vs asm block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367180
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 27 Jul 2019 18:44:15 +0000 (18:44 +0000)]
Regenerate UXTB tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367179
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 27 Jul 2019 14:32:23 +0000 (14:32 +0000)]
[AMDGPU] Regenerate tests.
To help show the diffs from an upcoming SimplifyDemandedBits patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367175
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 27 Jul 2019 14:11:59 +0000 (14:11 +0000)]
[TargetLowering] SimplifyMultipleUseDemandedBits - add BITCAST pass through support (Reapplied)
This allows us to peek through BITCASTs, attempt to simplify the source operand, and then bitcast back.
This reapplies rL367091 which was reverted at rL367118 - we were inconsistently peeking through the bitcasts to the source value.
Fixes PR42777
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367174
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 27 Jul 2019 14:05:51 +0000 (14:05 +0000)]
[InstSimplify] remove quadratic time looping (PR42771)
The test case from:
https://bugs.llvm.org/show_bug.cgi?id=42771
...shows a ~30x slowdown caused by the awkward loop iteration (rL207302) that is
seemingly done just to avoid invalidating the instruction iterator. We can instead
delay instruction deletion until we reach the end of the block (or we could delay
until we reach the end of all blocks).
There's a test diff here for a degenerate case with llvm.assume that is not
meaningful in itself, but serves to verify this change in logic.
This change probably doesn't result in much overall compile-time improvement
because we call '-instsimplify' as a standalone pass only once in the standard
-O2 opt pipeline currently.
Differential Revision: https://reviews.llvm.org/D65336
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367173
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 27 Jul 2019 13:30:29 +0000 (13:30 +0000)]
[X86][SSE] Replace PMULDQ GetDemandedBits combine with SimplifyMultipleUseDemandedBits handler (Reapplied)
Recommit rL367100 which was reverted at rL367141. Until PR42777 is fixed, we no longer get the benefits of peeking through bitcasts but it does still remove a GetDemandedBits user and gives us the equivalent combines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367172
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 27 Jul 2019 12:48:46 +0000 (12:48 +0000)]
[SelectionDAG] Check for any recursion depth greater than or equal to limit instead of just equal the limit.
If anything called the recursive isKnownNeverNaN/computeKnownBits/ComputeNumSignBits/SimplifyDemandedBits/SimplifyMultipleUseDemandedBits with an incorrect depth then we could continue to recurse if we'd already exceeded the depth limit.
This replaces the limit check (Depth == 6) with a (Depth >= 6) to make sure that we don't circumvent it.
This causes a couple of regressions as a mixture of calls (SimplifyMultipleUseDemandedBits + combineX86ShufflesRecursively) were calling with depths that were already over the limit. I've fixed SimplifyMultipleUseDemandedBits to not do this. combineX86ShufflesRecursively is trickier as we get a lot of regressions if we reduce its own limit from 8 to 6 (it also starts at Depth == 1 instead of Depth == 0 like the others....) - I'll see what I can do in future patches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367171
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 27 Jul 2019 12:23:36 +0000 (12:23 +0000)]
[TargetLowering] Add depth limit to SimplifyMultipleUseDemandedBits
We're getting reports of massive compile time increases because SimplifyMultipleUseDemandedBits was losing track of the depth and not earlying-out. No repro yet, but consider this a pre-emptive commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367169
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Sat, 27 Jul 2019 08:13:27 +0000 (08:13 +0000)]
[mips] Add (dis)assembler tests for beqzl and bnezl instructions. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367168
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Fri, 26 Jul 2019 23:46:38 +0000 (23:46 +0000)]
[AArch64][GlobalISel] Implement narrowing of G_SEXT.
We need this to narrow a sext to s128.
Differential Revision: https://reviews.llvm.org/D65357
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367164
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Fri, 26 Jul 2019 23:28:53 +0000 (23:28 +0000)]
[AArch64][GlobalISel] Select @llvm.aarch64.stlxr for 32-bit pointers
Add partial instruction selection for intrinsics like this:
```
declare i32 @llvm.aarch64.stlxr(i64, i32*)
```
(This only handles the case where a G_ZEXT is feeding the intrinsic.)
Also make sure that the added store instruction actually has the memory op from
the original G_STORE.
Update select-stlxr-intrin.mir and arm64-ldxr-stxr.ll.
Differential Revision: https://reviews.llvm.org/D65355
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367163
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Fri, 26 Jul 2019 22:42:54 +0000 (22:42 +0000)]
[Remarks] Silence Wreturn-type warning
Shows up here: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/27771/steps/annotate/logs/stdio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367162
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Fri, 26 Jul 2019 22:36:20 +0000 (22:36 +0000)]
[Remarks] Update unit test to use StringRef::lower
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367161
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Fri, 26 Jul 2019 22:14:08 +0000 (22:14 +0000)]
Revert [IPSCCP] Add assertion to surface cases where we zap returns with overdefined users.
This reverts r366998 (git commit
5354c83ece00690b4dbfa47925f8f5a8f33f1d9e)
This breaks a linux kernel build and we have reproducer to investigate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367160
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 26 Jul 2019 22:10:44 +0000 (22:10 +0000)]
Fix remarks unit test on Windows
"no such file or directory" vs "No such file or directory"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367159
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 26 Jul 2019 21:12:22 +0000 (21:12 +0000)]
[InstCombine] add tests for fsub with negated operand; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367156
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Fri, 26 Jul 2019 21:02:02 +0000 (21:02 +0000)]
Reland: [Remarks] Support parsing remark metadata in the YAML remark parser
This adds support to the yaml remark parser to be able to parse remarks
directly from the metadata.
This supports parsing separate metadata and following the external file
with the associated metadata, and also a standalone file containing
metadata + remarks all together.
Original llvm-svn: 367148
Revert llvm-svn: 367151
This has a fix for gcc builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367155
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Mi [Fri, 26 Jul 2019 20:59:22 +0000 (20:59 +0000)]
[JumpThreading] Stop searching predecessor when the current bb is in a
unreachable loop.
updatePredecessorProfileMetadata in jumpthreading tries to find the
first dominating predecessor block for a PHI value by searching upwards
the predecessor block chain.
But jumpthreading may see some temporary IR state which contains
unreachable bb not being cleaned up. If an unreachable loop happens to
be on the predecessor block chain, keeping chasing the predecessor
block will run into an infinite loop.
The patch fixes it.
Differential Revision: https://reviews.llvm.org/D65310
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367154
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Fri, 26 Jul 2019 20:54:44 +0000 (20:54 +0000)]
Revert "[Remarks] Support parsing remark metadata in the YAML remark parser"
This reverts r367148.
Seems to fail on
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/27768.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367151
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Fri, 26 Jul 2019 20:11:53 +0000 (20:11 +0000)]
[Remarks] Support parsing remark metadata in the YAML remark parser
This adds support to the yaml remark parser to be able to parse remarks
directly from the metadata.
This supports parsing separate metadata and following the external file
with the associated metadata, and also a standalone file containing
metadata + remarks all together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367148
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 26 Jul 2019 19:56:59 +0000 (19:56 +0000)]
[InstCombine] canonicalize negated operand of fdiv
This is a transform that we use with fmul, so use
it for fdiv too for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367146
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 26 Jul 2019 19:44:53 +0000 (19:44 +0000)]
[InstCombine] add tests for fdiv with negated operand; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367145
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuanfang Chen [Fri, 26 Jul 2019 19:25:57 +0000 (19:25 +0000)]
[CMake] Allow LLVM_EXTERNAL_<proj>_SOURCE_DIR to be overridden if it is
empty.
This makes adding projects to LLVM_ENABLE_PROJECTS possible.
Also its type should be PATH.
https://bugs.llvm.org/show_bug.cgi?id=42698
Reviewers: beanz, greened, chapuni
Reviewed by: beanz
Differential Revision: https://reviews.llvm.org/D65045
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367144
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Fri, 26 Jul 2019 18:57:26 +0000 (18:57 +0000)]
[MemorySSA & LoopPassManager] Analysis can be preserved only when all loop passes preserve it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367143
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Haarman [Fri, 26 Jul 2019 18:44:06 +0000 (18:44 +0000)]
add 'a' to chmod in llvm-lipo executability tests
Summary:
When specifying symbolic permissions with + or -, if none of
a/u/g/o are specified, bits set in the umask are not affected.
This caused the llvm-lipo executability tests to fail on some
systems, e.g. having an umask of 027 would cause chmod -x to not
clear the executable bit for others. This change instead
uses chmod a-x, which clears all the executable bits regardless
of umask.
Reviewers: smeenai, hans, anushabasana
Reviewed By: smeenai
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65342
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367142
91177308-0d34-0410-b5e6-
96231b3b80d8
Vlad Tsyrklevich [Fri, 26 Jul 2019 18:14:21 +0000 (18:14 +0000)]
Revert "[X86][SSE] Replace PMULDQ GetDemandedBits combine with SimplifyMultipleUseDemandedBits handler."
This reverts r367100, it appears to be causing test failures after
Nico's revert of r367091.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367141
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Fertile [Fri, 26 Jul 2019 17:25:27 +0000 (17:25 +0000)]
[PowerPC][AIX]Add lowering of MCSymbol MachineOperand.
Adds machine operand lowering for MCSymbolSDNodes to the PowerPC
backend. This is needed to produce call instructions in assembly for AIX
because the callee operand is a MCSymbolSDNode. The test is XFAIL'ed for
asserts due to a (valid) assertion in PEI that the AIX ABI isn't supported yet.
Differential Revision: https://reviews.llvm.org/D63738
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367133
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 26 Jul 2019 17:13:59 +0000 (17:13 +0000)]
[AMDGPU] Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367131
91177308-0d34-0410-b5e6-
96231b3b80d8