OSDN Git Service

android-x86/external-llvm.git
7 years ago[ARM GlobalISel] Remove hand-written G_FADD selection
Diana Picus [Tue, 9 May 2017 08:32:42 +0000 (08:32 +0000)]
[ARM GlobalISel] Remove hand-written G_FADD selection

Remove the code selecting G_FADD - now that TableGen can handle more
opcodes, it's not needed anymore.

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

7 years ago[ConstantRange] Rewrite shl to avoid repeated calls to getUnsignedMax and avoid creat...
Craig Topper [Tue, 9 May 2017 07:04:04 +0000 (07:04 +0000)]
[ConstantRange] Rewrite shl to avoid repeated calls to getUnsignedMax and avoid creating the min APInt until we're sure we need it. Use inplace shift operations.

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

7 years ago[ConstantRange] Combine the two adds max+1 in lshr into a single addition.
Craig Topper [Tue, 9 May 2017 07:04:02 +0000 (07:04 +0000)]
[ConstantRange] Combine the two adds max+1 in lshr into a single addition.

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

7 years ago[ConstantRange] Use APInt::isNullValue in place of comparing with 0. The compiler...
Craig Topper [Tue, 9 May 2017 05:01:29 +0000 (05:01 +0000)]
[ConstantRange] Use APInt::isNullValue in place of comparing with 0. The compiler should be able to generate slightly better code for the former. NFC

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

7 years agoRevert "Don't add DBG_VALUE instructions for static allocas in dbg.declare"
Reid Kleckner [Tue, 9 May 2017 01:57:44 +0000 (01:57 +0000)]
Revert "Don't add DBG_VALUE instructions for static allocas in dbg.declare"

This reverts commit r302461.

It appears to be causing failures compiling gtest with debug info on the
Linux sanitizer bot. I was unable to reproduce the failure locally,
however.

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

7 years agoFix code section prefix for proper layout
Teresa Johnson [Tue, 9 May 2017 01:43:24 +0000 (01:43 +0000)]
Fix code section prefix for proper layout

Summary:
r284533 added hot and cold section prefixes based on profile
information, to enable grouping of hot/cold functions at link time.
However, it used "cold" as the prefix for cold sections, but gold only
recognizes "unlikely" (which is used by gcc for cold sections).
Therefore, cold sections were not properly being grouped. Switch to
using "unlikely"

Reviewers: danielcdh, davidxl

Subscribers: llvm-commits

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

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

7 years agoRevert "Revert "CMake: Move sphinx detection into AddSphinxTarget.cmake""
Tom Stellard [Tue, 9 May 2017 01:41:28 +0000 (01:41 +0000)]
Revert "Revert "CMake: Move sphinx detection into AddSphinxTarget.cmake""

This reverts commit r302054.

Re-commit now that I have fixes for clang/lld.

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

7 years ago[libFuzzer] update docs on -print_coverage/-dump_coverage
Kostya Serebryany [Tue, 9 May 2017 01:34:27 +0000 (01:34 +0000)]
[libFuzzer] update docs on -print_coverage/-dump_coverage

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

7 years ago[libFuzzer] make sure the input data is not overwritten in the fuzz target (if it...
Kostya Serebryany [Tue, 9 May 2017 01:17:29 +0000 (01:17 +0000)]
[libFuzzer] make sure the input data is not overwritten in the fuzz target (if it is -- report an error)

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

7 years agoRevert "Use the frame index side table for byval and inalloca arguments"
Reid Kleckner [Tue, 9 May 2017 01:14:39 +0000 (01:14 +0000)]
Revert "Use the frame index side table for byval and inalloca arguments"

This reverts r302483 and it's follow up fix.

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

7 years ago[APInt] Use default constructor instead of explicitly creating a 1-bit APInt in udiv...
Craig Topper [Mon, 8 May 2017 23:49:54 +0000 (23:49 +0000)]
[APInt] Use default constructor instead of explicitly creating a 1-bit APInt in udiv and urem. NFC

The default constructor does the same thing.

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

7 years ago[APInt] Remove 'else' after 'return' in udiv and urem. NFC
Craig Topper [Mon, 8 May 2017 23:49:49 +0000 (23:49 +0000)]
[APInt] Remove 'else' after 'return' in udiv and urem. NFC

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

7 years agoIgnore !associated metadata with null argument.
Evgeniy Stepanov [Mon, 8 May 2017 23:46:20 +0000 (23:46 +0000)]
Ignore !associated metadata with null argument.

Fixes PR32577 (comment 10).
Such metadata may legitimately appear in LTO.

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

7 years agoRelax Dwarf filecheck test for 32-bit hosts
Reid Kleckner [Mon, 8 May 2017 23:27:52 +0000 (23:27 +0000)]
Relax Dwarf filecheck test for 32-bit hosts

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

7 years agoUse the frame index side table for byval and inalloca arguments
Reid Kleckner [Mon, 8 May 2017 23:20:27 +0000 (23:20 +0000)]
Use the frame index side table for byval and inalloca arguments

Summary:
For inalloca functions, this is a very common code pattern:

  %argpack = type <{ i32, i32, i32 }>
  define void @f(%argpack* inalloca %args) {
  entry:
    %a = getelementptr inbounds %argpack, %argpack* %args, i32 0, i32 0
    %b = getelementptr inbounds %argpack, %argpack* %args, i32 0, i32 1
    %c = getelementptr inbounds %argpack, %argpack* %args, i32 0, i32 2
    tail call void @llvm.dbg.declare(metadata i32* %a, ... "a")
    tail call void @llvm.dbg.declare(metadata i32* %c, ... "b")
    tail call void @llvm.dbg.declare(metadata i32* %b, ... "c")

Even though these GEPs can be simplified to a constant offset from EBP
or RSP, we don't do that at -O0, and each GEP is computed into a
register. Registers used to compute argument addresses are typically
spilled and clobbered very quickly after the initial computation, so
live debug variable tracking loses information very quickly if we use
DBG_VALUE instructions.

This change moves processing of dbg.declare between argument lowering
and basic block isel, so that we can ask if an argument has a frame
index or not. If the argument lives in a register as is the case for
byval arguments on some targets, then we don't put it in the side table
and during ISel we emit DBG_VALUE instructions.

Reviewers: aprantl

Subscribers: llvm-commits

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

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

7 years agoAdd basic test case for -instnamer
Sanjoy Das [Mon, 8 May 2017 23:18:46 +0000 (23:18 +0000)]
Add basic test case for -instnamer

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

7 years ago[InstNamer] Use range-for
Sanjoy Das [Mon, 8 May 2017 23:18:43 +0000 (23:18 +0000)]
[InstNamer] Use range-for

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

7 years ago[InstNamer] Don't check type of arguments (they're never void)
Sanjoy Das [Mon, 8 May 2017 23:18:39 +0000 (23:18 +0000)]
[InstNamer] Don't check type of arguments (they're never void)

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

