OSDN Git Service

android-x86/external-llvm.git
8 years agoRevert "[PGO] Fix __llvm_profile_raw_version linkage in MACHO IR instrumentation...
Renato Golin [Tue, 10 May 2016 08:23:57 +0000 (08:23 +0000)]
Revert "[PGO] Fix __llvm_profile_raw_version linkage in MACHO IR instrumentation generates a COMDAT symbol __llvm_profile_raw_version to overwrite the same symbol in profile run-time to distinguish IR profiles from Clang generated profiles. In MACHO, LinkOnceODR linkage is used due to the lack of COMDAT support."

This reverts commits r268969, r268979 and r268984. They had target specific test
in generic directories without the correct specifiers and made it hard for us to
come up with a good solution by rapidly committing untested changes.

This test needs to be in a target specific directory or have the correct REQUIRED
identifier.

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

8 years ago[foldMemoryOperand()] Pass LiveIntervals to enable liveness check.
Jonas Paulsson [Tue, 10 May 2016 08:09:37 +0000 (08:09 +0000)]
[foldMemoryOperand()] Pass LiveIntervals to enable liveness check.

SystemZ (and probably other targets as well) can fold a memory operand
by changing the opcode into a new instruction that as a side-effect
also clobbers the CC-reg.

In order to do this, liveness of that reg must first be checked. When
LIS is passed, getRegUnit() can be called on it and the right
LiveRange is computed on demand.

Reviewed by Matthias Braun.
http://reviews.llvm.org/D19861

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

8 years ago[LoopVectorize] Handling induction variable with non-constant step.
Elena Demikhovsky [Tue, 10 May 2016 07:33:35 +0000 (07:33 +0000)]
[LoopVectorize] Handling induction variable with non-constant step.

Allow vectorization when the step is a loop-invariant variable.
This is the loop example that is getting vectorized after the patch:

 int int_inc;
 int bar(int init, int *restrict A, int N) {

  int x = init;
  for (int i=0;i<N;i++){
    A[i] = x;
    x += int_inc;
  }
  return x;
 }

"x" is an induction variable with *loop-invariant* step.
But it is not a primary induction. Primary induction variable with non-constant step is not handled yet.

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

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

8 years ago[LAA] Rename "isStridedPtr" with "getPtrStride". NFC.
Denis Zobnin [Tue, 10 May 2016 05:55:16 +0000 (05:55 +0000)]
[LAA] Rename "isStridedPtr" with "getPtrStride". NFC.

Changing misleading function name was approved in http://reviews.llvm.org/D17268.
Patch by Roman Shirokiy.

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

8 years agoliveness.mir requires asserts to use -debug-only
Matthias Braun [Tue, 10 May 2016 05:38:47 +0000 (05:38 +0000)]
liveness.mir requires asserts to use -debug-only

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

8 years ago[X86][AVX512] Strengthen the assertions from r269001. We need VLX to use the 128...
Craig Topper [Tue, 10 May 2016 05:28:04 +0000 (05:28 +0000)]
[X86][AVX512] Strengthen the assertions from r269001. We need VLX to use the 128/256-bit move opcodes for extended registers.

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

8 years ago[X86] Add ZMM registers to the X86_INTR calling convention preserved mask when AVX512...
Craig Topper [Tue, 10 May 2016 05:28:02 +0000 (05:28 +0000)]
[X86] Add ZMM registers to the X86_INTR calling convention preserved mask when AVX512 is enabled.

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

8 years ago[X86] Update X86_INTR calling convention to save ZMM registers instead of YMM registe...
Craig Topper [Tue, 10 May 2016 05:27:56 +0000 (05:27 +0000)]
[X86] Update X86_INTR calling convention to save ZMM registers instead of YMM registers when AVX512 is enabled.

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

8 years agoLiveIntervalAnalysis: Rework constructMainRangeFromSubranges()
Matthias Braun [Tue, 10 May 2016 04:51:14 +0000 (04:51 +0000)]
LiveIntervalAnalysis: Rework constructMainRangeFromSubranges()

We now use LiveRangeCalc::extendToUses() instead of a specially designed
algorithm in constructMainRangeFromSubranges():
- The original motivation for constructMainRangeFromSubranges() were
  differences between the main liverange and subranges because of hidden
  dead definitions. This case however cannot happen anymore with the
  DetectDeadLaneMasks pass in place.
- It simplifies the code.
- This fixes a longstanding bug where we did not properly create new SSA
  values on merging control flow (the MachineVerifier missed most of
  these cases).
- Move constructMainRangeFromSubranges() to LiveIntervalAnalysis and
  LiveRangeCalc to better match the implementation/available helper
  functions.

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

8 years agoLiveInterval: Avoid unnecessary auto, add const; NFC
Matthias Braun [Tue, 10 May 2016 04:51:09 +0000 (04:51 +0000)]
LiveInterval: Avoid unnecessary auto, add const; NFC

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

8 years agollc: Print+Verify machine function after loading it
Matthias Braun [Tue, 10 May 2016 04:51:07 +0000 (04:51 +0000)]
llc: Print+Verify machine function after loading it

