oota-llvm.git
9 years agoRevert: r249536 - Testing commit access with a trival whitespace change.
Scott Egerton [Wed, 7 Oct 2015 10:57:06 +0000 (10:57 +0000)]
Revert: r249536 - Testing commit access with a trival whitespace change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249537 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTesting commit access with a trival whitespace change.
Scott Egerton [Wed, 7 Oct 2015 10:49:49 +0000 (10:49 +0000)]
Testing commit access with a trival whitespace change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249536 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "This patch builds on top of D13378 to handle constant condition."
James Molloy [Wed, 7 Oct 2015 09:03:34 +0000 (09:03 +0000)]
Revert "This patch builds on top of D13378 to handle constant condition."

This reverts commit r249431. This caused failures in sqlite3: http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/14453

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249528 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[EarlyCSE] Fix handling of target memory intrinsics for CSE'ing loads.
Arnaud A. de Grandmaison [Wed, 7 Oct 2015 07:41:29 +0000 (07:41 +0000)]
[EarlyCSE] Fix handling of target memory intrinsics for CSE'ing loads.

Summary:
Some target intrinsics can access multiple elements, using the pointer as a
base address (e.g. AArch64 ld4). When trying to CSE such instructions,
it must be checked the available value comes from a compatible instruction
because the pointer is not enough to discriminate whether the value is
correct.

Reviewers: ssijaric

Subscribers: mcrosier, llvm-commits, aemerson

Differential Revision: http://reviews.llvm.org/D13475

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249523 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Emit .cfi_escape GNU_ARGS_SIZE when adjusting the stack before calls
Michael Kuperstein [Wed, 7 Oct 2015 07:01:31 +0000 (07:01 +0000)]
[X86] Emit .cfi_escape GNU_ARGS_SIZE when adjusting the stack before calls

When outgoing function arguments are passed using push instructions, and EH
is enabled, we may need to indicate to the stack unwinder that the stack
pointer was adjusted before the call.

This should fix the exception handling issues in PR24792.

Differential Revision: http://reviews.llvm.org/D13132

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249522 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAVX512: Change encoding of vpshuflw and vpshufhw instructions. Implement WIG as W0...
Igor Breger [Wed, 7 Oct 2015 06:31:18 +0000 (06:31 +0000)]
AVX512: Change encoding of vpshuflw and vpshufhw instructions. Implement WIG as W0 and not W1, like all other instruction have been implemented.
Add encoding tests.

Differential Revision: http://reviews.llvm.org/D13471

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249521 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[RS4GC] Remove an unnecessary assert & related variables
Sanjoy Das [Wed, 7 Oct 2015 02:39:27 +0000 (02:39 +0000)]
[RS4GC] Remove an unnecessary assert & related variables

I don't think this assert adds much value, and removing it and related
variables avoids an "unused variable" warning in release builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249511 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OperandBundles] Add an accessor to get an operand bundle by tag
Sanjoy Das [Wed, 7 Oct 2015 02:39:24 +0000 (02:39 +0000)]
[OperandBundles] Add an accessor to get an operand bundle by tag

Not used at the moment, but will be used in a later change to
RewriteStatepointsForGC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249510 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OperandBundles] Remove a useless accessor from OperandBundleUser
Sanjoy Das [Wed, 7 Oct 2015 02:39:21 +0000 (02:39 +0000)]
[OperandBundles] Remove a useless accessor from OperandBundleUser

Since the `const` version of `getOperandBundle` returns a value of the
same type as the non-`const` version, the non-`const` version is
redundant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249509 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[RS4GC] Cosmetic cleanup, NFC
Sanjoy Das [Wed, 7 Oct 2015 02:39:18 +0000 (02:39 +0000)]
[RS4GC] Cosmetic cleanup, NFC

Summary:
A series of cosmetic cleanup changes to RewriteStatepointsForGC:

  - Rename variables to LLVM style
  - Remove some redundant asserts
  - Remove an unsued `Pass *` parameter
  - Remove unnecessary variables
  - Use C++11 idioms where applicable
  - Pass CallSite by value, not reference

Reviewers: reames, swaroop.sridhar

Subscribers: llvm-commits, sanjoy

Differential Revision: http://reviews.llvm.org/D13370

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249508 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove the comdat-ness from the testcase as it won't lower properly
Eric Christopher [Wed, 7 Oct 2015 01:52:33 +0000 (01:52 +0000)]
Remove the comdat-ness from the testcase as it won't lower properly
on darwin with it since darwin doesn't have comdat and it isn't
necessary for the testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249504 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU: Add comment for VOP2b operand class
Matt Arsenault [Wed, 7 Oct 2015 01:36:00 +0000 (01:36 +0000)]
AMDGPU: Add comment for VOP2b operand class

Because of the constant bus requirement, it is never legal to
use a literal constant for these instructions despite the encoding
allowing it. This was already doing the right thing, but note why.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249500 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUpdate test to use FileCheck and clean up run lines to match the
Eric Christopher [Wed, 7 Oct 2015 01:21:49 +0000 (01:21 +0000)]
Update test to use FileCheck and clean up run lines to match the
expected behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249498 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU: Properly register passes
Matt Arsenault [Wed, 7 Oct 2015 00:42:53 +0000 (00:42 +0000)]
AMDGPU: Properly register passes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249495 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU: Use explicit register size indirect pseudos
Matt Arsenault [Wed, 7 Oct 2015 00:42:51 +0000 (00:42 +0000)]
AMDGPU: Use explicit register size indirect pseudos