7 years agoDelete trailing whitespace
Sanjoy Das [Mon, 8 May 2017 23:18:36 +0000 (23:18 +0000)]
Delete trailing whitespace

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

7 years ago[InstCombine] add tests from D32285 to show current problems; NFC
Sanjay Patel [Mon, 8 May 2017 22:33:20 +0000 (22:33 +0000)]
[InstCombine] add tests from D32285 to show current problems; NFC

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

7 years agoAdd const to "DWARFDie &Die" in a few functions as they can't change the DWARFDie.
Greg Clayton [Mon, 8 May 2017 21:29:17 +0000 (21:29 +0000)]
Add const to "DWARFDie &Die" in a few functions as they can't change the DWARFDie.

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

7 years agoFix typo
Eugene Zemtsov [Mon, 8 May 2017 21:20:53 +0000 (21:20 +0000)]
Fix typo

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

7 years agoMake it illegal for two Functions to point to the same DISubprogram
Adrian Prantl [Mon, 8 May 2017 21:17:08 +0000 (21:17 +0000)]
Make it illegal for two Functions to point to the same DISubprogram

As recently discussed on llvm-dev [1], this patch makes it illegal for
two Functions to point to the same DISubprogram and updates
FunctionCloner to also clone the debug info of a function to conform
to the new requirement. To simplify the implementation it also factors
out the creation of inlineAt locations from the Inliner into a
general-purpose utility in DILocation.

[1] http://lists.llvm.org/pipermail/llvm-dev/2017-May/112661.html
<rdar://problem/31926379>

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

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

7 years agoSTLExtras: Fix enumerate() documentation
Matthias Braun [Mon, 8 May 2017 21:10:58 +0000 (21:10 +0000)]
STLExtras: Fix enumerate() documentation

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

7 years agoFix typo "veify" to "verify".
Greg Clayton [Mon, 8 May 2017 20:53:00 +0000 (20:53 +0000)]
Fix typo "veify" to "verify".

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

7 years ago[InstCombine] add folds for not-of-shift-right
Sanjay Patel [Mon, 8 May 2017 20:49:59 +0000 (20:49 +0000)]
[InstCombine] add folds for not-of-shift-right

This is another step towards getting rid of dyn_castNotVal,
so we can recommit:
https://reviews.llvm.org/rL300977

As the tests show, we were missing the lshr case for constants
and both ashr/lshr vector splat folds. The ashr case with constant
was being performed inefficiently in 2 steps. It's also possible
there was a latent bug in that case because we can't do that fold
if the constant is positive:
http://rise4fun.com/Alive/Bge

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

7 years ago[PartialInlining] Capture by reference rather than by value.
Davide Italiano [Mon, 8 May 2017 20:44:01 +0000 (20:44 +0000)]
[PartialInlining] Capture by reference rather than by value.

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

7 years agoARM: use divmod libcalls on embedded MachO platforms too.
Tim Northover [Mon, 8 May 2017 20:00:14 +0000 (20:00 +0000)]
ARM: use divmod libcalls on embedded MachO platforms too.

The separated libcalls are implemented in terms of __divmodsi4 and __udivmodsi4
anyway, so we should always use them if possible.

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

7 years agoDon't add DBG_VALUE instructions for static allocas in dbg.declare
Reid Kleckner [Mon, 8 May 2017 19:58:15 +0000 (19:58 +0000)]
Don't add DBG_VALUE instructions for static allocas in dbg.declare