In -run-pass mode verify/print machine function immediately after
loading the .mir file if -verify-machineinstr/-print-machineinstrs
option is specified.

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

8 years agoTargetPassConfig: Set PrintMachineCode even if addMachinePasses() does not run.
Matthias Braun [Tue, 10 May 2016 04:51:04 +0000 (04:51 +0000)]
TargetPassConfig: Set PrintMachineCode even if addMachinePasses() does not run.

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

8 years ago[WebAssembly] Move register stackification and coloring to a late phase.
Dan Gohman [Tue, 10 May 2016 04:24:02 +0000 (04:24 +0000)]
[WebAssembly] Move register stackification and coloring to a late phase.

Move the register stackification and coloring passes to run very late, after
PEI, tail duplication, and most other passes. This means that all code emitted
and expanded by those passes is now exposed to these passes. This also
eliminates the need for prologue/epilogue code to be manually stackified,
which significantly simplifies the code.

This does require running LiveIntervals a second time. It's useful to think
of these late passes not as late optimization passes, but as a domain-specific
compression algorithm based on knowledge of liveness information. It's used to
compress the code after all conventional optimizations are complete, which is
why it uses LiveIntervals at a phase when actual optimization passes don't
typically need it.

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

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

8 years agoCodeGen: Move TargetPassConfig from Passes.h to an own header; NFC
Matthias Braun [Tue, 10 May 2016 03:21:59 +0000 (03:21 +0000)]
CodeGen: Move TargetPassConfig from Passes.h to an own header; NFC

Many files include Passes.h but only a fraction needs to know about the
TargetPassConfig class. Move it into an own header. Also rename
Passes.cpp to TargetPassConfig.cpp while we are at it.

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

8 years agoPrologEpilogInserter: Remove unnecessary dependency
Matthias Braun [Tue, 10 May 2016 03:21:47 +0000 (03:21 +0000)]
PrologEpilogInserter: Remove unnecessary dependency

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

8 years agoAppease MSVC
Matthias Braun [Tue, 10 May 2016 03:03:55 +0000 (03:03 +0000)]
Appease MSVC

Apply a similar fix to the one in r269006 to LiveIntervalTest.cpp.

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

8 years ago[ValueTracking] Use guards to prove non-nullness of a value
Sanjoy Das [Tue, 10 May 2016 02:35:44 +0000 (02:35 +0000)]
[ValueTracking] Use guards to prove non-nullness of a value

Reviewers: apilipenko, majnemer, reames

Subscribers: mcrosier, llvm-commits

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

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

8 years ago[BasicAA] Guard intrinsics don't write to memory
Sanjoy Das [Tue, 10 May 2016 02:35:41 +0000 (02:35 +0000)]
[BasicAA] Guard intrinsics don't write to memory

Summary:
The idea is very close to what we do for assume intrinsics: we mark the
guard intrinsics as writing to arbitrary memory to maintain control
dependence, but under the covers we teach AA that they do not mod any
particular memory location.

Reviewers: chandlerc, hfinkel, gbiv, reames

Subscribers: george.burgess.iv, mcrosier, llvm-commits

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

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

8 years agoTry to appease clang-x64-ninja-win7 bot.
Matthias Braun [Tue, 10 May 2016 02:09:32 +0000 (02:09 +0000)]
Try to appease clang-x64-ninja-win7 bot.

Looks like you need the complete definition of "X" when calling a "X
&func()" declared function even when not using the result further.

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

8 years agollc: Rework -run-pass option
Matthias Braun [Tue, 10 May 2016 01:32:44 +0000 (01:32 +0000)]
llc: Rework -run-pass option

We now construct a custom pass pipeline instead of injecting
start-before/stop-after into the default pipeline construction. This
allows to specify any pass known to the pass registry. Previously
specifying indirectly added analysis passes or passes not added to the
pipeline add all would not be added and we would silently do nothing.

This also restricts the -run-pass option to cases with .mir input.

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

8 years agoLLVMTargetMachine: Add functions to create MIModuleInfo/MIFunction; NFC
Matthias Braun [Tue, 10 May 2016 01:32:40 +0000 (01:32 +0000)]
LLVMTargetMachine: Add functions to create MIModuleInfo/MIFunction; NFC

Add convenience function to create MachineModuleInfo and
MachineFunctionAnalysis passes and add them to a pass manager.

Despite factoring out some shared code in
LiveIntervalTest/LLVMTargetMachine this will be used by my upcoming llc
change.

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

8 years ago[X86][AVX512] Use the proper load/store for AVX512 registers.
Quentin Colombet [Tue, 10 May 2016 01:09:14 +0000 (01:09 +0000)]
[X86][AVX512] Use the proper load/store for AVX512 registers.

When loading or storing AVX512 registers we were not using the AVX512
variant of the load and store for VR128 and VR256 like registers.
Thus, we ended up with the wrong encoding and actually were dropping the
high bits of the instruction. The result was that we load or store the
wrong register. The effect is visible only when we emit the object file
directly and disassemble it. Then, the output of the disassembler does
not match the assembly input.

This is related to llvm.org/PR27481.

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

