Commit Graph

151901 Commits

Author SHA1 Message Date
Florian Hahn
e66c9a57ab [ARM] Fix typo in test added in r307889
This fixes the following test failure:
    LLVM :: Transforms/Inline/ARM/inline-target-attr.ll

Sorry for any inconenience.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307892 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 08:53:43 +00:00
Dylan McKay
56b430ad15 [AVR] Fix broken indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307891 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 08:40:59 +00:00
Dylan McKay
266135fc7a [AVR] Add a 'LLVM_FALLTHROUGH' statement to the AsmParser
Should fix warnings in the build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307890 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 08:39:46 +00:00
Florian Hahn
68f374b8d3 [ARM] Inline callee if its target-features are a subset of the caller
Summary:
Similar to X86, it should be safe to inline callees if their
target-features are a subset of the caller. As some subtarget features
provide different instructions depending on whether they are set or
unset (e.g. ThumbMode and ModeSoftFloat), we use a whitelist of
target-features describing hardware capabilities only.

Reviewers: kristof.beyls, rengolin, t.p.northover, SjoerdMeijer, peter.smith, silviu.baranga, efriedma

Reviewed By: SjoerdMeijer, efriedma

Subscribers: dschuff, efriedma, aemerson, sdardis, javed.absar, arichardson, eraman, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307889 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 08:26:17 +00:00
Dylan McKay
90904c693c [AVR] Fix indirect calls to function pointers
Patch by Carl Peto.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307888 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 08:09:36 +00:00
Mikael Holmen
3e55e45537 Add original reproducer for r307754 / PR33689
Apparently I managed to drop the test case between two revisions in
Phabricator: https://reviews.llvm.org/D35003

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307887 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 07:38:53 +00:00
Hiroshi Inoue
ff281e5fb6 fix typos in comments and error messges; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307885 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 06:48:39 +00:00
Craig Topper
719506a866 [X86] Simplify the getHostCPUName for AMD family 6 and 15.
As far as I can tell we can simply distinguish based on features rather than model number. Many of the strings we were previously using are treated the same by the backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307884 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 06:34:10 +00:00
Martin Storsjo
8ca723ae60 [llvm-objdump] Correctly distinguish between the MachO upper/lower16 relocations
All other code in MachODump.cpp uses the same comparison,
((r_length & 0x1) == 1), for distinguishing between the two,
while the code in llvm-objdump.cpp seemed to be incorrect.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307882 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 05:54:08 +00:00
Davide Italiano
54df34c168 [opt-viewer] Don't except when debug info is not available.
For records without DebugLoc we simply skip the caller location in
map_remarks.

Fixes PR33764.

Patch by Simon Whittaker!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307880 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 04:19:13 +00:00
Geoff Berry
cc6cfc778f [TargetLowering] Add hook for adding target MMO flags when doing ISel.
Summary: Add TargetLowering hook getMMOFlags() to add target specific
MMO flags to load/store instructions created by ISel.

Reviewers: bogner, hfinkel, qcolombet, MatzeB

Subscribers: mcrosier, javed.absar, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307879 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 03:49:42 +00:00
Geoff Berry
9bf66c730c [MIR] Add support for printing and parsing target MMO flags
Summary: Add target hooks for printing and parsing target MMO flags.
Targets may override getSerializableMachineMemOperandTargetFlags() to
return a mapping from string to flag value for target MMO values that
should be serialized/parsed in MIR output.

Add implementation of this hook for AArch64 SuppressPair MMO flag.

Reviewers: bogner, hfinkel, qcolombet, MatzeB

Subscribers: mcrosier, javed.absar, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307877 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 02:28:54 +00:00
Kostya Serebryany
a204f09272 [libFuzzer] make sure that -reduce_inputs=1 deletes redundant files in the corpus
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307875 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 01:56:37 +00:00
Davide Italiano
3e4436b316 [sanstats] Remove a flaky test.
I don't know a reliable way of crafting a test for this case,
but I'll try a little harder. In the meanwhile, let's get the
bots green again. Please note this will be tested by `check-cfi`
once r307215 relands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307874 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 01:36:12 +00:00
Kostya Serebryany
bb9605f1d6 [libFuzzer] experimental feature -reduce_inputs (off by default) that tries to replace elements in the corpus with smaller ones that have the same feature set. Still needs tuning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307873 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 01:08:53 +00:00
Wolfgang Pieb
95621c2165 [DWARF] Fixing a bug with processing of DWARF v5 indexed strings in Mach-O objects.
Code to convert MachO - specific section debug section names to standard DWARF v5
section names was in the wrong place.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307872 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 01:03:28 +00:00
Davide Italiano
b0e9b49e0d [sanstats] Print the correct line information.
The instrumentation tracks the return address and not that of the
call so we remove one to compensate. Thanks for Peter Collingbourne
for confirming the analysis of the problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307871 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 00:49:03 +00:00
Eli Friedman
dd70def46c [CodeGenPrepare] Don't create dead instructions in addrmode sinking
When we fail to sink an instruction, we must make sure not to modify
the function; otherwise, we end up in an infinite loop because
CodeGenPrepare iterates until it doesn't make any changes.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307866 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 23:30:02 +00:00
Xinliang David Li
7bac219fe1 [PGO] Enhance pgo counter promotion
This is an incremental change to the promotion feature.