This stops using an unknown reg class operand.

Currently build_vector selection has a broken looking check
where it tries to use a VGPR reg class and an SGPR one if it
sees an SGPR use.

With the source operand has an explicit VGPR class,
illegal copies will be inserted that SIFixSGPRCopies will take care
of normally later, which will allow removing the weird check
of build_vector users. Without this, when removed v_movrels_b32 would
still be emitted even though all of the values were only stored in
SGPRs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249494 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU: Remove inferRegClassFromUses / inferRegClassFromDefs
Matt Arsenault [Wed, 7 Oct 2015 00:42:31 +0000 (00:42 +0000)]
AMDGPU: Remove inferRegClassFromUses / inferRegClassFromDefs

I'm not sure why this would be necessary, and no tests fail with
them removed. Looking at the uses is suspect as well because
the use reg classes will likely change when the users are moved
as a result of moving this instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249493 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SEH] Add llvm.eh.exceptioncode intrinsic
Reid Kleckner [Wed, 7 Oct 2015 00:27:33 +0000 (00:27 +0000)]
[SEH] Add llvm.eh.exceptioncode intrinsic

This will support the Clang __exception_code intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249492 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoInstCombine: Fold comparisons between unguessable allocas and other pointers
Hans Wennborg [Wed, 7 Oct 2015 00:20:07 +0000 (00:20 +0000)]
InstCombine: Fold comparisons between unguessable allocas and other pointers

This will allow us to optimize code such as:

  int f(int *p) {
    int x;
    return p == &x;
  }

as well as:

  int *allocate(void);
  int f() {
    int x;
    int *p = allocate();
    return p == &x;
  }

The folding can only be done under certain circumstances. Even though p and &x
cannot alias, the comparison must still return true if the pointer
representations are equal. If a user successfully generates a p that's a
correct guess for &x, comparison should return true even though p is an invalid
pointer.

This patch argues that if the address of the alloca isn't observable outside the
function, the function can act as-if the address is impossible to guess from the
outside. The tricky part is keeping the act consistent: if we fold p == &x to
false in one place, we must make sure to fold any other comparisons based on
those pointers similarly. To ensure that, we only fold when &x is involved
exactly once in comparison instructions.

Differential Revision: http://reviews.llvm.org/D13358

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249490 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMove test to X86-specific due to some IR invalid on other targets
David Blaikie [Wed, 7 Oct 2015 00:17:31 +0000 (00:17 +0000)]
Move test to X86-specific due to some IR invalid on other targets

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249489 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Include the decl_line/decl_file in subprogram definitions if they differ...
David Blaikie [Wed, 7 Oct 2015 00:04:16 +0000 (00:04 +0000)]
DebugInfo: Include the decl_line/decl_file in subprogram definitions if they differ from those in the declaration

This is handy for some AutoFDO stuff, and seems like a minor improvement
to correctness (otherwise a debug info consumer might think the decl
line/file of the def was the same as that of the declaration - though
what a consumer might use that for, I'm not sure - maybe "list <func>"
would've misbehaved with the old behavior?) and at a minor cost (in my
experiment, with fission, without type units, without compression, 0.01%
growth in debug info in the executable/objects, 0.02% growth in the .dwo
files).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249487 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Create a separate MBB for funclet prologues
David Majnemer [Tue, 6 Oct 2015 23:31:59 +0000 (23:31 +0000)]
[WinEH] Create a separate MBB for funclet prologues

Our current emission strategy is to emit the funclet prologue in the
CatchPad's normal destination.  This is problematic because
intra-funclet control flow to the normal destination is not erroneous
and results in us reevaluating the prologue if said control flow is
taken.

Instead, use the CatchPad's location for the funclet prologue.  This
correctly models our desire to have unwind edges evaluate the prologue
but edges to the normal destination result in typical control flow.

Differential Revision: http://reviews.llvm.org/D13424

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249483 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix Clang-tidy modernize-use-nullptr warnings in source directories and generated...
Hans Wennborg [Tue, 6 Oct 2015 23:24:35 +0000 (23:24 +0000)]
Fix Clang-tidy modernize-use-nullptr warnings in source directories and generated files; other minor cleanups.

Patch by Eugene Zelenko!

Differential Revision: http://reviews.llvm.org/D13321

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249482 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Orc] Teach the CompileOnDemand layer to clone aliases.
Lang Hames [Tue, 6 Oct 2015 22:55:05 +0000 (22:55 +0000)]
[Orc] Teach the CompileOnDemand layer to clone aliases.

This allows modules containing aliases to be lazily jit'd. Previously these
failed with missing symbol errors because the aliases weren't cloned from the
original module.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249481 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Use auto for iterators, NFC
Duncan P. N. Exon Smith [Tue, 6 Oct 2015 22:37:47 +0000 (22:37 +0000)]
IR: Use auto for iterators, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249480 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix two bugs in llvm-objdump’s printing of Objective-C meta data
Kevin Enderby [Tue, 6 Oct 2015 22:27:08 +0000 (22:27 +0000)]
Fix two bugs in llvm-objdump’s printing of Objective-C meta data
from malformed Mach-O files that caused crashes.