8 years agoDon't inline functions with different SafeStack attributes.
Evgeniy Stepanov [Tue, 10 May 2016 00:33:07 +0000 (00:33 +0000)]
Don't inline functions with different SafeStack attributes.

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

8 years ago[SCEVExpander] Clang format expressions; NFC
Sanjoy Das [Tue, 10 May 2016 00:32:31 +0000 (00:32 +0000)]
[SCEVExpander] Clang format expressions; NFC

The boolean expressions are somewhat hard to read otherwise.

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

8 years ago[SCEV] Use guards to prove predicates
Sanjoy Das [Tue, 10 May 2016 00:31:49 +0000 (00:31 +0000)]
[SCEV] Use guards to prove predicates

We can use calls to @llvm.experimental.guard to prove predicates,
relying on the fact that in all locations domianted by a call to
@llvm.experimental.guard the predicate it is guarding is known to be
true.

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

8 years ago[nvvm] Mark ldu and ldg intrinsics as IntrArgMemOnly.
Justin Lebar [Tue, 10 May 2016 00:31:25 +0000 (00:31 +0000)]
[nvvm] Mark ldu and ldg intrinsics as IntrArgMemOnly.

Summary:
Previously these intrinsics were marked as can-read any memory address.
Now they're marked as reading only the pointer they're passed.

Reviewers: rnk

Subscribers: jholewinski, llvm-commits, tra

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

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

8 years agoMinor formatting fixes in LoopUnroll.cpp.
Justin Lebar [Tue, 10 May 2016 00:31:23 +0000 (00:31 +0000)]
Minor formatting fixes in LoopUnroll.cpp.

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

8 years ago[NVPTX] Change begin/end inline asm comments to "begin/end inline asm".
Justin Lebar [Tue, 10 May 2016 00:31:22 +0000 (00:31 +0000)]
[NVPTX] Change begin/end inline asm comments to "begin/end inline asm".

Previously it was just "// inline asm", which made it tricky to read
code with lots of inline assembly.

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

8 years ago[NVVM] Add comments to NVVM intrinsics listing.
Justin Lebar [Tue, 10 May 2016 00:31:20 +0000 (00:31 +0000)]
[NVVM] Add comments to NVVM intrinsics listing.

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

8 years ago[WebAssembly] Disable 128-bit shift libcalls
Derek Schuff [Tue, 10 May 2016 00:14:07 +0000 (00:14 +0000)]
[WebAssembly] Disable 128-bit shift libcalls

Currently the signature of the functions
i128(i128, i32) aka void(i32, i64, i64, i32) doesn't match the signature
of the call emitted by the default lowering, void(i32, i64, i64).

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

8 years agoSDAG: Stop relying on Select's return value in SystemZ's splitLargeImmediate. NFC
Justin Bogner [Mon, 9 May 2016 23:54:23 +0000 (23:54 +0000)]
SDAG: Stop relying on Select's return value in SystemZ's splitLargeImmediate. NFC

The call to Select on Upper here happens in an unusual order in order
to defeat the constant folding that getNode() does. Add a comment
explaining why we can't just move the Select to later to avoid a
Handle, and wrap the call to SelectCode in a handle so we don't need
its return value.

This is part of the work to have Select return void instead of an
SDNode *, which is in turn part of llvm.org/pr26808.

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

8 years agoFix some Clang-tidy modernize-deprecated-headers and Include What You Use warnings...
Eugene Zelenko [Mon, 9 May 2016 23:11:38 +0000 (23:11 +0000)]
Fix some Clang-tidy modernize-deprecated-headers and Include What You Use warnings; other minor fixes.

Differential revision: http://reviews.llvm.org/D20042

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

8 years ago[LV] Hint at the new loop distribution pragma in optimization remark
Adam Nemet [Mon, 9 May 2016 23:03:44 +0000 (23:03 +0000)]
[LV] Hint at the new loop distribution pragma in optimization remark

When we encounter unsafe memory dependencies, loop distribution could
help.

Even though, the diagnostics is in LAA, it's only currently emitted in
the vectorizer.

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

8 years ago[IndirectCallPromotion] Remove duplicate comment. NFC
Adam Nemet [Mon, 9 May 2016 23:03:06 +0000 (23:03 +0000)]
[IndirectCallPromotion] Remove duplicate comment.  NFC

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

8 years agoDisable this unit test on MSVC, which crashes while compiling it.
Adrian Prantl [Mon, 9 May 2016 22:59:55 +0000 (22:59 +0000)]
Disable this unit test on MSVC, which crashes while compiling it.

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

8 years agoFix buildbot failure from r268968.
Rong Xu [Mon, 9 May 2016 22:45:47 +0000 (22:45 +0000)]
Fix buildbot failure from r268968.

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

8 years ago[X86] Fix the AllRegs AVX calling convention.
Quentin Colombet [Mon, 9 May 2016 22:37:05 +0000 (22:37 +0000)]
[X86] Fix the AllRegs AVX calling convention.

We used to list registers that were not in the AVX space. In other
words, we were pushing registers that the ISA cannot encode
(YMM16-YMM31).

This is part of llvm.org/PR27481.

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

