oota-llvm.git
8 years ago[X86][SSE] vector sext/zext tests - remove unnecessary mcpu arguments
Simon Pilgrim [Sun, 25 Oct 2015 12:15:00 +0000 (12:15 +0000)]
[X86][SSE] vector sext/zext tests - remove unnecessary mcpu arguments

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

8 years ago[X86][SSE] shift/rotate tests - remove unnecessary mcpu arguments and regenerate...
Simon Pilgrim [Sun, 25 Oct 2015 12:07:45 +0000 (12:07 +0000)]
[X86][SSE] shift/rotate tests - remove unnecessary mcpu arguments and regenerate/cleanup

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

8 years ago[X86] PMOV*X* tests - remove unnecessary mcpu arguments and regenerate
Simon Pilgrim [Sun, 25 Oct 2015 11:55:10 +0000 (11:55 +0000)]
[X86] PMOV*X* tests - remove unnecessary mcpu arguments and regenerate

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

8 years ago[X86] Stack folding tests - just use mtriple - no need for mcpu in these tests
Simon Pilgrim [Sun, 25 Oct 2015 11:42:46 +0000 (11:42 +0000)]
[X86] Stack folding tests - just use mtriple - no need for mcpu in these tests

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

8 years ago[X86] Use correct calling convention for MCU psABI libcalls
Michael Kuperstein [Sun, 25 Oct 2015 08:14:05 +0000 (08:14 +0000)]
[X86] Use correct calling convention for MCU psABI libcalls

When using the MCU psABI, compiler-generated library calls should pass
some parameters in-register. However, since inreg marking for x86 is currently
done by the front end, it will not be applied to backend-generated calls.

This is a workaround for PR3997, which describes a similar issue for -mregparm.

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

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

8 years ago[X86] Add support for elfiamcu triple
Michael Kuperstein [Sun, 25 Oct 2015 08:07:37 +0000 (08:07 +0000)]
[X86] Add support for elfiamcu triple

This adds support for the i?86-*-elfiamcu triple, which indicates the IAMCU psABI is used.

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

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

8 years agoRemove two unnecessary conversions from MVT to EVT. NFC
Craig Topper [Sun, 25 Oct 2015 03:15:29 +0000 (03:15 +0000)]
Remove two unnecessary conversions from MVT to EVT. NFC

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

8 years agoUse MVT::SimpleValueType instead of MVT in template parameter. NFC
Craig Topper [Sun, 25 Oct 2015 00:27:14 +0000 (00:27 +0000)]
Use MVT::SimpleValueType instead of MVT in template parameter. NFC

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

8 years agoSimplify boolean conditional return statements in tools/llvm-symbolizer.
Rafael Espindola [Sat, 24 Oct 2015 23:23:25 +0000 (23:23 +0000)]
Simplify boolean conditional return statements in tools/llvm-symbolizer.

Patch by Richard.

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

8 years agoSimplify boolean expressions in tools/llvm-objdump.
Rafael Espindola [Sat, 24 Oct 2015 23:19:10 +0000 (23:19 +0000)]
Simplify boolean expressions in tools/llvm-objdump.

Patch by Richard.

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

8 years agoRefactor: Simplify boolean conditional return statements in lib/CodeGen.
Rafael Espindola [Sat, 24 Oct 2015 23:11:13 +0000 (23:11 +0000)]
Refactor: Simplify boolean conditional return statements in lib/CodeGen.

Patch by Richard.

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

8 years ago[X86][SSE] Use lowerVectorShuffleWithUNPCK instead of custom matches.
Simon Pilgrim [Sat, 24 Oct 2015 22:45:04 +0000 (22:45 +0000)]
[X86][SSE] Use lowerVectorShuffleWithUNPCK instead of custom matches.

Most 128-bit and 256-bit shuffles were manually matching UNPCK patterns - use lowerVectorShuffleWithUNPCK to be more thorough.

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

8 years ago[Support] Add comment to explain why we can't drop NDEBUG.
Davide Italiano [Sat, 24 Oct 2015 22:15:32 +0000 (22:15 +0000)]
[Support] Add comment to explain why we can't drop NDEBUG.

Discussed with: Benjamin Kramer.

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

8 years ago[CodeGen] Get rid of NDEBUG to ensure structure stability.
Davide Italiano [Sat, 24 Oct 2015 22:09:54 +0000 (22:09 +0000)]
[CodeGen] Get rid of NDEBUG to ensure structure stability.

I think it's fine to keep this fields around in terms of overhead,
I wasn't able to measure any substantial regression while running the
test suite, but, in case this causes some regression I'm ready to revert
and work on an alternative solution.
This was tested building with clang/gcc both in Debug and Release mode
and passes the test-suite.

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

8 years ago[X86][SSE] lowerVectorShuffleWithUNPCK - use equivalent shuffle mask test.
Simon Pilgrim [Sat, 24 Oct 2015 20:48:08 +0000 (20:48 +0000)]
[X86][SSE] lowerVectorShuffleWithUNPCK - use equivalent shuffle mask test.