There are two problems with the current behavior:
1) loops with multiple exiting blocks are totally disabled
2) a counter update can only be promoted one level up in
  the loop nest -- which does help much for short trip
  count inner loops inside a high trip-count outer loops.

Due to this limitation, we still saw very large profile
count fluctuations from run to run for the affected loops
which are usually very hot.

This patch adds the support for promotion counters iteratively
across the loop nest. It also turns on the promotion for
loops with multiple exiting blocks (with a limit).

For single-threaded applications, the performance impact is flat
on average. For instance, dealII improves, but povray regresses.





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307863 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 23:27:44 +00:00
Kostya Serebryany
30f6cbbbb1 [libFuzzer] relax test/shrink.test a bit (got broken on windows)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307862 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 23:22:32 +00:00
Matt Arsenault
ffac88a158 AMDGPU: Fix converting unanalyzable global loads to SMRD
Not all memory dependence queries succeed, so this needs to
be conservative if it fails.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307861 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 23:06:18 +00:00
Gerolf Hoflehner
5dcc05955f [SjLj] Replace recursive block marking algorithm with iterative algorithm
Summary:
Some programs run into a stack overflow issue. This change avoids this
problem by replacing the recursive algorithm with the iterative version.

Reviewers: MatzeB, t.p.northover, dblaikie

Reviewed By: MatzeB

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307860 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 23:05:15 +00:00
Sanjay Patel
e7149b956e [x86] add select-of-constant tests; NFC
We're using cmov in these cases, but we could reduce to simpler ops.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307859 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 22:42:39 +00:00
Kostya Serebryany
73136ba7e5 [libFuzzer] remove include <sanitizer/coverage_interface.h>, not needed any more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307858 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 22:22:36 +00:00
Kostya Serebryany
8848feb6a9 [libFuzzer] refactoring in preparation for -reduce_inputs; NFC intended
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307857 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 22:20:04 +00:00
Daniel Neilson
a06b091075 Add element atomic memset intrinsic
Summary: Continuing the work from https://reviews.llvm.org/D33240, this change introduces an element unordered-atomic memset intrinsic. This intrinsic is essentially memset with the implementation requirement that all stores used for the assignment are done with unordered-atomic stores of a given element size.

Reviewers: eli.friedman, reames, mkazantsev, skatkov

Reviewed By: reames

Subscribers: jfb, dschuff, sbc100, jgravelle-google, aheejin, efriedma, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307854 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 21:57:23 +00:00
Rui Ueyama
86784318a6 [Solaris] Detect Solaris LD, use detection results to pass Solaris-ld options
Solaris ld is not the only linker available on Solaris.
Introducing linker detection and using LLVM_LINKER_IS_SOLARISLD to
select Solaris-ld specific handling.

Patch by: Fedor Sergeev

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307852 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 21:43:14 +00:00
Florian Hahn
13ba207632 [AArch64] Only run macro fusion for CPUs with any fusion support.
Reviewers: evandro, t.p.northover, javed.absar

Reviewed By: evandro

Subscribers: aemerson, rengolin, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307851 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 21:41:28 +00:00
Rui Ueyama
f4634bee7b Use --color-diagnostics instead of -color-diagnostics.
Solaris ld interprets -color-diagnostics as a -c option, so it is
better to use --color-diagnostics instead. lld accepts both.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307850 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 21:37:02 +00:00
Frederich Munch
9d9b7c829a Allow clients to specify search order of DynamicLibraries.
Summary: Different JITs and other clients of LLVM may have different needs in how symbol resolution should occur.

Reviewers: v.g.vassilev, lhames, karies

Reviewed By: v.g.vassilev

Subscribers: pcanal, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307849 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 21:22:45 +00:00
Stanislav Mekhanoshin
16be511cb4 [AMDGPU] fcanonicalize elimination optimization
We are using multiplication by 1.0 to flush denormals and quiet sNaNs.
That is possible to omit this multiplication if source of the
fcanonicalize instruction is known to be flushed/quieted, i.e.
if it comes from another instruction known to do the normalization
and we are using IEEE mode to quiet sNaNs.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307848 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 21:20:28 +00:00
Rafael Espindola
41cc19a3ac Don't expose a map in the DWARFContext interface.
Doing so is leaking an implementation detail.