8 years ago[Inliner] don't assume that a Constant alloca size is a ConstantInt (PR27277)
Sanjay Patel [Mon, 9 May 2016 21:51:53 +0000 (21:51 +0000)]
[Inliner] don't assume that a Constant alloca size is a ConstantInt (PR27277)

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

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

8 years agoFix buildbot failure from r268968.
Rong Xu [Mon, 9 May 2016 21:51:50 +0000 (21:51 +0000)]
Fix buildbot failure from r268968.

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

8 years agoTypo. NFC.
Chad Rosier [Mon, 9 May 2016 21:37:43 +0000 (21:37 +0000)]
Typo. NFC.

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

8 years agoCleanup followup of r268710 - [PM] port IR based PGO prof-gen pass to new pass manager
Xinliang David Li [Mon, 9 May 2016 21:37:12 +0000 (21:37 +0000)]
Cleanup followup of r268710 - [PM] port IR based PGO prof-gen pass to new pass manager

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

8 years ago[X86] Strengthen the setting of inline asm constraints for fp regclasses.
Quentin Colombet [Mon, 9 May 2016 21:24:31 +0000 (21:24 +0000)]
[X86] Strengthen the setting of inline asm constraints for fp regclasses.

This is similar to r268953, but for floating point and vector register
classes.

Explanations:
The setting of the inline asm constraints was implicitly relying on the
order of the register classes in the file generated by tablegen.
Since, we do not have any control on that order, make sure we do not
depend on it anymore.

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

8 years ago[X86][SSE] Improve cost model for i64 vector comparisons on pre-SSE42 targets
Simon Pilgrim [Mon, 9 May 2016 21:14:38 +0000 (21:14 +0000)]
[X86][SSE] Improve cost model for i64 vector comparisons on pre-SSE42 targets

As discussed on PR24888, until SSE42 we don't have access to PCMPGTQ for v2i64 comparisons, but the cost models don't reflect this, resulting in over-optimistic vectorizaton.

This patch adds SSE2 'base level' costs that match what a typical target is capable of and only reduces the v2i64 costs at SSE42.

Technically SSE41 provides a PCMPEQQ v2i64 equality test, but as getCmpSelInstrCost doesn't give us a way to discriminate between comparison test types we can't easily make use of this, otherwise we could split the cost of integer equality and greater-than tests to give better costings of each.

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

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

8 years ago[PGO] Fix __llvm_profile_raw_version linkage in MACHO
Rong Xu [Mon, 9 May 2016 21:03:06 +0000 (21:03 +0000)]
[PGO] Fix __llvm_profile_raw_version linkage in MACHO
IR instrumentation generates a COMDAT symbol __llvm_profile_raw_version to
overwrite the same symbol in profile run-time to distinguish IR profiles from
Clang generated profiles. In MACHO, LinkOnceODR linkage is used due to the
lack of COMDAT support.

But LinkOnceODR linkage might have .weak_def_can_be_hidden assembly directive,
while the weak variable in run-time has a .weak_definition directive. Linker
will not merge these two symbols even they have the same name. The end result
is IR profiles are not properly flagged in MACHO.

This patch changes the linkage for __llvm_profile_raw_version in each module to
LinkOnceAny so that it has same .weak_definition directive as in the run-time.

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

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

8 years ago[libFuzzer] add a test for libFuzzer+ubsan, extend the docs on using libFuzzer+ubsan
Kostya Serebryany [Mon, 9 May 2016 21:02:36 +0000 (21:02 +0000)]
[libFuzzer] add a test for libFuzzer+ubsan, extend the docs on using libFuzzer+ubsan

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

8 years ago[MSan] [AArch64] Fix vararg helper for >1 or non-int fixed arguments.
Marcin Koscielnicki [Mon, 9 May 2016 20:57:36 +0000 (20:57 +0000)]
[MSan] [AArch64] Fix vararg helper for >1 or non-int fixed arguments.

This fixes http://llvm.org/PR27646 on AArch64.

There are three issues here:

- The GR save area is 7 words in size, instead of 8.  This is not enough
  if none of the fixed arguments is passed in GRs (they're all floats or
  aggregates).
- The first argument is ignored (which counteracts the above if it's passed
  in GR).
- Like x86_64, fixed arguments landing in the overflow area are wrongly
  counted towards the overflow offset.

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

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

8 years agoSeparate the Verifier into an analysis and a transformation pass and
Adrian Prantl [Mon, 9 May 2016 19:57:29 +0000 (19:57 +0000)]
Separate the Verifier into an analysis and a transformation pass and
allow the transformation to strip invalid debug info.

This patch separates the Verifier into an analysis and a transformation
pass, with the transformation pass optionally stripping malformed
debug info.

The problem I'm trying to solve with this sequence of patches is that
historically we've done a really bad job at verifying debug info. We want
to be able to make the verifier stricter without having to worry about
breaking bitcode compatibility with existing producers. For example, we
don't necessarily want IR produced by an older version of clang to be
rejected by an LTO link just because of malformed debug info, and rather
provide an option to strip it. Note that merely outdated (but well-formed)
debug info would continue to be auto-upgraded in this scenario.

http://reviews.llvm.org/D19988
rdar://problem/25818489