We recently got about 700 malformed Mach-O files which we have
been using the improve the robustness of tools that deal with reading
data from object files.  These resulted in about 20 small bug fixes to
the darwin based tools.

The goal here is to also improve the robustness of llvm-objdump and
this is the first two fixes.  In talking with Tim Northover the approach
we thought might be best is to:

1) Only include tests for the malformed Mach-O files that cause crashes
(not all 700+ tests).
2) The test should only contain the command line option that caused the
crash and not all the others that don’t matter.
3) There should be only one line for the FileCheck that is past the point
of the crash if possible and if possible indicates the malformation.

Again the goal is to fix crashes and not so much care about how the
printing of malformed data comes out.

Tim also suggested if we really wanted to add test cases for all 700+
malformed Mach-O files putting them in the regression tests might be
an option.  But many of these do not cause crashes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249479 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Remove unnecessary TraitsClass typedef, NFC
Duncan P. N. Exon Smith [Tue, 6 Oct 2015 22:14:06 +0000 (22:14 +0000)]
IR: Remove unnecessary TraitsClass typedef, NFC

No classes are specializing the symbol table traits, so no need to look
through a typedef for class API.  Make a few more functions private
since only SymbolTableListTraits should be using them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249476 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCodeGen: s/protected:/private:/ in MachineBasicBlock, NFC
Duncan P. N. Exon Smith [Tue, 6 Oct 2015 21:48:31 +0000 (21:48 +0000)]
CodeGen: s/protected:/private:/ in MachineBasicBlock, NFC

Nothing inherits from `MachineBasicBlock`, so this should have no real
functionality change.  Just makes the code easier to understand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249473 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[IndVars] Don't break dominance in `eliminateIdentitySCEV`
Sanjoy Das [Tue, 6 Oct 2015 21:44:49 +0000 (21:44 +0000)]
[IndVars] Don't break dominance in `eliminateIdentitySCEV`

Summary:
After r249211, `getSCEV(X) == getSCEV(Y)` does not guarantee that X and
Y are related in the dominator tree, even if X is an operand to Y (I've
included a toy example in comments, and a real example as a test case).

This commit changes `SimplifyIndVar` to require a `DominatorTree`.  I
don't think this is a problem because `ScalarEvolution` requires it
anyway.

Fixes PR25051.

Depends on D13459.

Reviewers: atrick, hfinkel

Subscribers: joker.eph, llvm-commits, sanjoy

Differential Revision: http://reviews.llvm.org/D13460

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249471 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[IndVars] Extract out eliminateIdentitySCEV, NFC
Sanjoy Das [Tue, 6 Oct 2015 21:44:39 +0000 (21:44 +0000)]
[IndVars] Extract out eliminateIdentitySCEV, NFC

Summary:
Reflow a comment while at it.

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D13459

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249470 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Remove unnecessary specialization of getSymTab(), NFC
Duncan P. N. Exon Smith [Tue, 6 Oct 2015 21:31:07 +0000 (21:31 +0000)]
IR: Remove unnecessary specialization of getSymTab(), NFC

The only specializations of `getSymTab()` were identical to the default
defined in `SymbolTableListTraits::getSymTab()`.  Remove the
specializations, and stop treating it like a configuration point.  Just
to be sure no one else accesses this, make it private.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249469 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU/SI: Remove calling convention assertion from LowerFormalArguments()
Tom Stellard [Tue, 6 Oct 2015 21:16:34 +0000 (21:16 +0000)]
AMDGPU/SI: Remove calling convention assertion from LowerFormalArguments()

Summary:
We currently ignore the calling convention, so there is no real reason to
assert on the calling convention of functions.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

Differential Revision: http://reviews.llvm.org/D13367

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249468 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] Minor refactoring. NFC.
Chad Rosier [Tue, 6 Oct 2015 20:58:42 +0000 (20:58 +0000)]
[ARM] Minor refactoring. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249465 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] Minor refactoring. NFC.
Chad Rosier [Tue, 6 Oct 2015 20:51:26 +0000 (20:51 +0000)]
[ARM] Minor refactoring. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249464 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] Minor refactoring. NFC.
Chad Rosier [Tue, 6 Oct 2015 20:45:45 +0000 (20:45 +0000)]
[ARM] Minor refactoring. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249463 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Function] Clean up {prefix,prologue} data routines (NFC)
Vedant Kumar [Tue, 6 Oct 2015 20:31:57 +0000 (20:31 +0000)]
[Function] Clean up {prefix,prologue} data routines (NFC)

Factor out some common code used to get+set function prefix/prologue
data. This may come in handy if we ever decide to store personality
functions in the same way we store prefix/prologue data.

Differential Revision: http://reviews.llvm.org/D13120

Reviewed-by: bogner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249460 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Implement state numbering for CoreCLR
Joseph Tremoulet [Tue, 6 Oct 2015 20:30:33 +0000 (20:30 +0000)]
[WinEH] Implement state numbering for CoreCLR