Use isShuffleEquivalent to match UNPCK shuffles - better support for build vector inputs.

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

8 years agoRefactor: Simplify boolean conditional return statements in lib/Transforms/Vectorize...
Michael Zolotukhin [Sat, 24 Oct 2015 20:16:42 +0000 (20:16 +0000)]
Refactor: Simplify boolean conditional return statements in lib/Transforms/Vectorize (NFC).

Summary: Use clang-tidy to simplify boolean conditional return statements

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

Patch by Richard<legalize@xmission.com>

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

8 years agoRemoved old FIXME - we do generate movddup for SSE3 and higher
Simon Pilgrim [Sat, 24 Oct 2015 20:15:43 +0000 (20:15 +0000)]
Removed old FIXME - we do generate movddup for SSE3 and higher

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

8 years ago[DAGCombiner] Tidy up ConstantFP commutation. NFCI
Simon Pilgrim [Sat, 24 Oct 2015 20:06:18 +0000 (20:06 +0000)]
[DAGCombiner] Tidy up ConstantFP commutation. NFCI

Move ConstantFP canonicalization of commutative instructions to start of 2-op node creation (matches integer) - simplifies constant folding code.

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

8 years agoUse all_of to simplify control flow. NFC.
Benjamin Kramer [Sat, 24 Oct 2015 19:30:37 +0000 (19:30 +0000)]
Use all_of to simplify control flow. NFC.

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

8 years agoAdd libuuid to required system libraries list for mingw.
Yaron Keren [Sat, 24 Oct 2015 19:27:28 +0000 (19:27 +0000)]
Add libuuid to required system libraries list for mingw.
This list is produced by llvm-config --system-libs to be used
by external programs using the llvm libraries, such as creduce.
In r250501 llvm/Support/Windows/Path.inc started to use the constant
FOLDERID_Profile from libuuid.

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

8 years agoUse find_if to simplify control flow. NFC.
Benjamin Kramer [Sat, 24 Oct 2015 19:03:15 +0000 (19:03 +0000)]
Use find_if to simplify control flow. NFC.

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

8 years ago[DAGCombiner] Generalize masking of constant rotates.
Simon Pilgrim [Sat, 24 Oct 2015 18:44:52 +0000 (18:44 +0000)]
[DAGCombiner] Generalize masking of constant rotates.

We don't need a mask of a rotation result to be a constant splat - any constant scalar/vector can be usefully folded.

Followup to D13851.

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

8 years agoCall the version of ConvertCostTableLookup that takes a statically sized array rather...
Craig Topper [Sat, 24 Oct 2015 18:40:22 +0000 (18:40 +0000)]
Call the version of ConvertCostTableLookup that takes a statically sized array rather than pointer and size. NFC

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

8 years agoX86ISelLowering: Support tail calls to/from callee pop functions
Hans Wennborg [Sat, 24 Oct 2015 16:47:10 +0000 (16:47 +0000)]
X86ISelLowering: Support tail calls to/from callee pop functions

This enables tail calls with thiscall, stdcall, vectorcall and
fastcall functions.

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

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

8 years agoFix unused variable warning. NFC.
Simon Pilgrim [Sat, 24 Oct 2015 13:41:45 +0000 (13:41 +0000)]
Fix unused variable warning. NFC.

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

8 years ago[X86][XOP] Add support for lowering vector rotations
Simon Pilgrim [Sat, 24 Oct 2015 13:17:26 +0000 (13:17 +0000)]
[X86][XOP] Add support for lowering vector rotations

This patch adds support for lowering to the XOP VPROT / VPROTI vector bit rotation instructions.

This has required changes to the DAGCombiner rotation pattern matching to support vector types - so far I've only changed it to support splat vectors, but generalising this further is feasible in the future.

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

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

8 years ago[TblGen] ArrayRefize CodeGenSchedule. No functionality change intended.
Benjamin Kramer [Sat, 24 Oct 2015 12:46:49 +0000 (12:46 +0000)]
[TblGen] ArrayRefize CodeGenSchedule. No functionality change intended.

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

8 years ago[TblGen] ArrayRefize TGParser. No functional change intended.
Benjamin Kramer [Sat, 24 Oct 2015 12:46:45 +0000 (12:46 +0000)]
[TblGen] ArrayRefize TGParser. No functional change intended.

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

8 years ago[BasicAliasAnalysis] Simplify expression, no functional change.
Benjamin Kramer [Sat, 24 Oct 2015 11:38:01 +0000 (11:38 +0000)]
[BasicAliasAnalysis] Simplify expression, no functional change.

(-1) - x + 1 is the same as -x.

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

8 years agoScalarReplAggregates.cpp: Try to appease clash of anonymous::SROA in modules build.
NAKAMURA Takumi [Sat, 24 Oct 2015 06:42:42 +0000 (06:42 +0000)]
ScalarReplAggregates.cpp: Try to appease clash of anonymous::SROA in modules build.

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