This reapplies r268937 without modifications.

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

8 years agoAllow the LTO code generator to strip invalid debug info from the input.
Adrian Prantl [Mon, 9 May 2016 19:57:15 +0000 (19:57 +0000)]
Allow the LTO code generator to strip invalid debug info from the input.

This patch introduces a new option -lto-strip-invalid-debug-info, which
drops malformed debug info from the input.

The problem I'm trying to solve with this sequence of patches is that
historically we've done a really bad job at verifying debug info. We want
to be able to make the verifier stricter without having to worry about
breaking bitcode compatibility with existing producers. For example, we
don't necessarily want IR produced by an older version of clang to be
rejected by an LTO link just because of malformed debug info, and rather
provide an option to strip it. Note that merely outdated (but well-formed)
debug info would continue to be auto-upgraded in this scenario.

rdar://problem/25818489
http://reviews.llvm.org/D19987

This reapplies 268936 with a test case fix for Linux (-exported-symbol foo)

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

8 years ago[X86] Drop the 64-bit alignment for LOW32_ADDR_ACCESS register class.
Quentin Colombet [Mon, 9 May 2016 19:50:30 +0000 (19:50 +0000)]
[X86] Drop the 64-bit alignment for LOW32_ADDR_ACCESS register class.

The only 64-bit register in that register class is RIP and it will not
get spilled in the current ABIs.

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

8 years ago[libFuzzer] reshuffle docs more
Kostya Serebryany [Mon, 9 May 2016 19:32:10 +0000 (19:32 +0000)]
[libFuzzer] reshuffle docs more

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

8 years ago[InstCombine] Fold icmp eq/ne (udiv i32 A, B), 0 -> icmp ugt/ule B, A.
Chad Rosier [Mon, 9 May 2016 19:30:20 +0000 (19:30 +0000)]
[InstCombine] Fold icmp eq/ne (udiv i32 A, B), 0 -> icmp ugt/ule B, A.

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

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

8 years ago[libFuzzer] reshuffle docs
Kostya Serebryany [Mon, 9 May 2016 19:29:53 +0000 (19:29 +0000)]
[libFuzzer] reshuffle docs

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

8 years ago[libFuzzer] better document the -merge=1 flag, part 2
Kostya Serebryany [Mon, 9 May 2016 19:23:28 +0000 (19:23 +0000)]
[libFuzzer] better document the -merge=1 flag, part 2

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

8 years ago[libFuzzer] better document the -merge=1 flag
Kostya Serebryany [Mon, 9 May 2016 19:11:36 +0000 (19:11 +0000)]
[libFuzzer] better document the -merge=1 flag

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

8 years agoReapply [X86] Add a new LOW32_ADDR_ACCESS_RBP register class.
Quentin Colombet [Mon, 9 May 2016 19:01:46 +0000 (19:01 +0000)]
Reapply [X86] Add a new LOW32_ADDR_ACCESS_RBP register class.

This reapplies commit r268796, with a fix for the setting of the inline asm
constraints. I.e., "mark" LOW32_ADDR_ACCESS_RBP as a GR variant, so that the
regular processing of the GR operands (setting of the subregisters) happens.

Original commit log:
[X86] Add a new LOW32_ADDR_ACCESS_RBP register class.

ABIs like NaCl uses 32-bit addresses but have 64-bit frame.
The new register class reflects those constraints when choosing a
register class for a address access.

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

8 years ago[X86] Update a regexp in a test case to resist register allocation
Quentin Colombet [Mon, 9 May 2016 19:01:42 +0000 (19:01 +0000)]
[X86] Update a regexp in a test case to resist register allocation
changes.

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

8 years ago[X86] Strengthen the setting of inline asm constraints.
Quentin Colombet [Mon, 9 May 2016 19:01:35 +0000 (19:01 +0000)]
[X86] Strengthen the setting of inline asm constraints.

The setting of the inline asm constraints was implicitly relying on the
order of the register classes in the file generated by tablegen.
Since, we do not have any control on that order, make sure we do not
depend on it anymore.

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

8 years ago[Power9] Add support for -mcpu=pwr9 in the back end
Nemanja Ivanovic [Mon, 9 May 2016 18:54:58 +0000 (18:54 +0000)]
[Power9] Add support for -mcpu=pwr9 in the back end

This patch corresponds to review:
http://reviews.llvm.org/D19683

Simply adds the bits for being able to specify -mcpu=pwr9 to the back end.

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

8 years agoclean up; NFC
Sanjay Patel [Mon, 9 May 2016 18:54:14 +0000 (18:54 +0000)]
clean up; NFC

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

8 years agoFix build error with ambiguity of size_t.
Zachary Turner [Mon, 9 May 2016 18:45:21 +0000 (18:45 +0000)]
Fix build error with ambiguity of size_t.

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

8 years ago[Hexagon] Treat all conditional branches as predicted (not-taken by default)
Krzysztof Parzyszek [Mon, 9 May 2016 18:22:07 +0000 (18:22 +0000)]
[Hexagon] Treat all conditional branches as predicted (not-taken by default)

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