Summary:
Assign one state number per handler/funclet, tracking parent state,
handler type, and catch type token.
State numbers are arranged such that ancestors have lower state numbers
than their descendants.

Reviewers: majnemer, andrew.w.kaylor, rnk

Subscribers: pgavlin, AndyAyers, llvm-commits

Differential Revision: http://reviews.llvm.org/D13450

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249457 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Recognize CoreCLR personality function
Joseph Tremoulet [Tue, 6 Oct 2015 20:28:16 +0000 (20:28 +0000)]
[WinEH] Recognize CoreCLR personality function

Summary:
 - Add CoreCLR to if/else ladders and switches as appropriate.
 - Rename isMSVCEHPersonality to isFuncletEHPersonality to better
   reflect what it captures.

Reviewers: majnemer, andrew.w.kaylor, rnk

Subscribers: pgavlin, AndyAyers, llvm-commits

Differential Revision: http://reviews.llvm.org/D13449

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249455 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] Minor refactoring to improve readability. NFC.
Chad Rosier [Tue, 6 Oct 2015 20:23:42 +0000 (20:23 +0000)]
[ARM] Minor refactoring to improve readability. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249454 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoExtend known bits to understand @llvm.bswap
Philip Reames [Tue, 6 Oct 2015 20:20:45 +0000 (20:20 +0000)]
Extend known bits to understand @llvm.bswap

This is a cleaned up patch from the one written by John Regehr based on the findings of the Souper superoptimizer.

When writing tests, I was surprised to find that instsimplify apparently doesn't know how to collapse bit test sequences based purely on known bits. This required me to split my tests across both instsimplify and instcombine.

Differential Revision: http://reviews.llvm.org/D13250

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249453 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix pr25040 - Handle vectors of i1s in recently added implication code
Philip Reames [Tue, 6 Oct 2015 19:00:02 +0000 (19:00 +0000)]
Fix pr25040 - Handle vectors of i1s in recently added implication code

As mentioned in the bug, I'd missed the presence of a getScalarType in the caller of the new implies method. As a result, when we ended up with a implication over two vectors, we'd trip an assert and crash.

Differential Revision: http://reviews.llvm.org/D13441

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249442 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Use typedefs for getSublistAccess(), NFC
Duncan P. N. Exon Smith [Tue, 6 Oct 2015 18:33:43 +0000 (18:33 +0000)]
IR: Use typedefs for getSublistAccess(), NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249439 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Remove ZeroOrMore from option flags
Krzysztof Parzyszek [Tue, 6 Oct 2015 18:29:36 +0000 (18:29 +0000)]
[Hexagon] Remove ZeroOrMore from option flags

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249438 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] Simplify tests and make checks more rigid. NFC.
Chad Rosier [Tue, 6 Oct 2015 17:54:12 +0000 (17:54 +0000)]
[ARM] Simplify tests and make checks more rigid. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249432 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoThis patch builds on top of D13378 to handle constant condition.
Mehdi Amini [Tue, 6 Oct 2015 17:19:20 +0000 (17:19 +0000)]
This patch builds on top of D13378 to handle constant condition.

With this patch, clang -O3 optimizes correctly providing > 1000x speedup on this artificial benchmark):

for (a=0; a<n; a++)
    for (b=0; b<n; b++)
        for (c=0; c<n; c++)
            for (d=0; d<n; d++)
                for (e=0; e<n; e++)
                    for (f=0; f<n; f++)
                        x++;
From test-suite/SingleSource/Benchmarks/Shootout/nestedloop.c

Reviewers: sanjoyd

Differential Revision: http://reviews.llvm.org/D13390

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249431 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU/SI: Add 64-bit versions of v_nop and v_clrexcp
Tom Stellard [Tue, 6 Oct 2015 15:57:53 +0000 (15:57 +0000)]
AMDGPU/SI: Add 64-bit versions of v_nop and v_clrexcp

Summary:
The assembly printing of these is still missing the encoding size
suffix, but this will be fixed in a later commit.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

Differential Revision: http://reviews.llvm.org/D13436

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249424 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Add an early if-conversion pass
Krzysztof Parzyszek [Tue, 6 Oct 2015 15:49:14 +0000 (15:49 +0000)]
[Hexagon] Add an early if-conversion pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249423 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][microMIPS] Fix an issue with selecting sqrt instruction in LLVM backend
Daniel Sanders [Tue, 6 Oct 2015 15:17:25 +0000 (15:17 +0000)]
[mips][microMIPS] Fix an issue with selecting sqrt instruction in LLVM backend

Summary:
This fixes 7 tests during fast LLVM test-suite run:
* MultiSource/Benchmarks/McCat/18-imp/imp
* MultiSource/Applications/oggenc/oggenc
* MultiSource/Benchmarks/MallocBench/gs/gs
* MultiSource/Benchmarks/MiBench/automotive-susan/automotive-susan
* MultiSource/Benchmarks/VersaBench/beamformer/beamformer
* MultiSource/Benchmarks/MiBench/consumer-lame/consumer-lame
* MultiSource/Benchmarks/Bullet/bullet