8 years agoExtract out getConstantRangeFromMetadata; NFC
Sanjoy Das [Sat, 24 Oct 2015 05:37:35 +0000 (05:37 +0000)]
Extract out getConstantRangeFromMetadata; NFC

The loop idiom creating a ConstantRange is repeated twice in the
codebase, time to give it a name and a home.

The loop is also repeated in `rangeMetadataExcludesValue`, but using
`getConstantRangeFromMetadata` there would not be an NFC -- the range
returned by `getConstantRangeFromMetadata` may contain a value that none
of the subranges did.

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

8 years agoFix whitespace issues in two places; NFC
Sanjoy Das [Sat, 24 Oct 2015 05:37:28 +0000 (05:37 +0000)]
Fix whitespace issues in two places; NFC

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

8 years agollvm/Transforms/Utils/LoopVersioning.h requires llvm/Analysis/LoopAccessAnalysis...
NAKAMURA Takumi [Sat, 24 Oct 2015 05:26:02 +0000 (05:26 +0000)]
llvm/Transforms/Utils/LoopVersioning.h requires llvm/Analysis/LoopAccessAnalysis.h for RuntimePointerChecking::PointerCheck.

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

8 years ago[libFuzzer] add -merge flag to merge corpora
Kostya Serebryany [Sat, 24 Oct 2015 01:16:40 +0000 (01:16 +0000)]
[libFuzzer] add -merge flag to merge corpora

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

8 years agoFix ADT/UniqueVector.h to resolve implicit dependency.
NAKAMURA Takumi [Sat, 24 Oct 2015 00:27:22 +0000 (00:27 +0000)]
Fix ADT/UniqueVector.h to resolve implicit dependency.

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

8 years agollvm/module.modulemap: AVR.def should be textual header.
NAKAMURA Takumi [Sat, 24 Oct 2015 00:25:18 +0000 (00:25 +0000)]
llvm/module.modulemap: AVR.def should be textual header.

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

8 years agoAMDGPU: Print modifiers when dumping AMDGPUOperand
Matt Arsenault [Sat, 24 Oct 2015 00:12:56 +0000 (00:12 +0000)]
AMDGPU: Print modifiers when dumping AMDGPUOperand

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

8 years ago[RS4GC] Rename stripDereferenceabilityInfo into stripNonValidAttributes.
Igor Laevsky [Fri, 23 Oct 2015 22:42:44 +0000 (22:42 +0000)]
[RS4GC] Rename stripDereferenceabilityInfo into stripNonValidAttributes.

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

8 years agoAdd a RAW mode to StringTableBuilder.
Rafael Espindola [Fri, 23 Oct 2015 21:48:05 +0000 (21:48 +0000)]
Add a RAW mode to StringTableBuilder.

In this mode it just tries to tail merge the strings without imposing any other
format constrains. It will not, for example, add a null byte between them.

Also add support for keeping a tentative size and offset if we decide to
not optimize after all.

This will be used shortly in lld for merging SHF_STRINGS sections.

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

8 years agoRevert rL251061 [SimplifyCFG] Extend SimplifyResume to handle phi of trivial landing...
Chen Li [Fri, 23 Oct 2015 21:13:01 +0000 (21:13 +0000)]
Revert rL251061 [SimplifyCFG] Extend SimplifyResume to handle phi of trivial landing pad.

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

8 years agoHandle non-constant shifts in computeKnownBits, and use computeKnownBits for constant...
Hal Finkel [Fri, 23 Oct 2015 20:37:08 +0000 (20:37 +0000)]
Handle non-constant shifts in computeKnownBits, and use computeKnownBits for constant folding in InstCombine/Simplify

First, the motivation: LLVM currently does not realize that:

  ((2072 >> (L == 0)) >> 7) & 1 == 0

where L is some arbitrary value. Whether you right-shift 2072 by 7 or by 8, the
lowest-order bit is always zero. There are obviously several ways to go about
fixing this, but the generic solution pursued in this patch is to teach
computeKnownBits something about shifts by a non-constant amount. Previously,
we would give up completely on these. Instead, in cases where we know something
about the low-order bits of the shift-amount operand, we can combine (and
together) the associated restrictions for all shift amounts consistent with
that knowledge. As a further generalization, I refactored all of the logic for
all three kinds of shifts to have this capability. This works well in the above
case, for example, because the dynamic shift amount can only be 0 or 1, and
thus we can say a lot about the known bits of the result.

This brings us to the second part of this change: Even when we know all of the
bits of a value via computeKnownBits, nothing used to constant-fold the result.
This introduces the necessary code into InstCombine and InstSimplify. I've
added it into both because:

  1. InstCombine won't automatically pick up the associated logic in
     InstSimplify (InstCombine uses InstSimplify, but not via the API that
     passes in the original instruction).

  2. Putting the logic in InstCombine allows the resulting simplifications to become
     part of the iterative worklist

  3. Putting the logic in InstSimplify allows the resulting simplifications to be
     used by everywhere else that calls SimplifyInstruction (inlining, unrolling,
     and many others).