8 years ago[AMDGPU] Clean up debugger tests
Konstantin Zhuravlyov [Mon, 9 May 2016 18:05:42 +0000 (18:05 +0000)]
[AMDGPU] Clean up debugger tests

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

8 years agoUnbreak the non-windows build.
Benjamin Kramer [Mon, 9 May 2016 18:05:28 +0000 (18:05 +0000)]
Unbreak the non-windows build.

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

8 years ago[pdb] Parse the module info stream for each module.
Zachary Turner [Mon, 9 May 2016 17:45:21 +0000 (17:45 +0000)]
[pdb] Parse the module info stream for each module.

Differential Revision: http://reviews.llvm.org/D20026
Reviewed By: rnk

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

8 years agoMake TypeIterator generic so it can iterate symbols too.
Zachary Turner [Mon, 9 May 2016 17:44:58 +0000 (17:44 +0000)]
Make TypeIterator generic so it can iterate symbols too.

Reviewed By: amccarth
Differential Revision: http://reviews.llvm.org/D20038

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

8 years agoRevert "Allow the LTO code generator to strip invalid debug info from the input."
Adrian Prantl [Mon, 9 May 2016 17:43:30 +0000 (17:43 +0000)]
Revert "Allow the LTO code generator to strip invalid debug info from the input."

This reverts commit 268936 while investigating buildbot breakage.

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

8 years agoRevert "Separate the Verifier into an analysis and a transformation pass and"
Adrian Prantl [Mon, 9 May 2016 17:43:24 +0000 (17:43 +0000)]
Revert "Separate the Verifier into an analysis and a transformation pass and"

This reverts commit 268937 while investigating build bot breakage.

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

8 years ago[mips] Fix a partially initialized member variable that was introduced in r268896.
Daniel Sanders [Mon, 9 May 2016 17:42:04 +0000 (17:42 +0000)]
[mips] Fix a partially initialized member variable that was introduced in r268896.

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

8 years agoSeparate the Verifier into an analysis and a transformation pass and
Adrian Prantl [Mon, 9 May 2016 17:37:42 +0000 (17:37 +0000)]
Separate the Verifier into an analysis and a transformation pass and
allow the transformation to strip invalid debug info.

This patch separates the Verifier into an analysis and a transformation
pass, with the transformation pass optionally stripping malformed
debug info.

The problem I'm trying to solve with this sequence of patches is that
historically we've done a really bad job at verifying debug info. We want
to be able to make the verifier stricter without having to worry about
breaking bitcode compatibility with existing producers. For example, we
don't necessarily want IR produced by an older version of clang to be
rejected by an LTO link just because of malformed debug info, and rather
provide an option to strip it. Note that merely outdated (but well-formed)
debug info would continue to be auto-upgraded in this scenario.

http://reviews.llvm.org/D19988
rdar://problem/25818489

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

8 years agoAllow the LTO code generator to strip invalid debug info from the input.
Adrian Prantl [Mon, 9 May 2016 17:37:33 +0000 (17:37 +0000)]
Allow the LTO code generator to strip invalid debug info from the input.

This patch introduces a new option -lto-strip-invalid-debug-info, which
drops malformed debug info from the input.

The problem I'm trying to solve with this sequence of patches is that
historically we've done a really bad job at verifying debug info. We want
to be able to make the verifier stricter without having to worry about
breaking bitcode compatibility with existing producers. For example, we
don't necessarily want IR produced by an older version of clang to be
rejected by an LTO link just because of malformed debug info, and rather
provide an option to strip it. Note that merely outdated (but well-formed)
debug info would continue to be auto-upgraded in this scenario.

rdar://problem/25818489
http://reviews.llvm.org/D19987

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

8 years ago[CGP] avoid crashing from weightlessness
Sanjay Patel [Mon, 9 May 2016 17:31:55 +0000 (17:31 +0000)]
[CGP] avoid crashing from weightlessness

It's possible that we have branch weights with 0 values.
In that case, don't try to create an impossible BranchProbability.

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

8 years agoDivergenceAnalysis: Fix crash with no return blocks
Matt Arsenault [Mon, 9 May 2016 16:57:08 +0000 (16:57 +0000)]
DivergenceAnalysis: Fix crash with no return blocks

The post dominator tree does not have a root node in this case.

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

8 years ago[TargetLowering] make helper function for SetCC + and optimizations (NFC)
Sanjay Patel [Mon, 9 May 2016 16:42:50 +0000 (16:42 +0000)]
[TargetLowering] make helper function for SetCC + and optimizations (NFC)

After looking at D19087 again, it occurred to me that we can do better. If we consolidate
the valueHasExactlyOneBitSet() transforms, we won't incur extra overhead from calling it a
2nd time, and we can shrink SimplifySetCC() a bit. No functional change intended.

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

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

8 years agoFixed unused but set variable warning
Simon Pilgrim [Mon, 9 May 2016 16:42:23 +0000 (16:42 +0000)]
Fixed unused but set variable warning

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

8 years agoAMDGPU: Fold shift into cvt_f32_ubyteN
Matt Arsenault [Mon, 9 May 2016 16:29:50 +0000 (16:29 +0000)]
AMDGPU: Fold shift into cvt_f32_ubyteN

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