Error message was in the form of:
fatal error: error in backend: Cannot select: 0x95c3288: f32 = fsqrt 0x95c0190 [ORD=9] [ID=18]
  0x95c0190: f32 = fadd 0x95bef30, 0x95c4d00 [ORD=8] [ID=17]
    0x95bef30: f32 = fmul 0x95c4988, 0x95c4988 [ORD=5] [ID=16]
...

There was problem with selecting sqrt instruction in LLVM backend.

To fix the issue changes are made in TableGen definition for sqrt instruction in MipsInstrFPU.td and new test file sqrt.ll is added to LLVM regression tests.

Patch by Zlatko Buljan

Reviewers: zoran.jovanovic, hvarga, dsanders

Subscribers: llvm-commits, petarj

Differential Revision: http://reviews.llvm.org/D13235

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249416 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert r249123 - [mips][microMIPS] Fix an issue with selecting sqrt instruction in...
Daniel Sanders [Tue, 6 Oct 2015 15:13:16 +0000 (15:13 +0000)]
Revert r249123 - [mips][microMIPS] Fix an issue with selecting sqrt instruction in LLVM backend

The author was not credited and most of the commit message is missing. Will re-commit with this fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249415 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[EarlyCSE] Constify ParseMemoryInst methods (NFC).
Arnaud A. de Grandmaison [Tue, 6 Oct 2015 13:35:30 +0000 (13:35 +0000)]
[EarlyCSE] Constify ParseMemoryInst methods (NFC).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249400 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake sure the CastInst is valid before trying to create it
Filipe Cabecinhas [Tue, 6 Oct 2015 12:37:54 +0000 (12:37 +0000)]
Make sure the CastInst is valid before trying to create it

Bug found with afl-fuzz.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249396 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[InstCombine] Teach SimplifyDemandedVectorElts how to handle ConstantVector select...
Andrea Di Biagio [Tue, 6 Oct 2015 10:34:53 +0000 (10:34 +0000)]
[InstCombine] Teach SimplifyDemandedVectorElts how to handle ConstantVector select masks with ConstantExpr elements (PR24922)

If the mask of a select instruction is a ConstantVector, method
SimplifyDemandedVectorElts iterates over the mask elements to identify which
values are selected from the select inputs.

Before this patch, method SimplifyDemandedVectorElts always used method
Constant::isNullValue() to check if a value in the mask was zero. Unfortunately
that method always returns false when called on a ConstantExpr.

This patch fixes the problem in SimplifyDemandedVectorElts by adding an explicit
check for ConstantExpr values. Now, if a value in the mask is a ConstantExpr, we
avoid calling isNullValue() on it.

Fixes PR24922.

Differential Revision: http://reviews.llvm.org/D13219

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249390 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][disassembler] Changed CHECK-EB directives to CHECK so div/divu are tested.
Daniel Sanders [Tue, 6 Oct 2015 10:08:14 +0000 (10:08 +0000)]
[mips][disassembler] Changed CHECK-EB directives to CHECK so div/divu are tested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249386 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][disassembler] Merged disassembler tests into the corresponding ISA/ASE subdire...
Daniel Sanders [Tue, 6 Oct 2015 10:02:35 +0000 (10:02 +0000)]
[mips][disassembler] Merged disassembler tests into the corresponding ISA/ASE subdirectories.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249384 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][disassembler] Moved DSP tests into proper place and corrected formatting.
Daniel Sanders [Tue, 6 Oct 2015 09:28:48 +0000 (09:28 +0000)]
[mips][disassembler] Moved DSP tests into proper place and corrected formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249383 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[TwoAddressInstructionPass] When looking for a 3 addr conversion after commuting...
Craig Topper [Tue, 6 Oct 2015 05:39:59 +0000 (05:39 +0000)]
[TwoAddressInstructionPass] When looking for a 3 addr conversion after commuting, make sure regB has been updated to take into account the commute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249378 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[bpf] Avoid extra pointer arithmetic for stack access
Alexei Starovoitov [Tue, 6 Oct 2015 04:00:53 +0000 (04:00 +0000)]
[bpf] Avoid extra pointer arithmetic for stack access

For the program like below
struct key_t {
  int pid;
  char name[16];
};
extern void test1(char *);
int test() {
  struct key_t key = {};
  test1(key.name);
  return 0;
}
For key.name, the llc/bpf may generate the below code:
  R1 = R10  // R10 is the frame pointer
  R1 += -24 // framepointer adjustment
  R1 |= 4   // R1 is then used as the first parameter of test1
OR operation is not recognized by in-kernel verifier.

This patch introduces an intermediate FI_ri instruction and
generates the following code that can be properly verified:
  R1 = R10
  R1 += -20

Patch by Yonghong Song <yhs@plumgrid.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249371 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Teach constant hoisting that ANDs with 64-bit immediates in the range 0x8000000...
Craig Topper [Tue, 6 Oct 2015 02:50:24 +0000 (02:50 +0000)]
[X86] Teach constant hoisting that ANDs with 64-bit immediates in the range 0x80000000-0xffffffff can be handled cheaply and don't need to be hoisted.