I have an implementation that uses the lld infrastructure and doesn't
use a map or object::SectionRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307846 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 21:08:24 +00:00
Anna Thomas
c66d417e68 [LoopUnrollRuntime] NFC: Refactored safety checks of unrolling multi-exit loop
Refactored the code and separated out a function
`canSafelyUnrollMultiExitLoop` to reduce redundant checks and make it
easier to add profitability heuristics later.
Added tests to runtime unrolling to make sure that unrolling for
multi-exit loops is not done unless the option
-unroll-runtime-multi-exit is true.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307843 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 20:55:43 +00:00
Florian Hahn
6805a5db4b [AArch64] Add AArch64Subtarget::isFusion function.
Summary:
isFusion returns true if the subtarget supports any kind of instruction
fusion, similar to ARMSubtarget::isFusion. This was suggested in D34142.

This changes the current behavior slightly, because the macro fusion mutation 
is now added to the PostRA MachineScheduler in case the subtarget supports
any kind of fusion. I think that makes sense because if the PostRA 
MachineScheduler is run, there is potential that instructions scheduled back to 
back are re-scheduled.

Reviewers: evandro, t.p.northover, joelkevinjones, joel_k_jones, steleman

Reviewed By: joelkevinjones

Subscribers: joel_k_jones, aemerson, rengolin, javed.absar, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307842 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 20:53:22 +00:00
Heejin Ahn
3fbd441b82 [WebAssembly] Mark element atomic memcpy/memmove intrinsics as unsupported
Summary:
Element atomic intrinsicAtomic instructions are not yet supported in WebAssembly, so we mark them as     
unsupported for the moment.

Reviewers: sunfish, dschuff, sbc100

Reviewed By: dschuff, sbc100

Subscribers: jfb, sbc100, jgravelle-google

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307841 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 20:50:04 +00:00
Sam Clegg
fc19aecdbe Remove unneeded use of #undef DEBUG_TYPE. NFC
Where is is needed (at the end of headers that define it), be
consistent about its use.

Also fix a few header guards that I found in the process.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307840 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 20:49:21 +00:00
Michael Kuperstein
73d05a2a19 [LV] Don't allow outside uses of IVs if the SCEV is predicated on loop conditions.
This fixes PR33706.
Differential Revision: https://reviews.llvm.org/D35227


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307837 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 19:53:55 +00:00
Simon Dardis
1ece62aab5 [mips][mt][6/7] Add support for mftr, mttr instructions.
Unlike many other instructions, these instructions have aliases which
take coprocessor registers, gpr register, accumulator (and dsp accumulator)
registers, floating point registers, floating point control registers and
coprocessor 2 data and control operands.

For the moment, these aliases are treated as pseudo instructions which are
expanded into the underlying instruction. As a result, disassembling these
instructions shows the underlying instruction and not the alias.

Reviewers: slthakur, atanasyan

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307836 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 19:47:45 +00:00
Reid Kleckner
de79ef835a Fix non-Windows build after PDB native builtin type change
Some C++14 features slipped in along with an extra member qualification.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307835 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 19:46:35 +00:00
Adrian McCarthy
39bfdfaa94 [PDB] Enable NativeSession to create symbols for built-in types on demand
Summary:
There is a reserved range of type indexes for built-in types (like integers).
This will create a symbol for a built-in type if the caller askes for one by
type index.  This is also plumbing for being able to recall symbols by type
index in general, but user-defined types will come in subsequent patches.

Reviewers: rnk, zturner

Subscribers: mgorny, hiraditya, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307834 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 19:38:11 +00:00
Daniel Neilson
fa1648c501 Fix to web assembly lib call list
Summary:
 Revision 307796 caused an internal build break in WebAssembly bots in the form of a
crash.  ex:
Here's the crash dump from one of the failing tests:

/usr/local/google/home/blaikie/dev/llvm/build/default/./bin/llc < /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals | /usr/local/google/home/blaikie/dev/llvm/build/default/./bin/FileCheck /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll
--
Exit Code: 2

Command Output (stderr):
--
Stack dump:
0.      Program arguments: build/default/./bin/llc -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals
1.      Running pass 'Function Pass Manager' on module '<stdin>'.
2.      Running pass 'WebAssembly Assembly Printer' on function '@call_memcpy'
FileCheck error: '-' is empty.
FileCheck command line:  build/default/./bin/FileCheck src/test/CodeGen/WebAssembly/global.ll

The problem is in lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp. There’s an array declared:
545 static const char *
Fix to web assembly lib call list

Summary:
 Revision 307796 caused an internal build break in WebAssembly bots in the form of a
crash.  ex:
Here's the crash dump from one of the failing tests:

/usr/local/google/home/blaikie/dev/llvm/build/default/./bin/llc < /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals | /usr/local/google/home/blaikie/dev/llvm/build/default/./bin/FileCheck /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll
--
Exit Code: 2

Command Output (stderr):
--
Stack dump:
0.      Program arguments: build/default/./bin/llc -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals
1.      Running pass 'Function Pass Manager' on module '<stdin>'.
2.      Running pass 'WebAssembly Assembly Printer' on function '@call_memcpy'
FileCheck error: '-' is empty.
FileCheck command line:  build/default/./bin/FileCheck src/test/CodeGen/WebAssembly/global.ll

The problem is in lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp. There’s an array declared:
static const char *
RuntimeLibcallNames[RTLIB::UNKNOWN_LIBCALL] = {

 That is defining a runtime lib call name for each entry in the enum RTLIB:Libcall from include/llvm/CodeGen/RuntimeLibcalls.h.

Revision 307796 added entries to the enum, but didn’t add entries to the RuntimeLibcallNames array, which caused a crash when attempting
to access past the end of the array.

This patch fixes the issue by adding the element atomic memmove to the WebAssembly arrays.

Reviewed by: reames

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307831 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 19:24:07 +00:00
Jakub Kuderski
7c78172bce [LoopRotate] Fix DomTree update logic for unreachable nodes. Fix PR33701.
Summary:
LoopRotate manually updates the DoomTree by iterating over all predecessors of a basic block and computing the Nearest Common Dominator.

When a predecessor happens to be unreachable, `DT.findNearestCommonDominator` returns nullptr.

This patch teaches LoopRotate to handle this case and fixes [[ https://bugs.llvm.org/show_bug.cgi?id=33701 | PR33701 ]].

In the future, LoopRotate should be taught to use the new incremental API for updating the DomTree.

Reviewers: dberlin, davide, uabelho, grosser

Subscribers: efriedma, mzolotukhin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307828 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 18:42:16 +00:00
Reid Kleckner
4157affe62 Use std::mutex to avoid memory allocation after OOM
ManagedStatic<sys::Mutex> would lazilly allocate a sys::Mutex to lock
when reporting an OOM, which is a bad idea.

The three STL implementations that I know of use pthread_mutex_lock and
EnterCriticalSection to implement std::mutex. I'm pretty sure that
neither of those allocate heap memory.

It seems that we unconditionally use std::mutex without testing
LLVM_ENABLE_THREADS elsewhere in the codebase, so this should be
portable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307827 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 18:23:06 +00:00
George Karpenkov
a4790a341b [libFuzzer] Add a dependency on symbolizer from libFuzzer tests
Some libFuzzer tests on Linux would fail with bizarre error messages
unless llvm-symbolizer binary is present.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307826 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 18:17:34 +00:00
George Karpenkov
43e65bfc21 [libFuzzer] NFC Declare LIBFUZZER_FLAGS_BASE outside of an if-block
The current code relies on the assumption that tests are included only
if LLVM_USE_SANITIZE_COVERAGE is enabled.
This commit makes it easier to relax the assumption in the future, as
the variable LIBFUZZER_FLAGS_BASE is used further in libFuzzer tests.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307825 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 18:16:09 +00:00
George Karpenkov
053573f613 [libFuzzer] Do not use LLVM ostream in tests
Differential Revision: https://reviews.llvm.org/D35312

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307824 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 18:14:19 +00:00
Sanjay Patel
f4058b98ae [x86] improve SBB optimizations for SETB/SETA with subtract
This is another step towards removing a combine that turns sext
into select of constants and preparing the backend for an IR
future where select is the canonical form.

Earlier commits in this area:
https://reviews.llvm.org/rL306040
https://reviews.llvm.org/rL306072
https://reviews.llvm.org/rL307404 (https://reviews.llvm.org/D34652)
https://reviews.llvm.org/rL307471



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307821 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 17:56:46 +00:00
Sanjay Patel
8751bf94c8 [x86] add tests for improving sbb transforms; NFC
We're subtracting X from X the hard way...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307819 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 17:44:50 +00:00
Justin Bogner
356d2bfeba GlobalISel: Handle selection of G_IMPLICIT_DEF in AArch64
A generic variant of IMPLICIT_DEF was added in r306875, but this
survives to selection and hits a `Cannot Select`. Add handling that
converts the note to a regular IMPLICIT_DEF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307817 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 17:32:32 +00:00
George Burgess IV
7c497afb63 Add a test for r307754
As promised in D35003.

Uses -codegenprepare instead of -instcombine since we hit the same
buggy path anyway, and CGP lets us keep this test really simple
(instcombine likes turning the alloca T, N into alloca [N x T], which
hides the bug this is testing for).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307811 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 16:30:37 +00:00