Summary:
An llvm.dbg.declare of a static alloca is always added to the
MachineFunction dbg variable map, so these values are entirely
redundant. They survive all the way through codegen to be ignored by
DWARF emission.

Effectively revert r113967

Two bugpoint-reduced test cases from 2012 broke as a result of this
change. Despite my best efforts, I haven't been able to rewrite the test
case using dbg.value. I'm not too concerned about the lost coverage
because these were reduced from the test-suite, which we still run.

Reviewers: aprantl, dblaikie

Subscribers: llvm-commits

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

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

7 years agoAdd some useful helper methods / operators to TypeIndex.
Zachary Turner [Mon, 8 May 2017 19:46:37 +0000 (19:46 +0000)]
Add some useful helper methods / operators to TypeIndex.

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

7 years agoUpdate instructions for using the experimental monorepo
Reid Kleckner [Mon, 8 May 2017 19:45:57 +0000 (19:45 +0000)]
Update instructions for using the experimental monorepo

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

7 years ago[BitVector] Make find_prev member function const.
Zachary Turner [Mon, 8 May 2017 19:45:55 +0000 (19:45 +0000)]
[BitVector] Make find_prev member function const.

NFC.

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

7 years agoAdd a blurb to the release notes about the WeakVH -> WeakTrackingVH transition
Sanjoy Das [Mon, 8 May 2017 19:15:06 +0000 (19:15 +0000)]
Add a blurb to the release notes about the WeakVH -> WeakTrackingVH transition

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

7 years ago[CodeView] Add support for random access type visitors.
Zachary Turner [Mon, 8 May 2017 18:38:43 +0000 (18:38 +0000)]
[CodeView] Add support for random access type visitors.

Previously type visitation was done strictly sequentially, and
TypeIndexes were computed by incrementing the TypeIndex of the
last visited record.  This works fine for situations like dumping,
but not when you want to visit types in random order.  For example,
in a debug session someone might lookup a symbol by name, find that
it has TypeIndex 10,000 and then want to go straight to TypeIndex
10,000.

In order to make this work, the visitation framework needs a mode
where it can plumb TypeIndices through the callback pipeline.  This
patch adds such a mode.  In doing so, it is necessary to provide
an alternative implementation of TypeDatabase that supports random
access, so that is done as well.

Nothing actually uses these random access capabilities yet, but
this will be done in subsequent patches.

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

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

7 years ago[AArch64][RegisterBankInfo] Change the default mapping of fp loads.
Quentin Colombet [Mon, 8 May 2017 18:16:31 +0000 (18:16 +0000)]
[AArch64][RegisterBankInfo] Change the default mapping of fp loads.

This fixes PR32550, in a way that does not imply running the greedy
mode at O0.

The fix consists in checking if a load is used by any floating point
instruction and if yes, we return a default mapping with FPR instead
of GPR.

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

7 years ago[AArch64][RegisterBankInfo] Fix mapping cost for GPR.
Quentin Colombet [Mon, 8 May 2017 18:16:23 +0000 (18:16 +0000)]
[AArch64][RegisterBankInfo] Fix mapping cost for GPR.

In r292478, we changed the order of the enum that is referenced by
PMI_FirstXXX. This had the side effect of changing the cost of the
mapping of all the loads, instead of just the FPRs ones.

Reinstate the higher cost for all but GPR loads.
Note: This did not have any external visible effects:
- For Fast mode, the cost would have been higher, but we don't care
  because we don't try to use alternative mappings.
- For Greedy mode, the higher cost of the GPR loads, would have
  triggered the use of the supposedly alternative mapping, that
  would be in fact the same GPR mapping but with a lower cost.

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

7 years ago[InstCombine] move/add tests for not(shr (not X), Y); NFC
Sanjay Patel [Mon, 8 May 2017 18:16:04 +0000 (18:16 +0000)]
[InstCombine] move/add tests for not(shr (not X), Y); NFC

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

7 years ago[ARM] Use a Changed flag to avoid making a pass's return value dependent on a compare...
Craig Topper [Mon, 8 May 2017 18:02:51 +0000 (18:02 +0000)]
[ARM] Use a Changed flag to avoid making a pass's return value dependent on a compare with a Statistic object.

Statistic compile to always be 0 in release build so this compare would always return false. And in the debug builds Statistic are global variables and remember their values across pass runs. So this compare returns true anytime the pass runs after the first time it modifies something.

This was found after reviewing all usages of comparison operators on a Statistic object. We had some internal code that did a compare with a statistic that caused a mismatch in output between debug and release builds. So we did an audit out of paranoia.

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

7 years ago[SCEV] Make setRange take ConstantRange by value instead of rvalue reference so we...
Craig Topper [Mon, 8 May 2017 17:39:08 +0000 (17:39 +0000)]
[SCEV] Make setRange take ConstantRange by value instead of rvalue reference so we don't force anything on the caller.

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

7 years ago[SCEV] Don't use std::move on both inputs to APInt::operator+ or operator-. It might...
Craig Topper [Mon, 8 May 2017 17:39:01 +0000 (17:39 +0000)]
[SCEV] Don't use std::move on both inputs to APInt::operator+ or operator-. It might be confusing to the reader. NFC

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