Most importantly, this keeps constant hoisting from preventing instruction selections ability to turn an AND with 0xffffffff into a move into a 32-bit subregister.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249370 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Remove unnecessary AddComplexity directive. The instruction is already wrapped...
Craig Topper [Tue, 6 Oct 2015 02:50:21 +0000 (02:50 +0000)]
[X86] Remove unnecessary AddComplexity directive. The instruction is already wrapped in the equivalent earlier. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249369 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WebAssembly] Switch to a more traditional assembly syntax
Dan Gohman [Tue, 6 Oct 2015 00:27:55 +0000 (00:27 +0000)]
[WebAssembly] Switch to a more traditional assembly syntax

This new syntax is built around putting each instruction on its own line
in a "mnemonic op, op, op" like syntax. It also uses conventional data
section directives like ".byte" and so on rather than requiring everything
to be in hierarchical S-expression format. This is a more natural syntax
for a ".s" file format from the perspective of LLVM MC and related tools,
while remaining easy to translate into other forms as needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249364 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agodsymutil: Don't prune forward declarations inside of an imported TAG_module
Adrian Prantl [Mon, 5 Oct 2015 23:11:20 +0000 (23:11 +0000)]
dsymutil: Don't prune forward declarations inside of an imported TAG_module
if there exists not definition for the type.
For this to work, we need to clone the imported modules before building
the decl context chains of the DIEs in the non-skeleton CUs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249362 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMove helper classes into an anonymous namespace. NFC.
Benjamin Kramer [Mon, 5 Oct 2015 21:20:26 +0000 (21:20 +0000)]
Move helper classes into an anonymous namespace. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249356 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove AutoFDO profile handling for GCC's LIPO. NFC.
Diego Novillo [Mon, 5 Oct 2015 21:08:05 +0000 (21:08 +0000)]
Remove AutoFDO profile handling for GCC's LIPO. NFC.

Given the work we are doing on ThinLTO, we will never need to support
module groups and working sets in GCC's implementation of LIPO. These
are currently dead code, and will continue to be so.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249351 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Update CATCHRET's operand to match its successor
David Majnemer [Mon, 5 Oct 2015 20:09:16 +0000 (20:09 +0000)]
[WinEH] Update CATCHRET's operand to match its successor

The CATCHRET operand did not match the MachineFunction's CFG.  This
mismatch happened because FrameLowering created a new MachineBasicBlock
and updated the CFG but forgot to update the CATCHRET operand.

Let's make sure this doesn't happen again by strengthing the funclet
membership analysis: it can now reason about the membership of all basic
blocks, not just those inside of funclets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249344 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSimplify code. No functionality change.
Jakub Staszak [Mon, 5 Oct 2015 18:53:30 +0000 (18:53 +0000)]
Simplify code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249335 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReleaseNotes: note the new Windows version requirement
Hans Wennborg [Mon, 5 Oct 2015 18:38:49 +0000 (18:38 +0000)]
ReleaseNotes: note the new Windows version requirement

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249332 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[msan] Correct a typo in poison stack pattern command line description.
Evgeniy Stepanov [Mon, 5 Oct 2015 18:01:17 +0000 (18:01 +0000)]
[msan] Correct a typo in poison stack pattern command line description.

Patch by Jon Eyolfson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249331 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU/SI: Add a helper for creating aliases for the _e32 instructions
Tom Stellard [Mon, 5 Oct 2015 17:57:39 +0000 (17:57 +0000)]
AMDGPU/SI: Add a helper for creating aliases for the _e32 instructions

Summary:
We are currently only using these aliases for VOPC instructions,
but this helper will make it easier to use them everywhere.

These aliases allow for the automatic matching of instructions
with forced 32-bit encoding.  Eventually, we should be able to remove
the custom C++ logic we have for this in the assembler.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

Differential Revision: http://reviews.llvm.org/D13396

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249330 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMergeFunctions: Clear GlobalNumbers ValueMap
Arnold Schwaighofer [Mon, 5 Oct 2015 17:26:36 +0000 (17:26 +0000)]
MergeFunctions: Clear GlobalNumbers ValueMap

Otherwise, the map will observe changes as long as MergeFunctions is alive. This
is bad because follow-up passes could replace-all-uses-with on the key of an
entry in the map. The value handle callback of ValueMap however asserts that the
key type matches.

rdar://22971893

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249327 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] Modify codegen for memcpy intrinsic to prefer LDM/STM.
Scott Douglass [Mon, 5 Oct 2015 14:49:54 +0000 (14:49 +0000)]
[ARM] Modify codegen for memcpy intrinsic to prefer LDM/STM.

We were previously codegen'ing memcpy as regular load/store operations and
hoping that the register allocator would allocate registers in ascending order
so that we could apply an LDM/STM combine after register allocation. According
to the commit that first introduced this code (r37179), we planned to teach the
register allocator to allocate the registers in ascending order. This never got
implemented, and up to now we've been stuck with very poor codegen.

A much simpler approach for achieving better codegen is to create MEMCPY pseudo
instructions, attach scratch virtual registers to them and then, post register
allocation, expand the MEMCPYs into LDM/STM pairs using the scratch registers.
The register allocator will have picked arbitrary registers which we sort when
expanding the MEMCPY. This approach also avoids the need to repeatedly calculate
offsets which ultimately ought to be eliminated pre-RA in order to decrease
register pressure.

Fixes PR9199 and PR23768.