And this requires a small change to our definition of an ephemeral value so
that we don't break the rest case from r246696 (where the icmp feeding the
@llvm.assume, is also feeding a br). Under the old definition, the icmp would
not be considered ephemeral (because it is used by the br), but this causes the
assume to remove itself (in addition to simplifying the branch structure), and
it seems more-useful to prevent that from happening.

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

8 years agoGVN: don't try to replace instruction with itself.
Tim Northover [Fri, 23 Oct 2015 20:30:02 +0000 (20:30 +0000)]
GVN: don't try to replace instruction with itself.

After some look-ahead PRE was added for GEPs, an instruction could end
up in the table of candidates before it was actually inspected. When
this happened the pass might decide it was the best candidate to
replace itself. This didn't go well.

Should fix PR25291

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

8 years agoFix the variable names to match the LLVM style.
Rafael Espindola [Fri, 23 Oct 2015 20:15:35 +0000 (20:15 +0000)]
Fix the variable names to match the LLVM style.

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

8 years ago[SCEV] Fix stylistic issue in MatchBinaryAddToConst; NFCI
Sanjoy Das [Fri, 23 Oct 2015 20:09:57 +0000 (20:09 +0000)]
[SCEV] Fix stylistic issue in MatchBinaryAddToConst; NFCI

Instead of checking `(FlagsPresent & ExpectedFlags) != 0`, check
`(FlagsPresent & ExpectedFlags) == ExpectedFlags`.  Right now they're
equivalent since `ExpectedFlags` can only be either `FlagNUW` or
`FlagNSW`, but if we ever pass in `ExpectedFlags` as `FlagNUW | FlagNSW`
then checking `(FlagsPresent & ExpectedFlags) != 0` would be wrong.

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

8 years ago[Inliner] Don't inline through callsites with operand bundles
Sanjoy Das [Fri, 23 Oct 2015 20:09:55 +0000 (20:09 +0000)]
[Inliner] Don't inline through callsites with operand bundles

Summary:
This change teaches the LLVM inliner to not inline through callsites
with unknown operand bundles.  Currently all operand bundles are
"unknown" operand bundles but in the near future we will add support for
inlining through some select kinds of operand bundles.

Reviewers: reames, chandlerc, majnemer

Subscribers: llvm-commits

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

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

8 years ago[CMake] Fixing dependency issue with parallel make when building with LLVM_OPTIMIZED_...
Chris Bieneman [Fri, 23 Oct 2015 19:48:17 +0000 (19:48 +0000)]
[CMake] Fixing dependency issue with parallel make when building with LLVM_OPTIMIZED_TABLEGEN.

Patch by Alex Wang

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

8 years ago[X86] Clean up the tail call eligibility logic
Reid Kleckner [Fri, 23 Oct 2015 19:35:38 +0000 (19:35 +0000)]
[X86] Clean up the tail call eligibility logic

Summary:
The logic here isn't straightforward because our support for
TargetOptions::GuaranteedTailCallOpt.

Also fix a bug where we were allowing tail calls to cdecl functions from
fastcall and vectorcall functions. We were special casing thiscall and
stdcall callers rather than checking for any convention that requires
clearing stack arguments before returning.

Reviewers: hans

Subscribers: llvm-commits

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

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

8 years ago[RuntimeDyld][COFF] Fix a think-o in the handling of the IMAGE_REL_AMD64_ADDR64
Lang Hames [Fri, 23 Oct 2015 18:46:43 +0000 (18:46 +0000)]
[RuntimeDyld][COFF] Fix a think-o in the handling of the IMAGE_REL_AMD64_ADDR64
relocation that was introduced in r250733.

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

8 years ago[libFuzzer] remove some old code; also make __sanitizer_get_total_unique_caller_calle...
Kostya Serebryany [Fri, 23 Oct 2015 18:37:58 +0000 (18:37 +0000)]
[libFuzzer] remove some old code; also make __sanitizer_get_total_unique_caller_callee_pairs weak so that newer libFuzzer works with older asan

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

8 years agoAMDGPU: Fix parsing of 32-bit literals with sign bit set
Matt Arsenault [Fri, 23 Oct 2015 18:07:58 +0000 (18:07 +0000)]
AMDGPU: Fix parsing of 32-bit literals with sign bit set

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

8 years agoFix another reference to in-source builds
Jonathan Roelofs [Fri, 23 Oct 2015 17:42:51 +0000 (17:42 +0000)]
Fix another reference to in-source builds

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

8 years ago[ARM] Renaming +t2dsp feature into +dsp, as discussed on llvm-dev
Artyom Skrobov [Fri, 23 Oct 2015 17:19:19 +0000 (17:19 +0000)]
[ARM] Renaming +t2dsp feature into +dsp, as discussed on llvm-dev

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