7 years agoConstantFold: Handle gep nonnull, undef as well
Daniel Berlin [Mon, 8 May 2017 17:37:33 +0000 (17:37 +0000)]
ConstantFold: Handle gep nonnull, undef as well

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

7 years agoConstantFold: Fold getelementptr (i32, i32* null, i64 undef) to null.
Daniel Berlin [Mon, 8 May 2017 17:37:29 +0000 (17:37 +0000)]
ConstantFold: Fold  getelementptr (i32, i32* null, i64 undef) to null.
Transforms/IndVarSimplify/2011-10-27-lftrnull will fail if this regresses.
Transforms/GVN/PRE/2011-06-01-NonLocalMemdepMiscompile.ll has been changed to still test what it was
trying to test.

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

7 years ago[ValueTracking] Use KnownOnes to provide a better bound on known zeros for ctlz/cttz...
Craig Topper [Mon, 8 May 2017 17:22:34 +0000 (17:22 +0000)]
[ValueTracking] Use KnownOnes to provide a better bound on known zeros for ctlz/cttz intrinics

This patch uses KnownOnes of the input of ctlz/cttz to bound the value that can be returned from these intrinsics. This makes these intrinsics more similar to the handling for ctpop which already uses known bits to produce a similar bound.

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

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

7 years ago[X86] Split test configurations. NFC.
Zvi Rackover [Mon, 8 May 2017 16:54:25 +0000 (16:54 +0000)]
[X86] Split test configurations. NFC.

Split test that includes reproducer for pr32967 to KNL and SKX.

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

7 years ago[InstSimplify] fix typo; NFC
Sanjay Patel [Mon, 8 May 2017 16:35:02 +0000 (16:35 +0000)]
[InstSimplify] fix typo; NFC

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

7 years ago[InstCombine] use local variable to reduce code duplication; NFCI
Sanjay Patel [Mon, 8 May 2017 16:33:42 +0000 (16:33 +0000)]
[InstCombine] use local variable to reduce code duplication; NFCI

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

7 years ago[ValueTracking] Introduce a version of computeKnownBits that returns a KnownBits...
Craig Topper [Mon, 8 May 2017 16:22:48 +0000 (16:22 +0000)]
[ValueTracking] Introduce a version of computeKnownBits that returns a KnownBits struct. Begin using it to replace internal usages of ComputeSignBit

This introduces a new interface for computeKnownBits that returns the KnownBits object instead of requiring it to be pre-constructed and passed in by reference.

This is a much more convenient interface as it doesn't require the caller to figure out the BitWidth to pre-construct the object. It's so convenient that I believe we can use this interface to remove the special ComputeSignBit flavor of computeKnownBits.

As a step towards that idea, this patch replaces all of the internal usages of ComputeSignBit with this new interface. As you can see from the patch there were a couple places where we called ComputeSignBit which really called computeKnownBits, and then called computeKnownBits again directly. I've reduced those places to only making one call to computeKnownBits. I bet there are probably external users that do it too.

A future patch will update the external users and remove the ComputeSignBit interface. I'll also working on moving more locations to the KnownBits returning interface for computeKnownBits.

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

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

7 years ago[InstCombine/InstSimplify] add comments about code duplication; NFC
Sanjay Patel [Mon, 8 May 2017 16:21:55 +0000 (16:21 +0000)]
[InstCombine/InstSimplify] add comments about code duplication; NFC

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

7 years ago[InstCombine] add another test for PR32949; NFC
Sanjay Patel [Mon, 8 May 2017 15:58:57 +0000 (15:58 +0000)]
[InstCombine] add another test for PR32949; NFC

A patch for the InstSimplify variant of this bug is up for review here:
https://reviews.llvm.org/D32954

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

7 years agoInstructionSimplify: Refactor foldIdentityShuffles. NFC.
Zvi Rackover [Mon, 8 May 2017 15:46:58 +0000 (15:46 +0000)]
InstructionSimplify: Refactor foldIdentityShuffles. NFC.

Summary:
Minor refactoring of foldIdentityShuffles() which allows the removal of a
ConstantDataVector::get() in SimplifyShuffleVectorInstruction.

Reviewers: spatel

Reviewed By: spatel

Subscribers: llvm-commits

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

Conflicts:
lib/Analysis/InstructionSimplify.cpp

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

7 years agoFix comment typos.
Geoff Berry [Mon, 8 May 2017 15:33:08 +0000 (15:33 +0000)]
Fix comment typos.

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

7 years agoAdding reproducer for pr32967. NFC.
Zvi Rackover [Mon, 8 May 2017 14:47:32 +0000 (14:47 +0000)]
Adding reproducer for pr32967. NFC.

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

7 years ago[X86][SSE] Improve combineLogicBlendIntoPBLENDV to use general masks.
Simon Pilgrim [Mon, 8 May 2017 14:16:39 +0000 (14:16 +0000)]
[X86][SSE] Improve combineLogicBlendIntoPBLENDV to use general masks.

Currently combineLogicBlendIntoPBLENDV can only match ASHR to detect sign splatting of a bit mask, this patch generalises this to use computeNumSignBits instead.