[This is based on Peter Collingbourne's r238473 which was reverted.]

Differential Revision: http://reviews.llvm.org/D13239

Change-Id: I727543c2e94136e0f80b8e22d5642d7b9ee5b458
Author: Peter Collingbourne <peter@pcc.me.uk>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249322 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake test resilient against windows path separators.
Benjamin Kramer [Mon, 5 Oct 2015 14:15:13 +0000 (14:15 +0000)]
Make test resilient against windows path separators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249320 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][microMIPS] Implement JALRC16, JRCADDIUSP and JRC16 instructions
Zoran Jovanovic [Mon, 5 Oct 2015 14:00:09 +0000 (14:00 +0000)]
[mips][microMIPS] Implement JALRC16, JRCADDIUSP and JRC16 instructions
Differential Revision: http://reviews.llvm.org/D11219

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249317 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MC layer][AArch64] llvm-mc accepts 4-bit immediate values for
Alexandros Lamprineas [Mon, 5 Oct 2015 13:42:31 +0000 (13:42 +0000)]
[MC layer][AArch64] llvm-mc accepts 4-bit immediate values for
"msr pan, #imm", while only 1-bit immediate values should be valid.
Changed encoding and decoding for msr pstate instructions.

Differential Revision: http://reviews.llvm.org/D13011

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249313 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] Changed the way symbols are handled in dla and la instructions to allow simple...
Daniel Sanders [Mon, 5 Oct 2015 13:19:29 +0000 (13:19 +0000)]
[mips] Changed the way symbols are handled in dla and la instructions to allow simple expressions.

Summary:
An instruction like "(d)la $5, symbol+8" previously would have crashed the
assembler as it contains an expression. This is now fixed.
A few tests cases have also been changed to reflect these changes, however
these should only be syntax changes. Some new test cases have also been
added.

Patch by Scott Egerton.

Reviewers: vkalintiris, dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12760

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249311 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Support] Add a version of fs::make_absolute with a custom CWD.
Benjamin Kramer [Mon, 5 Oct 2015 13:02:43 +0000 (13:02 +0000)]
[Support] Add a version of fs::make_absolute with a custom CWD.

This will be used soon from clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249309 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdded missing test for [ARM] AttributeParser. Check that build attribute
Alexandros Lamprineas [Mon, 5 Oct 2015 12:13:29 +0000 (12:13 +0000)]
Added missing test for [ARM] AttributeParser. Check that build attribute
Tag_Advanced_SIMD_arch is set correctly when targeting v8.1-a NEON.

Differential Revision: http://reviews.llvm.org/D13281

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249304 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix pr24486.
Rafael Espindola [Mon, 5 Oct 2015 12:07:05 +0000 (12:07 +0000)]
Fix pr24486.

This extends the work done in r233995 so that now getFragment (in addition to
getSection) also works for variable symbols.

With that the existing logic to decide if a-b can be computed works even if
a or b are variables. Given that, the expression evaluation can avoid expanding
variables as aggressively and that in turn lets the relocation code see the
original variable.

In order for this to work with the asm streamer, there is now a dummy fragment
per section. It is used to assign a section to a symbol when no other fragment
exists.

This patch is a joint work by Maxim Ostapenko andy myself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249303 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReformat partially.
NAKAMURA Takumi [Mon, 5 Oct 2015 04:46:30 +0000 (04:46 +0000)]
Reformat partially.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249288 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReformat 3 files in llvm/include/llvm/CodeGen/.
NAKAMURA Takumi [Mon, 5 Oct 2015 04:44:18 +0000 (04:44 +0000)]
Reformat 3 files in llvm/include/llvm/CodeGen/.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249287 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTrailing whitespaces.
NAKAMURA Takumi [Mon, 5 Oct 2015 04:44:08 +0000 (04:44 +0000)]
Trailing whitespaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249286 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPrune trailing whitespaces in comment lines.
NAKAMURA Takumi [Mon, 5 Oct 2015 04:43:57 +0000 (04:43 +0000)]
Prune trailing whitespaces in comment lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249285 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReformat blank lines.
NAKAMURA Takumi [Mon, 5 Oct 2015 04:43:48 +0000 (04:43 +0000)]
Reformat blank lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249284 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SelectionDAGBuilder] Remove dead code
David Majnemer [Sun, 4 Oct 2015 18:44:47 +0000 (18:44 +0000)]
[SelectionDAGBuilder] Remove dead code

We already check for LandingPadInst two lines above.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249280 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unused private field introduced by r249270.
Teresa Johnson [Sun, 4 Oct 2015 15:00:55 +0000 (15:00 +0000)]
Remove unused private field introduced by r249270.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249277 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSupport for function summary index bitcode sections and files.
Teresa Johnson [Sun, 4 Oct 2015 14:33:43 +0000 (14:33 +0000)]
Support for function summary index bitcode sections and files.

Summary:
The bitcode format is described in this document:
  https://drive.google.com/file/d/0B036uwnWM6RWdnBLakxmeDdOeXc/view
For more info on ThinLTO see:
  https://sites.google.com/site/llvmthinlto

The first customer is ThinLTO, however the data structures are designed
and named more generally based on prior feedback. There are a few
comments regarding how certain interfaces are used by ThinLTO, and the
options added here to gold currently have ThinLTO-specific names as the
behavior they provoke is currently ThinLTO-specific.