8 years ago[ARM CodeGen] @llvm.debugtrap call may be removed when restoring callee saved registers
Oleg Ranevskyy [Fri, 23 Oct 2015 17:17:59 +0000 (17:17 +0000)]
[ARM CodeGen] @llvm.debugtrap call may be removed when restoring callee saved registers

Summary:
When ARMFrameLowering::emitPopInst generates a "pop" instruction to restore the callee saved registers, it checks if the LR register is among them. If so, the function may decide to remove the basic block's terminator and replace it with a "pop" to the PC register instead of LR.

This leads to a problem when the block's terminator is preceded by a "llvm.debugtrap" call. The MI iterator points to the trap in such a case, which is also a terminator. If the function decides to restore LR to PC, it erroneously removes the trap.

Reviewers: asl, rengolin

Subscribers: aemerson, jfb, rengolin, dschuff, llvm-commits

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

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

8 years agoTest commit: fix typo in comment.
Oleg Ranevskyy [Fri, 23 Oct 2015 17:10:44 +0000 (17:10 +0000)]
Test commit: fix typo in comment.

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

8 years ago[llvm-readobj] Don't cast qualifiers away. Now gcc is happy again.
Davide Italiano [Fri, 23 Oct 2015 16:52:22 +0000 (16:52 +0000)]
[llvm-readobj] Don't cast qualifiers away. Now gcc is happy again.

Reported by: mikael.holmen at ericsson.com

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

8 years ago[CodeGen] Mark setjmp/catchret MBBs address-taken
Joseph Tremoulet [Fri, 23 Oct 2015 15:06:05 +0000 (15:06 +0000)]
[CodeGen] Mark setjmp/catchret MBBs address-taken

Summary:
This ensures that BranchFolding (and similar) won't remove these blocks.

Also allow AsmPrinter::EmitBasicBlockStart to process MBBs which are
address-taken but do not have BBs that are address-taken, since otherwise
its call to getAddrLabelSymbolTableToEmit would fail an assertion on such
blocks.  I audited the other callers of getAddrLabelSymbolTableToEmit
(and getAddrLabelSymbol); they all have BBs known to be address-taken
except for the call through getAddrLabelSymbol from
WinException::create32bitRef; that call is actually now unreachable, so
I've removed it and updated the signature of create32bitRef.

This fixes PR25168.

Reviewers: majnemer, andrew.w.kaylor, rnk

Subscribers: pgavlin, llvm-commits

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

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

8 years ago[BasicAA] Bugfix for r251016
James Molloy [Fri, 23 Oct 2015 14:17:03 +0000 (14:17 +0000)]
[BasicAA] Bugfix for r251016

If the loaded type sizes don't match the element type of the sequential type, all bets are off and the addresses may, indeed, overlap.

Surprisingly, this just got caught in one test, on one builder, out of the 30+ builders testing this change. Congratulations go to http://lab.llvm.org:8011/builders/clang-aarch64-lnt/builds/5205.

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

8 years agoRevert "[AArch64]Merge halfword loads into a 32-bit load"
James Molloy [Fri, 23 Oct 2015 10:41:38 +0000 (10:41 +0000)]
Revert "[AArch64]Merge halfword loads into a 32-bit load"

This reverts commit r250719. This introduced a codegen fault in SPEC2000.gcc, when compiled for Cortex-A53.

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

8 years ago[SCEV] Get rid of an unnecessary lambda; NFC
Sanjoy Das [Fri, 23 Oct 2015 06:57:21 +0000 (06:57 +0000)]
[SCEV] Get rid of an unnecessary lambda; NFC

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

8 years ago[mips][microMIPS] Implement SHLL.PH, SHLL_S.PH, SHLL.QB, SHLLV.PH, SHLLV_S.PH, SHLLV...
Zlatko Buljan [Fri, 23 Oct 2015 06:39:29 +0000 (06:39 +0000)]
[mips][microMIPS] Implement SHLL.PH, SHLL_S.PH, SHLL.QB, SHLLV.PH, SHLLV_S.PH, SHLLV.QB, SHLLV_S.W, SHLL_S.W, SHRA.QB and SHRA_R.QB instructions
Differential Revision: http://reviews.llvm.org/D13929

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

8 years ago[SCEV] Fix a latent bug in `getPreStartForExtend`
Sanjoy Das [Fri, 23 Oct 2015 06:33:47 +0000 (06:33 +0000)]
[SCEV] Fix a latent bug in `getPreStartForExtend`

I could not come up a way to test this -- I think this bug is latent
today, and will not actually result in a miscompile.

In `getPreStartForExtend`, SCEV constructs `PreStart` as a sum of all of
`SA`'s operands except `Op`.  It also uses `SA`'s no-wrap flags, and
this is problematic because removing an element from an add expression
can make it signed-wrap.  E.g. if `SA` was `(127 + 1 + -1)`, then it
could safely be `<nsw>` (since `sext(127) + sext(1) + sext(-1)` ==
`sext(127 + 1 + -1)`), but `(127 + 1)` (== `PreStart` if `Op` is `-1`)
is not `<nsw>`.