This is a first step in several things we can do to improve PBLENDV support:

 * Better matching of X86ISD::ANDNP patterns.
 * Handle floating point cases.
 * Better vector and bitcast support in computeNumSignBits.
 * Recognise that PBLENDV only uses the sign bit of the mask, we should be able strip away sign splats (ASHR, PCMPGT isNeg tests etc.).

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

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

7 years agoNormalize line endings. NFCI,
Simon Pilgrim [Mon, 8 May 2017 13:32:34 +0000 (13:32 +0000)]
Normalize line endings. NFCI,

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

7 years agoIR: Add a shufflevector mask commutation helper function. NFC.
Zvi Rackover [Mon, 8 May 2017 12:40:18 +0000 (12:40 +0000)]
IR: Add a shufflevector mask commutation helper function. NFC.

Summary:
Following up on Sanjay's suggetion in D32955, move this functionality
into ShuffleVectornstruction.

Reviewers: spatel, RKSimon

Reviewed By: RKSimon

Subscribers: llvm-commits

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

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

7 years ago[ARM][NEON] Add support for ISD::ABS lowering
Simon Pilgrim [Mon, 8 May 2017 10:37:34 +0000 (10:37 +0000)]
[ARM][NEON] Add support for ISD::ABS lowering

Update NEON int_arm_neon_vabs intrinsic to use the ISD::ABS opcode directly

Added constant folding tests.

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

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

7 years ago[ARM] Clear the constant pool cache on explicit .ltorg directives
Martin Storsjo [Mon, 8 May 2017 10:26:24 +0000 (10:26 +0000)]
[ARM] Clear the constant pool cache on explicit .ltorg directives

Multiple ldr pseudoinstructions with the same constant value will
reuse the same constant pool entry. However, if the constant pool
is explicitly flushed with a .ltorg directive, we should not try
to reference constants in the previous pool any longer, since they
may be out of range.

This fixes assembling hand-written assembler source which repeatedly
loads the same constant value, across a binary size larger than the
pc-relative fixup range for ldr instructions (4096 bytes). Such
assembler source already uses explicit .ltorg instructions to emit
constant pools with regular intervals. However if we try to reuse
constants emitted in earlier pools, they end up out of range.

This makes the output of the testcase match what binutils gas does
(prior to this patch, it would fail to assemble).

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

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

7 years ago[AARCH64][NEON] Add support for ISD::ABS lowering
Simon Pilgrim [Mon, 8 May 2017 10:25:18 +0000 (10:25 +0000)]
[AARCH64][NEON] Add support for ISD::ABS lowering

Update int_aarch64_neon_abs intrinsic to use the ISD::ABS opcode directly

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

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

7 years ago[GlobalISel][X86] G_GEP selection support.
Igor Breger [Mon, 8 May 2017 09:40:43 +0000 (09:40 +0000)]
[GlobalISel][X86] G_GEP selection support.

Summary: [GlobalISel][X86] G_GEP selection support.

Reviewers: zvi, guyblank

Reviewed By: guyblank

Subscribers: dberris, rovka, llvm-commits, kristof.beyls

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

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

7 years ago[GlobalISel][X86] G_MUL legalizer/selector support.
Igor Breger [Mon, 8 May 2017 09:03:37 +0000 (09:03 +0000)]
[GlobalISel][X86] G_MUL legalizer/selector support.

Summary:
G_MUL legalizer/selector/regbank support.
Use only Tablegen-erated instruction selection.
This patch dealing with legal operations only.

Reviewers: zvi, guyblank

Reviewed By: guyblank

Subscribers: krytarowski, rovka, kristof.beyls, llvm-commits

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

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

7 years ago[Lit] Fix to prevent creation of "%SystemDrive%" directory on Windows.
Andrew Ng [Mon, 8 May 2017 08:55:38 +0000 (08:55 +0000)]
[Lit] Fix to prevent creation of "%SystemDrive%" directory on Windows.

This patch propogates the environment variable SYSTEMDRIVE on Windows when
running the unit tests. This prevents the creation of a directory named
"%SystemDrive%" when running the unit tests from FileSystemTest that use the
function llvm::sys::fs::remove_directories which in turn uses SHFileOperationW.
It is within SHFileOperationW that this environment variable may be used and if
undefined causes the creation of a "%SystemDrive%" directory in the current
directory.

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

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

7 years ago[APInt] Modify tcMultiplyPart's overflow detection to not depend on 'i' from the...
Craig Topper [Mon, 8 May 2017 06:34:41 +0000 (06:34 +0000)]
[APInt] Modify tcMultiplyPart's overflow detection to not depend on 'i' from the earlier loop. NFC

The value of 'i' is always the smaller of DstParts and SrcParts so we can just use that fact to write all the code in terms of SrcParts and DstParts.

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

7 years ago[APInt] Use std::min instead of writing the same thing with the ternary operator...
Craig Topper [Mon, 8 May 2017 06:34:39 +0000 (06:34 +0000)]
[APInt] Use std::min instead of writing the same thing with the ternary operator. NFC

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