8 years agofix spelling; NFC
Sanjay Patel [Mon, 9 May 2016 16:07:45 +0000 (16:07 +0000)]
fix spelling; NFC

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

8 years ago[mips] Try to fix 'truncation from FindBestPredicateResult to bool' reported by MSVC
Daniel Sanders [Mon, 9 May 2016 15:50:15 +0000 (15:50 +0000)]
[mips] Try to fix 'truncation from FindBestPredicateResult to bool' reported by MSVC

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

8 years ago[mips][ias] Attempt to fix 'not all control paths return a value' reported by MSVC.
Daniel Sanders [Mon, 9 May 2016 15:37:52 +0000 (15:37 +0000)]
[mips][ias] Attempt to fix 'not all control paths return a value' reported by MSVC.

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

8 years ago[dsymutil] Prevent use-after-free
Frederic Riss [Mon, 9 May 2016 14:44:14 +0000 (14:44 +0000)]
[dsymutil] Prevent use-after-free

The BinaryHolder would query the archive member MemoryBuffer name
to check if the current open archive also contains the next requested
objectfile. This comparison was using a StringRef to a temporary
buffer. It only happened with fat archives. This commit adds long-lived
storage along with the MemoryBuffers for the fat archive filename.

The added test would fail during an ASAN build without the fix.

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

8 years agoOptimize a printf with a double procent to putchar.
Joerg Sonnenberger [Mon, 9 May 2016 14:36:16 +0000 (14:36 +0000)]
Optimize a printf with a double procent to putchar.

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

8 years ago[VectorUtils] Query number of sign bits to allow more truncations
James Molloy [Mon, 9 May 2016 14:32:30 +0000 (14:32 +0000)]
[VectorUtils] Query number of sign bits to allow more truncations

When deciding if a vector calculation can be done in a smaller bitwidth, use sign bit information from ValueTracking to add more information and allow more truncations.

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

8 years ago[mips][micromips] Make getPointerRegClass() result depend on the instruction.
Daniel Sanders [Mon, 9 May 2016 13:38:25 +0000 (13:38 +0000)]
[mips][micromips] Make getPointerRegClass() result depend on the instruction.

Summary:
Previously, it returned the GPR16MMRegClass for all instructions which was
incorrect for instructions like lwsp/lwgp and unnecesarily restricted the
permitted registers for instructions like lw32.

This fixes quite a few of the -verify-machineinstrs errors reported in PR27458.
I've only added -verify-machineinstrs to one test in this change since I
understand there is a plan to enable the verifier by default.

Reviewers: hvarga, zbuljan, zoran.jovanovic, sdardis

Subscribers: dsanders, llvm-commits, sdardis

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

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

8 years agoFix bug where temporary file would be left behind every time an archive was updated.
Rafael Espindola [Mon, 9 May 2016 13:31:11 +0000 (13:31 +0000)]
Fix  bug where temporary file would be left behind every time an archive was updated.

When updating an existing archive, llvm-ar opens the old archive into a
`MemoryBuffer`, does its thing, and writes the results to a temporary
file. That file is then renamed to the original archive filename, thus
replacing it with the updated contents. However, on Windows at least,
what would happen is that the `MemoryBuffer` for the old archive would
actually be an mmap'ed view of the file, so when it came time to do the
rename via Win32's `ReplaceFile`, it would succeed but would be unable
to fully replace the file since there would still be a handle open on
it; instead, the old version got renamed to a random temporary name and
left behind.

Patch by Cameron!

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

8 years ago[X86][SSE] Added TODO comment to add support for AVX512 mask registers to shuffle...
Simon Pilgrim [Mon, 9 May 2016 13:30:16 +0000 (13:30 +0000)]
[X86][SSE] Added TODO comment to add support for AVX512 mask registers to shuffle comments

This came up in discussion on D19198

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

8 years ago[mips] Fix use after free and an unnecessary copy introduced in r268896.
Daniel Sanders [Mon, 9 May 2016 13:10:57 +0000 (13:10 +0000)]
[mips] Fix use after free and an unnecessary copy introduced in r268896.

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

8 years ago[PowerPC] fix register alignment for long double type
Strahinja Petrovic [Mon, 9 May 2016 12:27:39 +0000 (12:27 +0000)]
[PowerPC] fix register alignment for long double type

This patch fixes register alignment for long double type in
soft float mode. Before this patch alignment was 8 and this
patch changes it to 4.
Differential Revision: http://reviews.llvm.org/D18034

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

8 years ago[Sparc][LEON] Add UMAC and SMAC instruction support for Sparc LEON subtargets
Chris Dewhurst [Mon, 9 May 2016 11:55:15 +0000 (11:55 +0000)]
[Sparc][LEON] Add UMAC and SMAC instruction support for Sparc LEON subtargets

This change adds SMAC (signed multiply-accumulate) and UMAC (unsigned multiply-accumulate) for LEON subtargets of the Sparc processor.

The new files LeonFeatures.td and leon-instructions.ll will both be expanded in future, so I want to leave them separate as small files for this review, to be expanded in future check-ins.