Transferring `<nuw>` from `SA` to `PreStart` is safe, as far as I can
tell.

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

8 years ago[AVR] Add ELF constants to headers
Dylan McKay [Fri, 23 Oct 2015 06:05:55 +0000 (06:05 +0000)]
[AVR] Add ELF constants to headers

Also adds a 'trivial' ELF file. This was generated by assembling
and linking a file with the symbol main which contains a single
return instruction.

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

8 years agoSupport, IR: silence -Wunused-parameter
Saleem Abdulrasool [Fri, 23 Oct 2015 05:26:03 +0000 (05:26 +0000)]
Support, IR: silence -Wunused-parameter

If this is used outside of LLVM with -Werror, this would cause a failure.

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

8 years agoAdd more intrumentation/runtime helper interfaces (NFC)
Xinliang David Li [Fri, 23 Oct 2015 04:22:58 +0000 (04:22 +0000)]
Add more intrumentation/runtime helper interfaces (NFC)

This patch converts the remaining references to literal
strings for names of profile runtime entites (such as
profile runtime hook, runtime hook use function, profile
init method, register function etc).

Also added documentation for all the new interfaces.

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

8 years ago[LangRef] Fix the doc for operand bundles
Sanjoy Das [Fri, 23 Oct 2015 01:28:05 +0000 (01:28 +0000)]
[LangRef] Fix the doc for operand bundles

I accidentally messed this up after a merge conflict in a previous
commit.

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

8 years agoSLPVectorizer: AllSameOpcode* starts "true" only for instructions
Mehdi Amini [Fri, 23 Oct 2015 01:04:45 +0000 (01:04 +0000)]
SLPVectorizer: AllSameOpcode* starts "true" only for instructions

r251085 wasn't as NFC as intended...

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

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

8 years agoSLPVectorizer: refactor reorderInputsAccordingToOpcode (NFC)
Mehdi Amini [Fri, 23 Oct 2015 00:46:17 +0000 (00:46 +0000)]
SLPVectorizer: refactor reorderInputsAccordingToOpcode (NFC)

This is intended to simplify the changes needed to solve PR25247.

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

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

8 years ago[CodeGen] Remove usage of NDEBUG in header.
Davide Italiano [Fri, 23 Oct 2015 00:17:40 +0000 (00:17 +0000)]
[CodeGen] Remove usage of NDEBUG in header.

Moreover, this seems unused.

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

8 years ago[libFuzzer] use the indirect caller-callee counter as an independent search heuristic
Kostya Serebryany [Thu, 22 Oct 2015 23:55:39 +0000 (23:55 +0000)]
[libFuzzer] use the indirect caller-callee counter as an independent search heuristic

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

8 years ago[libFuzzer] more refactoring the code that checks the coverage. NFC
Kostya Serebryany [Thu, 22 Oct 2015 22:56:45 +0000 (22:56 +0000)]
[libFuzzer] more refactoring the code that checks the coverage. NFC

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

8 years ago[libFuzzer] refactoring the code that checks the coverage. NFC
Kostya Serebryany [Thu, 22 Oct 2015 22:50:47 +0000 (22:50 +0000)]
[libFuzzer] refactoring the code that checks the coverage. NFC

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

8 years agoMinor bug fix in Profile Name Prefix interface
Xinliang David Li [Thu, 22 Oct 2015 21:51:09 +0000 (21:51 +0000)]
Minor bug fix in Profile Name Prefix interface

Exposed in uses by clang FE.

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

8 years ago[libFuzzer] remove the deprecated 'tokens' feature
Kostya Serebryany [Thu, 22 Oct 2015 21:48:09 +0000 (21:48 +0000)]
[libFuzzer] remove the deprecated 'tokens' feature

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

8 years agoLoopPass: Remove redoLoop, it isn't used. NFC
Justin Bogner [Thu, 22 Oct 2015 21:31:34 +0000 (21:31 +0000)]
LoopPass: Remove redoLoop, it isn't used. NFC

In r251064 I removed a logically unreachable call to `redoLoop`, and
now there aren't any callers of this API at all. Remove the needless
complexity.

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

8 years agoLoopPass: Simplify the API for adding a new loop. NFC
Justin Bogner [Thu, 22 Oct 2015 21:21:32 +0000 (21:21 +0000)]
LoopPass: Simplify the API for adding a new loop. NFC

The insertLoop() API is only used to add new loops, and has confusing
ownership semantics. Simplify it by replacing it with addLoop().

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

8 years ago[SimplifyCFG] Extend SimplifyResume to handle phi of trivial landing pad.
Chen Li [Thu, 22 Oct 2015 20:48:38 +0000 (20:48 +0000)]
[SimplifyCFG] Extend SimplifyResume to handle phi of trivial landing pad.

