OSDN Git Service
John Brawn [Wed, 12 Aug 2015 13:36:48 +0000 (13:36 +0000)]
[GlobalMerge] Only emit aliases for internal linkage variables for non-Mach-O
On Mach-O emitting aliases for the variables that make up a MergedGlobals
variable can cause problems when linking with dead stripping enabled so don't
do that, except for external variables where we must emit an alias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244748
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Wed, 12 Aug 2015 12:45:16 +0000 (12:45 +0000)]
[mips][microMIPS] Create microMIPS64r6 subtarget and implement DALIGN, DAUI, DAHI, DATI, DEXT, DEXTM and DEXTU instructions
Differential Revision: http://reviews.llvm.org/D10923
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244744
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Wed, 12 Aug 2015 11:27:26 +0000 (11:27 +0000)]
[X86] Disable mul -> shl + lea combine when compiling for minsize
Differential Revision: http://reviews.llvm.org/D11904
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244740
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 12 Aug 2015 10:36:16 +0000 (10:36 +0000)]
[MC] Convert the last test using macho-dump under X86/ to llvm-readobj.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244732
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Wed, 12 Aug 2015 10:14:58 +0000 (10:14 +0000)]
[X86] Allow x86 call frame optimization to fold more loads into pushes
This abstracts away the test for "when can we fold across a MachineInstruction"
into the the MI interface, and changes call-frame optimization use the same test
the peephole optimizer users.
Differential Revision: http://reviews.llvm.org/D11945
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244729
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 12 Aug 2015 09:04:44 +0000 (09:04 +0000)]
AMDGPU: Fix assert on dbg_value instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244728
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 12 Aug 2015 08:23:36 +0000 (08:23 +0000)]
unused variable warning fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244725
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 12 Aug 2015 08:08:56 +0000 (08:08 +0000)]
[InstCombine] Move SSE/AVX vector blend folding to instcombiner
As discussed in D11886, this patch moves the SSE/AVX vector blend folding to instcombiner from PerformINTRINSIC_WO_CHAINCombine (which allows us to remove this completely).
InstCombiner already had partial support for this, I just had to add support for zero (ConstantAggregateZero) masks and also the case where both selection inputs were the same (allowing us to ignore the mask).
I also moved all the relevant combine tests into InstCombine/blend_x86.ll
Differential Revision: http://reviews.llvm.org/D11934
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244723
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 12 Aug 2015 06:43:10 +0000 (06:43 +0000)]
[TableGen] Remove unused constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244718
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 12 Aug 2015 02:01:36 +0000 (02:01 +0000)]
X86: hoist a condition into a variable (NFC)
The same value is used multiple times through the function. Hoist the condition
into a variable. This should fix a silly static analysis warning where the
conditions flip around. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244713
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 12 Aug 2015 01:55:37 +0000 (01:55 +0000)]
[libFuzzer] add two flags, -tbm_depth and -tbm_width to control how the trace-based-mutations are applied
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244712
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 12 Aug 2015 01:04:27 +0000 (01:04 +0000)]
[libFuzzer] add colons to the stats output to avoid confusion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244708
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 12 Aug 2015 00:55:09 +0000 (00:55 +0000)]
[libFuzzer] use raw C IO to reduce the risk of a deadlock in a signal handler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244707
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 12 Aug 2015 00:29:10 +0000 (00:29 +0000)]
[x86] enable machine combiner reassociations for 256-bit vector FP mul/add
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244705
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 12 Aug 2015 00:21:59 +0000 (00:21 +0000)]
[LoopDist] Add test for missing coverage
Add a testcase to ensure that if we can't find bounds for a necessary
memcheck we don't distribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244703
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 11 Aug 2015 23:23:17 +0000 (23:23 +0000)]
PseudoSourceValue: Transform the mips subclass to target independent subclasses
This commit transforms the mips-specific 'MipsCallEntry' subclass of the
'PseudoSourceValue' class into two, target-independent subclasses named
'GlobalValuePseudoSourceValue' and 'ExternalSymbolPseudoSourceValue'.
This change makes it easier to serialize the pseudo source values by removing
target-specific pseudo source values.
Reviewers: Akira Hatanaka
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244698
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 11 Aug 2015 23:09:45 +0000 (23:09 +0000)]
PseudoSourceValue: Replace global manager with a manager in a machine function.
This commit removes the global manager variable which is responsible for
storing and allocating pseudo source values and instead it introduces a new
manager class named 'PseudoSourceValueManager'. Machine functions now own an
instance of the pseudo source value manager class.
This commit also modifies the 'get...' methods in the 'MachinePointerInfo'
class to construct pseudo source values using the instance of the pseudo
source value manager object from the machine function.
This commit updates calls to the 'get...' methods from the 'MachinePointerInfo'
class in a lot of different files because those calls now need to pass in a
reference to a machine function to those methods.
This change will make it easier to serialize pseudo source values as it will
enable me to transform the mips specific MipsCallEntry PseudoSourceValue
subclass into two target independent subclasses.
Reviewers: Akira Hatanaka
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244693
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 11 Aug 2015 23:03:09 +0000 (23:03 +0000)]
[LAA] Fix typo in test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244690
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 11 Aug 2015 22:32:00 +0000 (22:32 +0000)]
PseudoSourceValue: Introduce a 'PSVKind' enumerator.
This commit introduces a new enumerator named 'PSVKind' in the
'PseudoSourceValue' class. This enumerator is now used to distinguish between
the various kinds of pseudo source values.
This change is done in preparation for the changes to the pseudo source value
object management and to the PseudoSourceValue's class hierarchy - the next two
PseudoSourceValue commits will get rid of the global variable that manages the
pseudo source values and the mips specific MipsCallEntry subclass.
Reviewers: Akira Hatanaka
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244687
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 11 Aug 2015 22:23:19 +0000 (22:23 +0000)]
PseudoSourceValue: Update comments and fix lowercase variable names. NFC.
This commit updates the documentation comments in PseudoSourceValue.cpp and
PseudoSourceValue.h based on the LLVM's documentation style. It also fixes
several instances of variable names that started with a lowercase letter.
This change is done in preparation for the changes to the pseudo source value
object management and to the PseudoSourceValue's class hierarchy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244686
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 11 Aug 2015 22:17:22 +0000 (22:17 +0000)]
Reformat PseudoSourceValue.cpp and PseudoSourceValue.h. NFC.
This commit reformats the files lib/CodeGen/PseudoSourceValue.cpp and
include/llvm/CodeGen/PseudoSourceValue.h using clang-format. This change is
done in preparation for the changes to the pseudo source value object
management and to the PseudoSourceValue's class hierarchy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244685
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Heffernan [Tue, 11 Aug 2015 22:16:34 +0000 (22:16 +0000)]
Use 32-bit divides instead of 64-bit divides where possible.
For NVPTX, try to use 32-bit division instead of 64-bit division when the dividend and divisor
fit in 32 bits. This speeds up some internal benchmarks significantly. The underlying reason
is that many index computations are carried out in 64-bits but never actually exceed the
capacity of a 32-bit word.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244684
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Tue, 11 Aug 2015 21:36:45 +0000 (21:36 +0000)]
Make DW_AT_[MIPS_]linkage_name optional, and off by default for SCE.
Mangled "linkage" names can be huge, and if the debugger (or other
tools) have no use for them, the size savings can be very impressive
(on the order of 40%).
Add one test for controlling behavior, and modify a number of tests to
either stop using linkage names, or make llc emit them (so these tests
will still run when the default triple is for PS4).
Differential Revision: http://reviews.llvm.org/D11374
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244678
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 11 Aug 2015 21:33:55 +0000 (21:33 +0000)]
Fix PR24354.
`InstCombiner::OptimizeOverflowCheck` was asserting an
invariant (operands to binary operations are ordered by decreasing
complexity) that wasn't really an invariant. Fix this by instead having
`InstCombiner::OptimizeOverflowCheck` establish the invariant if it does
not hold.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244676
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 11 Aug 2015 21:24:59 +0000 (21:24 +0000)]
[lit] Don't disable the lit progress bar by default with MSVC
Only disable the progress bar when we're generating VS project files,
like we do for XCode. This makes lit use the simple, non-curses progress
bar that looks like this with:
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 5.87s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244674
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 21:24:04 +0000 (21:24 +0000)]
don't repeat function names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244672
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 21:11:56 +0000 (21:11 +0000)]
fix 80-cols; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244668
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Tue, 11 Aug 2015 21:10:07 +0000 (21:10 +0000)]
NFC SelectionDAGDumper: fix typo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11959
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244667
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Tue, 11 Aug 2015 21:02:46 +0000 (21:02 +0000)]
WebAssembly: implement comparison.
Some of the FP comparisons (ueq, one, ult, ule, ugt, uge) are currently broken, I'll fix them in a follow-up.
Reviewers: sunfish
Subscribers: llvm-commits, jfb
Differential Revision: http://reviews.llvm.org/D11924
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244665
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 11 Aug 2015 20:34:48 +0000 (20:34 +0000)]
[libFuzzer] more trophies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244661
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 11 Aug 2015 20:28:28 +0000 (20:28 +0000)]
[cmake] Shorten FreeBSD and DragonFly checks as suggested post-commit
NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244659
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 20:19:23 +0000 (20:19 +0000)]
[x86] enable machine combiner reassociations for 128-bit vector single/double multiplies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244657
91177308-0d34-0410-b5e6-
96231b3b80d8
Chen Li [Tue, 11 Aug 2015 20:16:17 +0000 (20:16 +0000)]
[LowerSwitch] Skip dead blocks for processSwitchInst()
Summary: This patch adds check for dead blocks and skip them for processSwitchInst(). This will help reduce compilation time.
Reviewers: reames, hans
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11953
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244656
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Tue, 11 Aug 2015 20:13:18 +0000 (20:13 +0000)]
WebAssembly: implement WebAssemblyTargetLowering::getTargetNodeName
Summary: Implementation is the same as in AArch64.
Subscribers: aemerson, jfb, llvm-commits, sunfish
Differential Revision: http://reviews.llvm.org/D11956
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244655
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 19:39:36 +0000 (19:39 +0000)]
fix minsize detection: minsize attribute implies optimizing for size
Also, add a test for optsize because this was not part of any existing regression test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244651
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Tue, 11 Aug 2015 19:21:46 +0000 (19:21 +0000)]
SelectionDAG: Prefer to combine multiplication with less uses for fma
Summary:
For example:
s6 = s0*s5;
s2 = s6*s6 + s6;
...
s4 = s6*s3;
We notice that it is possible for s2 is folded to fma (s0, s5, fmul (s6 s6)).
This only happens when Aggressive is true, otherwise hasOneUse() check
already prevents from folding the multiplication with more uses.
Test Plan: test/CodeGen/NVPTX/fma-assoc.ll
Patch by Xuetian Weng
Reviewers: hfinkel, apazos, jingyue, ohsallen, arsenm
Subscribers: arsenm, jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D11855
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244649
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 11 Aug 2015 19:02:57 +0000 (19:02 +0000)]
Revert "[cmake] Add helper for finding potentially external projects"
This reverts commit r244633.
We aren't going to be able to use it because the compiler-rt build can
be built standalone without an LLVM source dir *or* an installed copy of
LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244648
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 11 Aug 2015 18:17:45 +0000 (18:17 +0000)]
Fix UB in MCJIT test cases that relied on union type punning
Reviewers: lhames, aaron.ballman
Differential Revision: http://reviews.llvm.org/D11779
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244644
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Tue, 11 Aug 2015 18:17:41 +0000 (18:17 +0000)]
Re-apply "cmake: Make CMAKE_BUILD_TYPE check case-insensitive"
This re-applies r244516 (effectively reverting r244516) without losing
the check that caused failures for VS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244643
91177308-0d34-0410-b5e6-
96231b3b80d8
Chen Li [Tue, 11 Aug 2015 18:12:26 +0000 (18:12 +0000)]
[LowerSwitch] Fix a bug when LowerSwitch deletes the default block
Summary: LowerSwitch crashed with the attached test case after deleting the default block. This happened because the current implementation of deleting dead blocks is wrong. After the default block being deleted, it contains no instruction or terminator, and it should no be traversed anymore. However, since the iterator is advanced before processSwitchInst() function is executed, the block advanced to could be deleted inside processSwitchInst(). The deleted block would then be visited next and crash dyn_cast<SwitchInst>(Cur->getTerminator()) because Cur->getTerminator() returns a nullptr. This patch fixes this problem by recording dead default blocks into a list, and delete them after all processSwitchInst() has been done. It still possible to visit dead default blocks and waste time process them. But it is a compile time issue, and I plan to have another patch to add support to skip dead blocks.
Reviewers: kariddi, resistor, hans, reames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11852
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244642
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 11 Aug 2015 18:11:17 +0000 (18:11 +0000)]
Use llvm::make_unique to fix the MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244641
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Tue, 11 Aug 2015 17:35:49 +0000 (17:35 +0000)]
Add SmallString test trying to exercise the realloc() code path
by allocating a small size (will go through malloc) and then large size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244637
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 11 Aug 2015 17:16:35 +0000 (17:16 +0000)]
[cmake] Add helper for finding potentially external projects
I plan to use this from compiler-rt, but it's useful for any LLVM
project that depends on more than just LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244633
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 17:04:31 +0000 (17:04 +0000)]
fix minsize detection: minsize attribute implies optimizing for size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244631
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 16:58:49 +0000 (16:58 +0000)]
add missing tests for powi expansion with size optimizations
The minsize test will be fixed in the next commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244630
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 16:51:31 +0000 (16:51 +0000)]
fixed to use FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244627
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 16:43:18 +0000 (16:43 +0000)]
fixed to test attribute, rather than CPU
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244625
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Tue, 11 Aug 2015 16:26:41 +0000 (16:26 +0000)]
Enable EliminateAvailableExternally pass in the LTO pipeline.
Summary:
For LTO we need to enable this pass in the LTO pipeline,
as it is skipped during the "-flto -c" compile step (when PrepareForLTO is
set).
Reviewers: rnk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11919
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244622
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 11 Aug 2015 16:26:06 +0000 (16:26 +0000)]
Revert "Add non-member begin and end so that drop_begin works on iterator_range."
This reverts commit r244620.
MSVC doesn't like it :-(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244621
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 11 Aug 2015 16:12:56 +0000 (16:12 +0000)]
Add non-member begin and end so that drop_begin works on iterator_range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244620
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 16:10:41 +0000 (16:10 +0000)]
fix typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244619
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 16:05:43 +0000 (16:05 +0000)]
Variable names should start with an upper case letter; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244618
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 15:56:31 +0000 (15:56 +0000)]
fix minsize detection: minsize attribute implies optimizing for size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244617
91177308-0d34-0410-b5e6-
96231b3b80d8
John Brawn [Tue, 11 Aug 2015 15:48:04 +0000 (15:48 +0000)]
[GlobalMerge] Use private linkage for MergedGlobals variables
Other objects can never reference the MergedGlobals symbol so external linkage
is never needed. Using private instead of internal linkage means the object is
more similar to what it looks like when global merging is not enabled, with
the only difference being that the merged variables are addressed indirectly
relative to the start of the section they are in.
Also add aliases for merged variables with internal linkage, as this also makes
the object be more like what it is when they are not merged.
Differential Revision: http://reviews.llvm.org/D11942
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244615
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 11 Aug 2015 15:31:17 +0000 (15:31 +0000)]
Fix InstCombine test: invalid CHECK line slipped in r231270
I incorrectly wrote CHECK-NEXT with followin with ':', the check was
ignored by FileCheck.
The non-inbound GEP is folded here because the DataLayout is no longer
optional, the fold was originally guarded with a comment that said:
We need TD information to know the pointer size unless this is inbounds.
Now we always have "TD information" and perform the fold.
Thanks Jonathan Roelofs for noticing.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244613
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 15:30:53 +0000 (15:30 +0000)]
remove unnecessary settings/attributes from test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244612
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kruse [Tue, 11 Aug 2015 15:16:43 +0000 (15:16 +0000)]
[RegionInfo] Verify getRegionFor
Summary:
Check the contents of BBtoRegion during analysis verification. It only takes place if -verify-region-info is passed or LLVM is compiled with XDEBUG.
RegionBase<Tr>::verifyRegion() also checks the RegionInfoBase<Tr>::VerifyRegionInfo flag, which is redundant, but verifyRegion() is public API and might be invoked from other sites. In order to avoid behavioral change, this check is not removed. In any case, no region will be verified unless VerifyRegionInfo is set.
Reviewers: grosser
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11872
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244611
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 15:08:29 +0000 (15:08 +0000)]
fix code that was accidentally commented out in previous commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244610
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 15:04:51 +0000 (15:04 +0000)]
fix typos in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244609
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 14:45:08 +0000 (14:45 +0000)]
fix typo in comment; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244607
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 14:35:29 +0000 (14:35 +0000)]
delete FIXME comment; it's fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244605
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 14:31:14 +0000 (14:31 +0000)]
fix minsize detection: minsize attribute implies optimizing for size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244604
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 14:29:45 +0000 (14:29 +0000)]
add missing test for machine combiner when optimizing for size
The minsize test will be fixed in the next commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244603
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 11 Aug 2015 14:10:58 +0000 (14:10 +0000)]
[X86] Allow merging of immediates within a basic block for code size savings
First step in preventing immediates that occur more than once within a single
basic block from being pulled into their users, in order to prevent unnecessary
large instruction encoding .Currently enabled only when optimizing for size.
Patch by: zia.ansari@intel.com
Differential Revision: http://reviews.llvm.org/D11363
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244601
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 11 Aug 2015 12:06:37 +0000 (12:06 +0000)]
[AArch64] Match fminnum/fmaxnum for vector fminnm/fmaxnm instead of an intrinsic.
Lower Intrinsic::aarch64_neon_fmin/fmax to fminnum/fmannum and match that instead. Minimal functional change:
- Extra tests added because coverage of scalar fminnm/fmaxnm instructions was nonexistant.
- f16 test updated because now we actually generate scalar fminnm/fmaxnm we no longer need to bail out to a libcall!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244595
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 11 Aug 2015 12:06:33 +0000 (12:06 +0000)]
[AArch64] Replace the custom AArch64ISD::FMIN/MAX nodes with ISD::FMINNAN/MAXNAN
NFCI. This just removes custom ISDNodes that are no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244594
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 11 Aug 2015 12:06:28 +0000 (12:06 +0000)]
[ARM] Match fminnan/fmaxnan for vector vmin/vmax instead of an intrinsic
Lower Intrinsic::arm_neon_vmins/vmaxs to fminnan/fmaxnan and match that instead. This is important because SDAG will soon be able to select FMINNAN itself, so we need a unified lowering path for intrinsics and SDAG.
NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244593
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 11 Aug 2015 12:06:25 +0000 (12:06 +0000)]
[ARM] Match fminnum/fmaxnum for vector vminnm/vmaxnm instead of an intrinsic
Lower the intrinsic to a FMINNUM/FMAXNUM node and select that instead. This is important because soon SDAG will be able to select FMINNUM/FMAXNUM itself, so we need an integrated lowering path between SDAG and intrinsics.
NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244592
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 11 Aug 2015 12:06:22 +0000 (12:06 +0000)]
[ARM] Replace ARMISD::VMINNM/VMAXNM with ISD::FMINNUM/FMAXNUM
NFCI. This replaces another custom ISDNode with a generic equivalent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244591
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 11 Aug 2015 12:06:15 +0000 (12:06 +0000)]
[ARM] Replace ARMISD::FMIN/FMAX with the shiny new ISD::FMINNAN/FMAXNAN.
NFCI. This removes a custom ISDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244590
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 11 Aug 2015 12:06:04 +0000 (12:06 +0000)]
Revert r244516; it was causing cmake configuration failures on Windows with Visual Studio.
http://bb.pgr.jp/builders/msbuild-llvmclang-x64-msc18-DA/builds/475
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244589
91177308-0d34-0410-b5e6-
96231b3b80d8
Marina Yatsina [Tue, 11 Aug 2015 12:05:06 +0000 (12:05 +0000)]
[X86] Add SAL mnemonics for Intel syntax
SAL and SHL instructions perform the same operation
Differential Revision: http://reviews.llvm.org/D11882
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244588
91177308-0d34-0410-b5e6-
96231b3b80d8
Marina Yatsina [Tue, 11 Aug 2015 11:28:10 +0000 (11:28 +0000)]
[X86] Fix REPE, REPZ, REPNZ for intel syntax
REPE, REPZ, REPNZ, REPNE should have mnemonics for Intel syntax as well.
Currently using these instructions causes compilation errors for Intel syntax.
Differential Revision: http://reviews.llvm.org/D11794
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244584
91177308-0d34-0410-b5e6-
96231b3b80d8
Marina Yatsina [Tue, 11 Aug 2015 10:43:04 +0000 (10:43 +0000)]
[X86] Fix imul alias for intel syntax
The "imul reg, imm" alias is not defined for intel syntax.
In intel syntax there is no w/l/q suffix for the imul instruction.
Differential Revision: http://reviews.llvm.org/D11887
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244582
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 11 Aug 2015 09:13:05 +0000 (09:13 +0000)]
Add new ISD nodes: ISD::FMINNAN and ISD::FMAXNAN
The intention of these is to be a corollary to ISD::FMINNUM/FMAXNUM,
differing only on how NaNs are treated. FMINNUM returns the non-NaN
input (when given one NaN and one non-NaN), FMINNAN returns the NaN
input instead.
This patch includes support for scalarizing, widening and splitting
vectors, but not expansion or softening. The reason is that these
should never be needed - FMINNAN nodes are only going to be created
in one place (SDAGBuilder::visitSelect) and there we'll check if the
node is legal or custom. I could preemptively add expand and soften
code, but I'm fairly opposed to adding code I can't test. It's bad
enough I can't create tests with this patch, but at least this code
will be exercised by the ARM and AArch64 backends fairly shortly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244581
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 11 Aug 2015 09:12:57 +0000 (09:12 +0000)]
Add support for floating-point minnum and maxnum
The select pattern recognition in ValueTracking (as used by InstCombine
and SelectionDAGBuilder) only knew about integer patterns. This teaches
it about minimum and maximum operations.
matchSelectPattern() has been extended to return a struct containing the
existing Flavor and a new enum defining the pattern's behavior when
given one NaN operand.
C minnum() is defined to return the non-NaN operand in this case, but
the idiomatic C "a < b ? a : b" would return the NaN operand.
ARM and AArch64 at least have different instructions for these different cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244580
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Tue, 11 Aug 2015 08:56:25 +0000 (08:56 +0000)]
[mips] Remap move as or.
Summary:
This patch remaps the assembly idiom 'move' to 'or' instead of 'daddu' or
'addu'. The use of addu/daddu instead of or as move was highlighted as a
performance issue during the analysis of a recent 64bit design. Originally
move was encoded as 'or' by binutils but was changed for the r10k cpu family
due to their pipeline which had 2 arithmetic units and a single logical unit,
and so could issue multiple (d)addu based moves at the same time but only 1
logical move.
This patch preserves the disassembly behaviour so that disassembling a old style
(d)addu move still appears as move, but assembling move always gives an or
Patch by Simon Dardis.
Reviewers: vkalintiris
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11796
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244579
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 11 Aug 2015 08:48:48 +0000 (08:48 +0000)]
[X86] When optimizing for minsize, use POP for small post-call stack clean-up
When optimizing for size, replace "addl $4, %esp" and "addl $8, %esp"
following a call by one or two pops, respectively. We don't try to do it in
general, but only when the stack adjustment immediately follows a call - which
is the most common case.
That allows taking a short-cut when trying to find a free register to pop into,
instead of a full-blown liveness check. If the adjustment immediately follows a
call, then every register the call clobbers but doesn't define should be dead at
that point, and can be used.
Differential Revision: http://reviews.llvm.org/D11749
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244578
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 11 Aug 2015 08:19:43 +0000 (08:19 +0000)]
Allow PeepholeOptimizer to fold a few more cases
The condition for clearing the folding candidate list was clamped together
with the "uninteresting instruction" condition. This is too conservative,
e.g. we don't need to clear the list when encountering an IMPLICIT_DEF.
Differential Revision: http://reviews.llvm.org/D11591
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244577
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 11 Aug 2015 08:06:44 +0000 (08:06 +0000)]
[GMR] Be a bit smarter about which globals don't alias when doing recursive lookups
Should hopefully fix the remainder of PR24288.
Differential Revision: http://reviews.llvm.org/D11900
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244575
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 11 Aug 2015 06:27:53 +0000 (06:27 +0000)]
[RuntimeDyld][AArch64] Add explicit addends before calling relocationValueRef.
relocationValueRef uses the addend, so it has to be set before the call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244574
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Tue, 11 Aug 2015 06:05:27 +0000 (06:05 +0000)]
Enable five passing dsymutil tests on Windows.
These tests pass with Windows 7 x64 + MSYS2. I'll see if the bots like
them as well and disable the failing ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244572
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 11 Aug 2015 05:57:10 +0000 (05:57 +0000)]
Fix unused variable 'X' in release builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244571
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Tue, 11 Aug 2015 04:52:24 +0000 (04:52 +0000)]
WebAssembly: NFC fix release build break, unused variable.
Summary: Caused by D11914, pointed out by blaikie.
Subscribers: llvm-commits, jfb, dblaikie
Differential Revision: http://reviews.llvm.org/D11929
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244570
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 11 Aug 2015 04:16:37 +0000 (04:16 +0000)]
[libFuzzer] fix docs build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244566
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 11 Aug 2015 02:48:30 +0000 (02:48 +0000)]
[IR] Verify EH pad predecessors
Make sure that an EH pad's predecessors are using their unwind edge to
transfer control to the EH pad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244563
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Tue, 11 Aug 2015 02:45:15 +0000 (02:45 +0000)]
WebAssembly: add basic floating-point tests
Summary: I somehow forgot to add these when I added the basic floating-point opcodes. Also remove ceil/floor/trunc/nearestint for now, and add them only when properly tested.
Subscribers: llvm-commits, sunfish, jfb
Differential Revision: http://reviews.llvm.org/D11927
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244562
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 11 Aug 2015 01:53:45 +0000 (01:53 +0000)]
[libFuzzer] add the list of trophies to the docs. It is incomplete, additions are welcome :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244560
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 11 Aug 2015 01:44:42 +0000 (01:44 +0000)]
[libFuzzer] add -only_ascii flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244559
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 11 Aug 2015 01:15:26 +0000 (01:15 +0000)]
[WinEHPrepare] Add rudimentary support for the new EH instructions
This adds somewhat basic preparation functionality including:
- Formation of funclets via coloring basic blocks.
- Cloning of polychromatic blocks to ensure that funclets have unique
program counters.
- Demotion of values used between different funclets.
- Some amount of cleanup once we have removed predecessors from basic
blocks.
- Verification that we are left with a CFG that makes some amount of
sense.
N.B. Arguments and numbering still need to be done.
Differential Revision: http://reviews.llvm.org/D11750
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244558
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Esfahani [Tue, 11 Aug 2015 01:15:07 +0000 (01:15 +0000)]
Explicitly clear the MI operand list when getInstruction() is called. Call MI.clear() within MCD::OPC_Decode case and inside of translateInstruction() for the X86 target. Remove now unnecessary MI.clear() from ARMDisassembler.
Summary: Explicitly clear the MI operand list when getInstruction() is called.
Reviewers: hfinkel, t.p.northover, hvarga, kparzysz, jyknight, qcolombet, uweigand
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11665
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244557
91177308-0d34-0410-b5e6-
96231b3b80d8
Tyler Nowicki [Tue, 11 Aug 2015 01:09:15 +0000 (01:09 +0000)]
Print vectorization analysis when loop hint is specified.
This patch and a relatec clang patch solve the problem of having to explicitly enable analysis when specifying a loop hint pragma to get the diagnostics. Passing AlwasyPrint as the pass name (see below) causes the front-end to print the diagnostic if the user has specified '-Rpass-analysis' without an '=<target-pass>’. Users of loop hints can pass that compiler option without having to specify the pass and they will get diagnostics for only those loops with loop hints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244555
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 11 Aug 2015 01:05:16 +0000 (01:05 +0000)]
Update the syntax for load instruction in this example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244554
91177308-0d34-0410-b5e6-
96231b3b80d8
Tyler Nowicki [Tue, 11 Aug 2015 00:52:54 +0000 (00:52 +0000)]
Moved LoopVectorizeHints and related functions before LoopVectorizationLegality and LoopVectorizationCostModel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244552
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Tue, 11 Aug 2015 00:49:20 +0000 (00:49 +0000)]
WebAssembly: simply assert on SNaN and NaNs with payloads
Summary: convertToHexString doesn't represent them correctly at this point in time. This is a follow-up to sunfish's suggestion in D11914.
Subscribers: llvm-commits, sunfish, jfb
Differential Revision: http://reviews.llvm.org/D11925
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244551
91177308-0d34-0410-b5e6-
96231b3b80d8
Tyler Nowicki [Tue, 11 Aug 2015 00:35:44 +0000 (00:35 +0000)]
Simplify processLoop() by moving loop hint verification into Hints::allowVectorization().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244550
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 11 Aug 2015 00:32:49 +0000 (00:32 +0000)]
MIR Serialization: Serialize UsedPhysRegMask from the machine register info.
This commit serializes the UsedPhysRegMask register mask from the machine
register information class. The mask is serialized as an inverted
'calleeSavedRegisters' mask to keep the output minimal.
This commit also allows the MIR parser to infer this mask from the register
mask operands if the machine function doesn't specify it.
Reviewers: Duncan P. N. Exon Smith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244548
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Aug 2015 00:26:05 +0000 (00:26 +0000)]
use range-based for loops; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244545
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 11 Aug 2015 00:24:39 +0000 (00:24 +0000)]
[libFuzzer] don't crash if the condition in a switch has unusual type (e.g. i72)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244544
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 11 Aug 2015 00:20:24 +0000 (00:20 +0000)]
Address post-commit review from r243378.
This checks that bork_directive occurs exactly twice in the test output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244543
91177308-0d34-0410-b5e6-
96231b3b80d8