7 years ago[APInt] Remove 'else' after 'return' in tcMultiply methods. NFC
Craig Topper [Mon, 8 May 2017 06:34:36 +0000 (06:34 +0000)]
[APInt] Remove 'else' after 'return' in tcMultiply methods. NFC

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

7 years ago[XRay] Custom event logging intrinsic
Dean Michael Berris [Mon, 8 May 2017 05:45:21 +0000 (05:45 +0000)]
[XRay] Custom event logging intrinsic

This patch introduces an LLVM intrinsic and a target opcode for custom event
logging in XRay. Initially, its use case will be to allow users of XRay to log
some type of string ("poor man's printf"). The target opcode compiles to a noop
sled large enough to enable calling through to a runtime-determined relative
function call. At runtime, when X-Ray is enabled, the sled is replaced by
compiler-rt with a trampoline to the logic for creating the custom log entries.

Future patches will implement the compiler-rt parts and clang-side support for
emitting the IR corresponding to this intrinsic.

Reviewers: timshen, dberris

Subscribers: igorb, pelikan, rSerge, timshen, echristo, dberris, llvm-commits

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

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

7 years ago[SCEV] Use APInt::operator*=(uint64_t) to avoid a temporary APInt for a constant.
Craig Topper [Mon, 8 May 2017 04:55:13 +0000 (04:55 +0000)]
[SCEV] Use APInt::operator*=(uint64_t) to avoid a temporary APInt for a constant.

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

7 years ago[APInt] Take advantage of new operator*=(uint64_t) to remove a temporary APInt.
Craig Topper [Mon, 8 May 2017 04:55:12 +0000 (04:55 +0000)]
[APInt] Take advantage of new operator*=(uint64_t) to remove a temporary APInt.

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

7 years ago[APInt] Add support for multiplying by a uint64_t.
Craig Topper [Mon, 8 May 2017 04:55:09 +0000 (04:55 +0000)]
[APInt] Add support for multiplying by a uint64_t.

This makes multiply similar to add, sub, xor, and, and or.

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

7 years agoHopefully one last commit to fix this patch, addresses string reference
Eric Beckmann [Mon, 8 May 2017 02:47:42 +0000 (02:47 +0000)]
Hopefully one last commit to fix this patch, addresses string reference
issues.

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

7 years agoQuick fix to D32609, it seems .o files are not transferred in all cases.
Eric Beckmann [Mon, 8 May 2017 02:47:25 +0000 (02:47 +0000)]
Quick fix to D32609, it seems .o files are not transferred in all cases.

Therefore the .o file in question is renamed to .obj.coff.

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

7 years agoUpdate llvm-readobj -coff-resources to display tree structure.
Eric Beckmann [Mon, 8 May 2017 02:47:07 +0000 (02:47 +0000)]
Update llvm-readobj -coff-resources to display tree structure.

Summary: Continue making updates to llvm-readobj to display resource sections.  This is necessary for testing the up and coming cvtres tool.

Reviewers: zturner

Subscribers: llvm-commits

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

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

7 years ago[SCEV] Have getRangeForAffineARHelper take StartRange by const reference to avoid...
Craig Topper [Mon, 8 May 2017 02:29:15 +0000 (02:29 +0000)]
[SCEV] Have getRangeForAffineARHelper take StartRange by const reference to avoid a copy in many of the cases.

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

7 years agoRevert "Hopefully one last commit to fix this patch, addresses string reference"
Eric Beckmann [Mon, 8 May 2017 02:25:03 +0000 (02:25 +0000)]
Revert "Hopefully one last commit to fix this patch, addresses string reference"

Summary:
This reverts commit 56beec1b1cfc6d263e5eddb7efff06117c0724d2.

Revert "Quick fix to D32609, it seems .o files are not transferred in all cases."

This reverts commit 7652eecd29cfdeeab7f76f687586607a99ff4e36.

Revert "Update llvm-readobj -coff-resources to display tree structure."

This reverts commit 422b62c4d302cfc92401418c2acd165056081ed7.

Reviewers: zturner

Subscribers: llvm-commits

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

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

7 years agoHopefully one last commit to fix this patch, addresses string reference
Eric Beckmann [Mon, 8 May 2017 01:48:55 +0000 (01:48 +0000)]
Hopefully one last commit to fix this patch, addresses string reference
issues.

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

7 years agoQuick fix to D32609, it seems .o files are not transferred in all cases.
Eric Beckmann [Sun, 7 May 2017 23:31:14 +0000 (23:31 +0000)]
Quick fix to D32609, it seems .o files are not transferred in all cases.

Therefore the .o file in question is renamed to .obj.coff.

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

7 years agoUpdate llvm-readobj -coff-resources to display tree structure.
Eric Beckmann [Sun, 7 May 2017 22:47:22 +0000 (22:47 +0000)]
Update llvm-readobj -coff-resources to display tree structure.

Summary: Continue making updates to llvm-readobj to display resource sections.  This is necessary for testing the up and coming cvtres tool.

Reviewers: zturner

Subscribers: llvm-commits

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

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

7 years ago[ConstantRange][SimplifyCFG] Add a helper method to allow SimplifyCFG to determine...
Craig Topper [Sun, 7 May 2017 22:22:11 +0000 (22:22 +0000)]
[ConstantRange][SimplifyCFG] Add a helper method to allow SimplifyCFG to determine if a ConstantRange has more than 8 elements without requiring an allocation if the ConstantRange is 64-bits wide.