Summary: Currently SimplifyResume can convert an invoke instruction to a call instruction if its landing pad is trivial. In practice we could have several invoke instructions with trivial landing pads and share a common rethrow block, and in the common rethrow block, all the landing pads join to a phi node. The patch extends SimplifyResume to check the phi of landing pad and their incoming blocks. If any of them is trivial, remove it from the phi node and convert the invoke instruction to a call instruction.

Reviewers: hfinkel, reames

Subscribers: llvm-commits

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

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

8 years agoAdd helper functions and remove hard coded references to instProf related name/name...
Xinliang David Li [Thu, 22 Oct 2015 20:32:12 +0000 (20:32 +0000)]
Add helper functions and remove hard coded references to instProf related name/name-prefixes

This is a clean up patch that defines instr prof section and variable
name prefixes in a common header with access helper functions.
clang FE change will be done as a follow up once this patch is in.

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

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

8 years ago[Sink] Don't check BB.empty()
David Majnemer [Thu, 22 Oct 2015 20:29:08 +0000 (20:29 +0000)]
[Sink] Don't check BB.empty()

As an invariant, BasicBlocks cannot be empty when passed to a transform.
This is not the case for MachineBasicBlocks and the Sink pass was ported
from the MachineSink pass which would explain the check's existence.

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

8 years ago[ASan] Enable instrumentation of dynamic allocas by default.
Alexey Samsonov [Thu, 22 Oct 2015 20:07:28 +0000 (20:07 +0000)]
[ASan] Enable instrumentation of dynamic allocas by default.

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

8 years ago[SCEV] Remove a test case added in r249168
Sanjoy Das [Thu, 22 Oct 2015 19:57:41 +0000 (19:57 +0000)]
[SCEV] Remove a test case added in r249168

The test case wasn't testing what it was commented to be testing; and
when I tried to fix the test I noticed that SCEV does not support the
simplification that the test was supposed to test.

This change removes the test case to avoid confusion.

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

8 years ago[SCEV] Commute zero extends through <nuw> additions
Sanjoy Das [Thu, 22 Oct 2015 19:57:38 +0000 (19:57 +0000)]
[SCEV] Commute zero extends through <nuw> additions

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

8 years ago[SCEV] Opportunistically interpret unsigned constraints as signed
Sanjoy Das [Thu, 22 Oct 2015 19:57:34 +0000 (19:57 +0000)]
[SCEV] Opportunistically interpret unsigned constraints as signed

Summary:
An unsigned comparision is equivalent to is corresponding signed version
if both the operands being compared are positive.  Teach SCEV to use
this fact when profitable.

Reviewers: atrick, hfinkel, reames, nlewycky

Subscribers: llvm-commits

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

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

8 years ago[SCEV] Teach SCEV some axioms about non-wrapping arithmetic
Sanjoy Das [Thu, 22 Oct 2015 19:57:29 +0000 (19:57 +0000)]
[SCEV] Teach SCEV some axioms about non-wrapping arithmetic

Summary:
 - A s<  (A + C)<nsw> if C >  0
 - A s<= (A + C)<nsw> if C >= 0
 - (A + C)<nsw> s<  A if C <  0
 - (A + C)<nsw> s<= A if C <= 0

Right now `C` needs to be a constant, but we can later generalize it to
be a non-constant if needed.

Reviewers: atrick, hfinkel, reames, nlewycky

Subscribers: sanjoy, llvm-commits

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

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

8 years ago[SCEV] Commute sign extends through nsw additions
Sanjoy Das [Thu, 22 Oct 2015 19:57:25 +0000 (19:57 +0000)]
[SCEV] Commute sign extends through nsw additions

Summary: Depends on D13613.

Reviewers: atrick, hfinkel, reames, nlewycky

Subscribers: llvm-commits

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

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

8 years ago[SCEV] Mark AddExprs as nsw or nuw if legal
Sanjoy Das [Thu, 22 Oct 2015 19:57:19 +0000 (19:57 +0000)]
[SCEV] Mark AddExprs as nsw or nuw if legal

Summary:
This uses `ScalarEvolution::getRange` and not potentially control
dependent `nsw` and `nuw` bits on the arithmetic instruction.

Reviewers: atrick, hfinkel, nlewycky

Subscribers: llvm-commits, sanjoy

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

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

8 years ago[ASan] Minor fixes to dynamic allocas handling:
Alexey Samsonov [Thu, 22 Oct 2015 19:51:59 +0000 (19:51 +0000)]
[ASan] Minor fixes to dynamic allocas handling:

* Don't instrument promotable dynamic allocas:
  We already have a test that checks that promotable dynamic allocas are
  ignored, as well as static promotable allocas. Make sure this test will
  still pass if/when we enable dynamic alloca instrumentation by default.

* Handle lifetime intrinsics before handling dynamic allocas:
  lifetime intrinsics may refer to dynamic allocas, so we need to emit
  instrumentation before these dynamic allocas would be replaced.

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

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