This patch includes support for generating per-module function indexes,
the combined index file via the gold plugin, and several tests
(more are included with the associated clang patch D11908).

Reviewers: dexonsmith, davidxl, joker.eph

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D13107

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249270 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][SSE4A] Added shuffle decode tests for 'special case' SSE4A EXTRQI/INSERTQI...
Simon Pilgrim [Sun, 4 Oct 2015 10:12:53 +0000 (10:12 +0000)]
[X86][SSE4A] Added shuffle decode tests for 'special case' SSE4A EXTRQI/INSERTQI ops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249263 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SPARCv9] Add support for the rdpr/wrpr instructions.
Joerg Sonnenberger [Sun, 4 Oct 2015 09:11:22 +0000 (09:11 +0000)]
[SPARCv9] Add support for the rdpr/wrpr instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249262 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAVX512: Implemented encoding and intrinsics for VPERMILPS/PD instructions.
Igor Breger [Sun, 4 Oct 2015 07:20:41 +0000 (07:20 +0000)]
AVX512: Implemented encoding and intrinsics for VPERMILPS/PD instructions.
Added tests for intrinsics and encoding.

Differential Revision: http://reviews.llvm.org/D12690

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249261 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Permit branch folding in the face of funclets
David Majnemer [Sun, 4 Oct 2015 02:22:52 +0000 (02:22 +0000)]
[WinEH] Permit branch folding in the face of funclets

Track which basic blocks belong to which funclets.  Permit branch
folding to fire but only if it can prove that doing so will not cause
code in one funclet to be reused in another.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249257 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix typo in README
Jeroen Ketema [Sun, 4 Oct 2015 00:46:16 +0000 (00:46 +0000)]
Fix typo in README

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249253 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[DAGCombiner] Generalize FADD constant combines to work with vectors
Simon Pilgrim [Sat, 3 Oct 2015 22:06:06 +0000 (22:06 +0000)]
[DAGCombiner] Generalize FADD constant combines to work with vectors

Updated the FADD combines to work with vectors as well as scalars.

Differential Revision: http://reviews.llvm.org/D13416

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249251 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoadd test cases that demonstrate bad behavior
Sanjay Patel [Sat, 3 Oct 2015 20:52:55 +0000 (20:52 +0000)]
add test cases that demonstrate bad behavior

These are based on PR25016 and likely caused by a bug in
MachineCombiner's definition of improvesCriticalPathLen().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249249 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoinclude equal sign in debug equations; NFC
Sanjay Patel [Sat, 3 Oct 2015 20:45:01 +0000 (20:45 +0000)]
include equal sign in debug equations; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249248 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[llvm-size] Attempt to fix a test failure on Windows.
Davide Italiano [Sat, 3 Oct 2015 20:20:28 +0000 (20:20 +0000)]
[llvm-size] Attempt to fix a test failure on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249247 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[llvm-size] Fix time to check if time of use bug.
Davide Italiano [Sat, 3 Oct 2015 19:44:06 +0000 (19:44 +0000)]
[llvm-size] Fix time to check if time of use bug.

This was the last tool relying on this pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249244 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Lower SEXTLOAD using SIGN_EXTEND_VECTOR_INREG. NCI.
Simon Pilgrim [Sat, 3 Oct 2015 18:55:43 +0000 (18:55 +0000)]
[X86] Lower SEXTLOAD using SIGN_EXTEND_VECTOR_INREG. NCI.

The custom lowering in LowerExtendedLoad is doing the equivalent shuffle, so make use of existing lowering code to reduce duplication.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249243 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unnecessary includes.
Rafael Espindola [Sat, 3 Oct 2015 18:38:50 +0000 (18:38 +0000)]
Remove unnecessary includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249242 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMove registerSection out of line and reduce #includes. NFC.
Rafael Espindola [Sat, 3 Oct 2015 18:28:40 +0000 (18:28 +0000)]
Move registerSection out of line and reduce #includes. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249241 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][SSE] Add FADD combine tests.
Simon Pilgrim [Sat, 3 Oct 2015 18:17:43 +0000 (18:17 +0000)]
[X86][SSE] Add FADD combine tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249240 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[DAGCombiner] Merge SIGN_EXTEND_INREG vector constant folding methods. NCI.
Simon Pilgrim [Sat, 3 Oct 2015 16:26:52 +0000 (16:26 +0000)]
[DAGCombiner] Merge SIGN_EXTEND_INREG vector constant folding methods. NCI.

visitSIGN_EXTEND_INREG calls SelectionDAG::getNode to constant fold scalar constants but handles vector constants itself, despite getNode being capable of dealing with them.

This required a minor change to the getNode implementation to actually deal with cases where the scalars of a BUILD_VECTOR were wider integers than the vector type - which was the only extra ability of the visitSIGN_EXTEND_INREG implementation.

No codegen intended and all existing tests remain the same.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249236 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[libFuzzer] trying to fix at-exit hang
Kostya Serebryany [Sat, 3 Oct 2015 07:02:05 +0000 (07:02 +0000)]
[libFuzzer] trying to fix at-exit hang

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249231 91177308-0d34-0410-b5e6-96231b3b80d8