Previously SimplifyCFG used getSetSize which returns an APInt that is 1 bit wider than the ConstantRange's bit width. In the reasonably common case that the ConstantRange is 64-bits wide, this requires returning a 65-bit APInt. APInt's can only store 64-bits without a memory allocation so this is inefficient.

The new method takes the 8 as an input and tells if the range contains more than that many elements without requiring any wider math.

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

7 years ago[ConstantRange] Remove 'Of' from name of ConstantRange::isSizeStrictlySmallerThanOf...
Craig Topper [Sun, 7 May 2017 21:48:08 +0000 (21:48 +0000)]
[ConstantRange] Remove 'Of' from name of ConstantRange::isSizeStrictlySmallerThanOf so that it reads better. NFC

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

7 years ago[X86][AVX1] Improve 256-bit vector costs for integer unary intrinsics.
Simon Pilgrim [Sun, 7 May 2017 20:58:55 +0000 (20:58 +0000)]
[X86][AVX1] Improve 256-bit vector costs for integer unary intrinsics.

Account for subvector extraction/insertion, helps prevent the vectorizers from selecting 256-bit vectors that will have to be split anyhow on AVX1 targets.

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

7 years ago[Orc] Remove trailing whitespace.
Lang Hames [Sun, 7 May 2017 20:39:46 +0000 (20:39 +0000)]
[Orc] Remove trailing whitespace.

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

7 years ago[InstSimplify] add tests for PR32949 miscompile; NFC
Sanjay Patel [Sun, 7 May 2017 18:19:13 +0000 (18:19 +0000)]
[InstSimplify] add tests for PR32949 miscompile; NFC

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

7 years agoInstructionSimplify: Relanding r301766
Zvi Rackover [Sun, 7 May 2017 18:16:37 +0000 (18:16 +0000)]
InstructionSimplify: Relanding r301766

Summary:
Re-applying r301766 with a fix to a typo and a regression test.

The log message for r301766 was:
==================================================================================
    InstructionSimplify: Canonicalize shuffle operands. NFC-ish.

    Summary:
     Apply canonicalization rules:
        1. Input vectors with no elements selected from can be replaced with undef.
        2. If only one input vector is constant it shall be the second one.

    This allows constant-folding to cover more ad-hoc simplifications that
    were in place and avoid duplication for RHS and LHS checks.

    There are more rules we may want to add in the future when we see a
    justification. e.g. mask elements that select undef elements can be
    replaced with undef.
==================================================================================

Reviewers: spatel, RKSimon

Reviewed By: spatel

Subscribers: llvm-commits

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

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

7 years agoMake llvm-rtdlyd -check preserve automatic address mappings made by RuntimeDyld.
Lang Hames [Sun, 7 May 2017 17:19:53 +0000 (17:19 +0000)]
Make llvm-rtdlyd -check preserve automatic address mappings made by RuntimeDyld.

Currently llvm-rtdyld in -check mode will map sections to back-to-back 4k
aligned slabs starting at 0x1000. Automatically remapping sections by default is
helpful because it quickly exposes relocation bugs due to use of local addresses
rather than load addresses (these would silently pass if the load address was
not remapped). These mappings can be explicitly overridden on a per-section
basis using llvm-rtdlyd's -map-section option. This patch extends this scheme to
also preserve any mappings made by RuntimeDyld itself. Preserving RuntimeDyld's
automatic mappings allows us to write test cases to verify that these automatic
mappings have been applied.

This will allow the fix in https://reviews.llvm.org/D32899 to be tested with
llvm-rtdyld -check.

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

7 years ago[SCEV] Use move semantics in ScalarEvolution::setRange
Craig Topper [Sun, 7 May 2017 16:28:17 +0000 (16:28 +0000)]
[SCEV] Use move semantics in ScalarEvolution::setRange

Summary: This makes setRange take ConstantRange by rvalue reference since most callers were passing an unnamed temporary ConstantRange. We can then move that ConstantRange into the DenseMap caches. For the callers that weren't passing a temporary, I've added std::move to to the local variable being passed.

Reviewers: sanjoy, mzolotukhin, efriedma

Reviewed By: sanjoy

Subscribers: takuto.ikuta, llvm-commits

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

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

7 years ago[InstSimplify] use ConstantRange to simplify or-of-icmps
Sanjay Patel [Sun, 7 May 2017 15:11:40 +0000 (15:11 +0000)]
[InstSimplify] use ConstantRange to simplify or-of-icmps

We can simplify (or (icmp X, C1), (icmp X, C2)) to 'true' or one of the icmps in many cases.
I had to check some of these with Alive to prove to myself it's right, but everything seems
to check out. Eg, the deleted code in instcombine was completely ignoring predicates with
mismatched signedness.

This is a follow-up to:
https://reviews.llvm.org/rL301260
https://reviews.llvm.org/D32143

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

7 years ago[Kaleidoscope] toy.cpp use after move fix
Peter Szecsi [Sun, 7 May 2017 11:00:01 +0000 (11:00 +0000)]
[Kaleidoscope] toy.cpp use after move fix