Note: The functions are provided only for inline-assembly provision. No DAG selection is provided.

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

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

8 years ago[AArch64] Implement lowering of the X constraint on AArch64
Silviu Baranga [Mon, 9 May 2016 11:10:44 +0000 (11:10 +0000)]
[AArch64] Implement lowering of the X constraint on AArch64

Summary:
This implements the lowering of the X constraint on
AArch64.

The default behaviour of the X constraint lowering is to
restrict it to "f". This is a problem because the "f"
constraint is not implemented on AArch64 and would be too
restrictive anyway. Therefore, the AArch64 hook will
lower this to "w" (if the operand is a floating point or
vector) or "r" otherwise.

The implementation is similar with the one added for
ARM (r267411).

This is the AArch64 side of the fix for http://llvm.org/PR26493

Reviewers: rengolin

Subscribers: aemerson, rengolin, llvm-commits, t.p.northover

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

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

8 years ago[X86][AVX512] Added masked version of combine tests
Simon Pilgrim [Mon, 9 May 2016 10:43:13 +0000 (10:43 +0000)]
[X86][AVX512] Added masked version of combine tests

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

8 years agoRevert "[Mips] Fix use after free."
Benjamin Kramer [Mon, 9 May 2016 10:31:17 +0000 (10:31 +0000)]
Revert "[Mips] Fix use after free."

Fixes use after free but breaks tests.

This reverts commit r268901.

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

8 years ago[Mips] Fix use after free.
Benjamin Kramer [Mon, 9 May 2016 10:21:56 +0000 (10:21 +0000)]
[Mips] Fix use after free.

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

8 years ago[mips][ias] R_MIPS_(GOT|HI|LO|PC)16 and R_MIPS_GPREL32 do not need symbols.
Daniel Sanders [Mon, 9 May 2016 10:21:14 +0000 (10:21 +0000)]
[mips][ias] R_MIPS_(GOT|HI|LO|PC)16 and R_MIPS_GPREL32 do not need symbols.

Summary:
In theory, care must be taken to ensure that pairs of R_MIPS_(GOT|HI|LO)16
make the same decision on both relocs in the reloc pair but in practice
this isn't as hard as it sounds and only limits the complexity of the
predicate used. We handle all three with the same code to ensure their
decisions always agree with each other.

Reviewers: sdardis

Subscribers: rafael, dsanders, sdardis, llvm-commits

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

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

8 years ago[mips][microMIPS] Implement LWP and SWP instructions
Zlatko Buljan [Mon, 9 May 2016 08:07:28 +0000 (08:07 +0000)]
[mips][microMIPS] Implement LWP and SWP instructions
Differential Revision: http://reviews.llvm.org/D10640

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

8 years ago[dsymutil] Fix -arch option for thumb variants.
Frederic Riss [Mon, 9 May 2016 06:01:12 +0000 (06:01 +0000)]
[dsymutil] Fix -arch option for thumb variants.

r267249 removed the dual ARM/Thumb interface from MachOObjectFile,
simplifying llvm-dsymutil's code. This unfortunately also regressed
llvm-dsymutil's ability to select thumb slices, because the simplified
code was also dealing with the discrepency between the slice arch
(eg. armv7m) and the triple arch name (eg. thumbv7m).

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

8 years ago[X86] Strengthen some type contraints for floating point round and extend.
Craig Topper [Mon, 9 May 2016 05:34:14 +0000 (05:34 +0000)]
[X86] Strengthen some type contraints for floating point round and extend.

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

8 years ago[AVX512] Fix up types for arguments of int_x86_avx512_mask_cvtsd2ss_round and int_x86...
Craig Topper [Mon, 9 May 2016 05:34:12 +0000 (05:34 +0000)]
[AVX512] Fix up types for arguments of int_x86_avx512_mask_cvtsd2ss_round and int_x86_avx512_mask_cvtss2sd_round. Only the argument being converted should be a different type. The other 2 argument should have the same type as the result.

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

8 years agoThinLTOCodeGenerator: ignore 0 values for the cache settings.
Mehdi Amini [Mon, 9 May 2016 05:16:30 +0000 (05:16 +0000)]
ThinLTOCodeGenerator: ignore 0 values for the cache settings.

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

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

8 years ago[AVX512] Add non-temporal store patterns for v16i32/v32i16/v64i8.
Craig Topper [Sun, 8 May 2016 23:43:17 +0000 (23:43 +0000)]
[AVX512] Add non-temporal store patterns for v16i32/v32i16/v64i8.

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

8 years agoMinor code cleanups. NFC.
Junmo Park [Sun, 8 May 2016 23:22:58 +0000 (23:22 +0000)]
Minor code cleanups. NFC.

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

8 years ago[AVX512] Add missing patterns for non-temporal stores of 128/256-bit vXi8/vXi16/vXi32...
Craig Topper [Sun, 8 May 2016 23:08:45 +0000 (23:08 +0000)]
[AVX512] Add missing patterns for non-temporal stores of 128/256-bit vXi8/vXi16/vXi32 when VLX is enabled. The equivalent AVX1/2 patterns are disabled by VLX.

This caused regular stores to be emitted instead.

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