8 years ago[ExecutionEngine] Garbage collect some dead (and unsafe) code.
Davide Italiano [Thu, 22 Oct 2015 18:46:27 +0000 (18:46 +0000)]
[ExecutionEngine] Garbage collect some dead (and unsafe) code.

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

8 years ago[IntrinsicEmitter] Remove GET_INTRINSIC_MODREF_BEHAVIOR table
Igor Laevsky [Thu, 22 Oct 2015 18:35:34 +0000 (18:35 +0000)]
[IntrinsicEmitter] Remove GET_INTRINSIC_MODREF_BEHAVIOR table

There is no need to generate separate table for intrinsics mod ref behaviour.
It can now be determined purely from function attributes.

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

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

8 years agoAvoid storing a second copy of each string in StringTableBuilder.
Rafael Espindola [Thu, 22 Oct 2015 18:32:06 +0000 (18:32 +0000)]
Avoid storing a second copy of each string in StringTableBuilder.

This was only use in the extremely uncommon case of @@@ symbols on ELF.

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

8 years agoAArch64: Disable the latency heuristic
Matthias Braun [Thu, 22 Oct 2015 18:07:38 +0000 (18:07 +0000)]
AArch64: Disable the latency heuristic

It turned out not to improve any of our benchmarks but occasionally led
to increased register pressure and spilling.

Only enabling for the Cyclone CPU as the results on the cortex CPUs
give mixed results.

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

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

8 years agoMachineScheduler: Add a way to disable the 'ReduceLatency' heuristic
Matthias Braun [Thu, 22 Oct 2015 18:07:31 +0000 (18:07 +0000)]
MachineScheduler: Add a way to disable the 'ReduceLatency' heuristic

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

8 years agoRemove the last traces of X86CompilationCallback as it is completely
Eric Christopher [Thu, 22 Oct 2015 17:55:35 +0000 (17:55 +0000)]
Remove the last traces of X86CompilationCallback as it is completely
unused.

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

8 years agoCodeGen: increase bits allocated for LegalizeActions
Tim Northover [Thu, 22 Oct 2015 17:20:48 +0000 (17:20 +0000)]
CodeGen: increase bits allocated for LegalizeActions

The array handling CondCodes only allocated 2 bits to describe the
desired action for each type. The new addition of a "LibCall" option
overflowed this and caused corruption for Custom actions.

No in-tree targets have a Custom CondCodeAction, so unfortunately it
can't be tested.

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

8 years agoChange makeLibCall to take an ArrayRef<SDValue> instead of pointer and size. This...
Craig Topper [Thu, 22 Oct 2015 17:05:00 +0000 (17:05 +0000)]
Change makeLibCall to take an ArrayRef<SDValue> instead of pointer and size. This removes the need to pass a hardcoded size in many places. NFC

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

8 years agoFix broken build under MSVC.
Zachary Turner [Thu, 22 Oct 2015 16:42:31 +0000 (16:42 +0000)]
Fix broken build under MSVC.

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

8 years agoUse ArrayRef instead of pointer and size. NFC
Craig Topper [Thu, 22 Oct 2015 16:35:56 +0000 (16:35 +0000)]
Use ArrayRef instead of pointer and size. NFC

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

8 years ago[X86] - Catch extra combine opportunities for redundant imuls.
Zia Ansari [Thu, 22 Oct 2015 16:14:45 +0000 (16:14 +0000)]
[X86] - Catch extra combine opportunities for redundant imuls.

When we fold "mul ((add x, c1), c1)" -> "add ((mul x, c2), c1*c2)", we bail if (add x, c1) has multiple
users which would result in an extra add instruction.
In such cases, this patch adds a check to see if we can eliminate a multiply instruction in exchange for the extra add.

I also added the capability of doing the existing optimization with non-splatted vectors (splatted also works).

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

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

8 years ago[PPC] Fix PR24686 by failing assembly for an invalid relocation
Bill Schmidt [Thu, 22 Oct 2015 15:53:44 +0000 (15:53 +0000)]
[PPC] Fix PR24686 by failing assembly for an invalid relocation

PR24686 identifies a problem where a relocation expression is invalid
when not all of the symbols in the expression can be locally
resolved.  This causes the compiler to request a PC-relative half16ds
relocation, which is nonsensical for PowerPC.  This patch recognizes
this situation and ensures we fail the assembly cleanly.

Test case provided by Anton Blanchard.

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

8 years agoAvoid hash lookups when finalizing StringTableBuilder. NFC.
Rafael Espindola [Thu, 22 Oct 2015 15:26:35 +0000 (15:26 +0000)]
Avoid hash lookups when finalizing StringTableBuilder. NFC.

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

8 years agoUse array_pod_sort. NFC.
Rafael Espindola [Thu, 22 Oct 2015 15:15:44 +0000 (15:15 +0000)]
Use array_pod_sort. NFC.

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