The variable Proto is moved at the beginning of the codegen() function.
According to the comment above, the pointed object should be used due the
reference P.

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

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

7 years agoRemove unnecessary const_cast
Sanjoy Das [Sun, 7 May 2017 05:29:36 +0000 (05:29 +0000)]
Remove unnecessary const_cast

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

7 years agoUse array_pod_sort instead of std::sort
Sanjoy Das [Sun, 7 May 2017 05:29:34 +0000 (05:29 +0000)]
Use array_pod_sort instead of std::sort

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

7 years agoFix comment.
Lang Hames [Sun, 7 May 2017 03:54:53 +0000 (03:54 +0000)]
Fix comment.

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

7 years agoCOFF: add ARM64 relocation types
Saleem Abdulrasool [Sat, 6 May 2017 23:48:02 +0000 (23:48 +0000)]
COFF: add ARM64 relocation types

Add the ARM64 COFF relocation types.  This will be needed to add support
for the AArch64 Windows object file emission support.

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

7 years ago[X86][AVX512] Relax assertion and just exit combine for unsupported types (PR32907)
Simon Pilgrim [Sat, 6 May 2017 20:53:52 +0000 (20:53 +0000)]
[X86][AVX512] Relax assertion and just exit combine for unsupported types (PR32907)

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

7 years ago[X86][AVX512] Move v2i64/v4i64 VPABS lowering to tablegen
Simon Pilgrim [Sat, 6 May 2017 19:11:59 +0000 (19:11 +0000)]
[X86][AVX512] Move v2i64/v4i64 VPABS lowering to tablegen

Extend NoVLX targets to use the 512-bit versions

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

7 years ago[X86] Reduce code for setting operations actions by merging into loops across multipl...
Simon Pilgrim [Sat, 6 May 2017 18:17:56 +0000 (18:17 +0000)]
[X86] Reduce code for setting operations actions by merging into loops across multiple types/ops. NFCI.

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

7 years ago[NVPTX] Add support for ISD::ABS lowering
Simon Pilgrim [Sat, 6 May 2017 17:42:09 +0000 (17:42 +0000)]
[NVPTX] Add support for ISD::ABS lowering

Use the ISD::ABS opcode directly

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

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

7 years ago[X86][SSE] Break register dependencies on v16i8/v8i16 BUILD_VECTOR on SSE41
Simon Pilgrim [Sat, 6 May 2017 17:30:39 +0000 (17:30 +0000)]
[X86][SSE] Break register dependencies on v16i8/v8i16 BUILD_VECTOR on SSE41

rL294581 broke unnecessary register dependencies on partial v16i8/v8i16 BUILD_VECTORs, but on SSE41 we (currently) use insertion for full BUILD_VECTORs as well. By allowing full insertion to occur on SSE41 targets we can break register dependencies here as well.

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

7 years ago[Analysis] Print out unreachable loops
Brian Gesiak [Sat, 6 May 2017 16:22:53 +0000 (16:22 +0000)]
[Analysis] Print out unreachable loops

Summary:
When writing a loop pass I made a mistake and hit the assertion
"Unreachable block in loop". Later, I hit an assertion when I called
`BasicBlock::eraseFromParent()` incorrectly: "Use still stuck around
after Def is destroyed". This latter assertion, however, printed out
exactly which value is being deleted and what uses remain, which helped
me debug the issue.

To help people debugging their loop passes in the future, print out
exactly which basic block is unreachable in a loop.

Reviewers: sanjoy, hfinkel, mehdi_amini

Reviewed By: mehdi_amini

Subscribers: mzolotukhin

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

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

7 years ago[X86][AVX2] Add scheduling latency/throughput tests for some AVX2 instructions
Simon Pilgrim [Sat, 6 May 2017 13:46:09 +0000 (13:46 +0000)]
[X86][AVX2] Add scheduling latency/throughput tests for some AVX2 instructions

Many more to come...

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

7 years ago[DAGCombiner] If ISD::ABS is legal/custom, use it directly instead of canonicalizing...
Simon Pilgrim [Sat, 6 May 2017 13:44:42 +0000 (13:44 +0000)]
[DAGCombiner] If ISD::ABS is legal/custom, use it directly instead of canonicalizing first.

Remove an extra canonicalization step if ISD::ABS is going to be used anyway.

Updated x86 abs combine to check that we are lowering from both canonicalizations.

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

7 years ago[SCEV] Remove extra APInt copies from getRangeForAffineARHelper.
Craig Topper [Sat, 6 May 2017 06:03:07 +0000 (06:03 +0000)]
[SCEV] Remove extra APInt copies from getRangeForAffineARHelper.

This changes one parameter to be a const APInt& since we only read from it. Use std::move on local APInts once they are no longer needed so we can reuse their allocations. Lastly, use operator+=(uint64_t) instead of adding 1 to an APInt twice creating a new APInt each time.

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

7 years ago[SCEV] Use std::move to avoid some APInt copies.
Craig Topper [Sat, 6 May 2017 05:22:56 +0000 (05:22 +0000)]
[SCEV] Use std::move to avoid some APInt copies.

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