platform/upstream/llvm.git
7 years ago[NFC] Update function call names as changed in MacroInfo that should refer to Paramet...
Faisal Vali [Mon, 17 Jul 2017 17:20:57 +0000 (17:20 +0000)]
[NFC] Update function call names as changed in MacroInfo that should refer to Parameters (as opposed to Arguments).

This syncs them up with clang commit r308190

Thanks!

llvm-svn: 308191

7 years ago[NFC] Refactor the Preprocessor function that handles Macro definitions and rename...
Faisal Vali [Mon, 17 Jul 2017 17:18:43 +0000 (17:18 +0000)]
[NFC] Refactor the Preprocessor function that handles Macro definitions and rename Arguments to Parameters in Macro Definitions.
  - Extracted the reading of the tokens out into a separate function.
  - Replace 'Argument' with 'Parameter' when referring to the identifiers of the macro definition (as opposed to the supplied arguments - MacroArgs - during the macro invocation).

This is in preparation for submitting patches for review to implement __VA_OPT__ which will otherwise just keep lengthening the HandleDefineDirective function and making it less comprehensible.

I will also directly update some extra clang tooling that is broken by the change from Argument to Parameter.

Hopefully the bots will stay appeased.

Thanks!

llvm-svn: 308190

7 years agoRemoved "duplicates" from verbose affinity output
Jonathan Peyton [Mon, 17 Jul 2017 17:06:43 +0000 (17:06 +0000)]
Removed "duplicates" from verbose affinity output

The internal details of this setting are not meant to be user visible and only create confusion.

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

llvm-svn: 308189

7 years ago[ELF] Introduce target specific inBranchRange() function
Peter Smith [Mon, 17 Jul 2017 16:54:29 +0000 (16:54 +0000)]
[ELF] Introduce target specific inBranchRange() function

In preparation for range extension thunks introduce a function that will
check whether a branch identified by a relocation type at a source address
can reach a destination.

For targets where range extension thunks are not supported the function will
return true as it is not expected that branches are out of range. An
implementation has been provided for ARM.

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

llvm-svn: 308188

7 years ago [PPCGCodeGeneration] Generate invariant loads before trying to generate IR.
Siddharth Bhat [Mon, 17 Jul 2017 15:57:01 +0000 (15:57 +0000)]
 [PPCGCodeGeneration] Generate invariant loads before trying to generate IR.

 - We should call `preloadInvariantLoads` to make sure that code is
   generated for invariant loads in the kernel.

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

llvm-svn: 308187

7 years ago[Hexagon] Remove custom lowering of loads of v4i16
Krzysztof Parzyszek [Mon, 17 Jul 2017 15:45:45 +0000 (15:45 +0000)]
[Hexagon] Remove custom lowering of loads of v4i16

The target-independent lowering works fine, except concatenating 32-bit
words. Add a pattern to generate A2_combinew instead of 64-bit asl/or.

llvm-svn: 308186

7 years agoFix dereference of pointers in throw statements.
Manuel Klimek [Mon, 17 Jul 2017 15:27:53 +0000 (15:27 +0000)]
Fix dereference of pointers in throw statements.

Before:
  throw * x;

After:
  throw *x;

Patch by Erik Uhlmann.

llvm-svn: 308185

7 years agoAvoid store merge to f128 in context of noimpiccitfloat NFCI.
Nirav Dave [Mon, 17 Jul 2017 15:09:47 +0000 (15:09 +0000)]
Avoid store merge to f128 in context of noimpiccitfloat NFCI.

Prevent store merge from merging stores into an invalid 128-bit store
(realized as a f128 value in the context of the noimplicitfloat
attribute). Previously, such stores are immediately split back into
valid stores.

llvm-svn: 308184

7 years ago[OPENMP] Fix reduction combiner test
Alexey Bataev [Mon, 17 Jul 2017 14:53:02 +0000 (14:53 +0000)]
[OPENMP] Fix reduction combiner test

llvm-svn: 308183

7 years ago[OPENMP] Further fixes of the reduction codegen tests
Alexey Bataev [Mon, 17 Jul 2017 14:47:59 +0000 (14:47 +0000)]
[OPENMP] Further fixes of the reduction codegen tests

llvm-svn: 308182

7 years ago[clang-tidy] Add modernize-use-bool-literals.IgnoreMacros option
Alexander Kornienko [Mon, 17 Jul 2017 14:43:06 +0000 (14:43 +0000)]
[clang-tidy] Add modernize-use-bool-literals.IgnoreMacros option

llvm-svn: 308181

7 years ago[X86] Add LEA scheduling tests
Simon Pilgrim [Mon, 17 Jul 2017 14:37:17 +0000 (14:37 +0000)]
[X86] Add LEA scheduling tests

llvm-svn: 308180

7 years ago[AMDGPU] CodeGen: check dst operand type to determine if omod is supported for VOP3...
Sam Kolton [Mon, 17 Jul 2017 14:23:38 +0000 (14:23 +0000)]
[AMDGPU] CodeGen: check dst operand type to determine if omod is supported for VOP3 instructions

Summary:
Previously, CodeGen checked first src operand type to determine if omod is supported by instruction. This isn't correct for some instructions: e.g. V_CMP_EQ_F32 has floating-point src operands but desn't support omod.
Changed .td files to check if dst operand instead of src operand.

Reviewers: arsenm, vpykhtin

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye

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

llvm-svn: 308179

7 years ago[OPENMP] Further test fixes.
Alexey Bataev [Mon, 17 Jul 2017 14:22:34 +0000 (14:22 +0000)]
[OPENMP] Further test fixes.

llvm-svn: 308178

7 years ago[X86][AVX512] Add lowering of vXi32/vXi64 ISD::ROTL/ISD::ROTR
Simon Pilgrim [Mon, 17 Jul 2017 14:11:30 +0000 (14:11 +0000)]
[X86][AVX512] Add lowering of vXi32/vXi64 ISD::ROTL/ISD::ROTR

Add support for lowering to ISD::ROTL/ISD::ROTR, including rotate by immediate

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

llvm-svn: 308177

7 years ago[OPENMP] Rework tests to pacify buildbots.
Alexey Bataev [Mon, 17 Jul 2017 14:06:41 +0000 (14:06 +0000)]
[OPENMP] Rework tests to pacify buildbots.

llvm-svn: 308176

7 years agoFixed line endings. NFCI.
Simon Pilgrim [Mon, 17 Jul 2017 13:58:20 +0000 (13:58 +0000)]
Fixed line endings. NFCI.

llvm-svn: 308175

7 years ago[OPENMP] Codegen for reduction clauses in 'taskloop' directives.
Alexey Bataev [Mon, 17 Jul 2017 13:30:36 +0000 (13:30 +0000)]
[OPENMP] Codegen for reduction clauses in 'taskloop' directives.

Adds codegen for taskloop-based directives.

llvm-svn: 308174

7 years ago[CodeGen] Add begin-end iterators to MachineInstr
Javed Absar [Mon, 17 Jul 2017 13:15:26 +0000 (13:15 +0000)]
[CodeGen] Add begin-end iterators to MachineInstr

Convert iteration over operands to range-loop.

Reviewed by: @rovka, @echristo
Differential Revision: https://reviews.llvm.org/D35419

llvm-svn: 308173

7 years ago[YAMLTraits] Add filename support to yaml::Input
Alex Bradbury [Mon, 17 Jul 2017 11:41:30 +0000 (11:41 +0000)]
[YAMLTraits] Add filename support to yaml::Input

Summary:
The current yaml::Input constructor takes a StringRef of data as its
first parameter, discarding any filename information that may have been
present when a YAML file was opened. Add an alterate yaml::Input
constructor that takes a MemoryBufferRef, which can have a filename
associated with it. This leads to clearer diagnostic messages.

Sponsored By: DARPA, AFRL

Reviewed By: arphaman

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

Patch by: Jonathan Anderson (trombonehero)

llvm-svn: 308172

7 years ago[X86][AVX] Fix typo in vector rotate tests
Simon Pilgrim [Mon, 17 Jul 2017 10:35:51 +0000 (10:35 +0000)]
[X86][AVX] Fix typo in vector rotate tests

Was preventing rotate matching

llvm-svn: 308171

7 years ago[ELF] - Stop listing version-script= form as ignored option.
George Rimar [Mon, 17 Jul 2017 10:15:15 +0000 (10:15 +0000)]
[ELF] - Stop listing version-script= form as ignored option.

Funny but we list it as ignored for about 1.5 years atm,
though LLD started to support version script really long time ago.

llvm-svn: 308170

7 years ago[X86][AVX512] Add constant splat vector rotate tests for D35463
Simon Pilgrim [Mon, 17 Jul 2017 10:09:48 +0000 (10:09 +0000)]
[X86][AVX512] Add constant splat vector rotate tests for D35463

llvm-svn: 308169

7 years ago[X86][AVX512] Regenerate shift tests
Simon Pilgrim [Mon, 17 Jul 2017 09:53:45 +0000 (09:53 +0000)]
[X86][AVX512] Regenerate shift tests

llvm-svn: 308168

7 years ago[ELF] - Implement filter library support (-F / --filter)
George Rimar [Mon, 17 Jul 2017 09:43:18 +0000 (09:43 +0000)]
[ELF] - Implement filter library support (-F / --filter)

This is PR33766.

-F name
--filter=name
When creating an ELF shared object, set the internal DT_FILTER field to the specified name. This tells the dynamic linker that the symbol table of the shared object which is being created should be used as a filter on the symbol table of the shared object name.

If you later link a program against this filter object, then, when you run the program, the dynamic linker will see the DT_FILTER field. The dynamic linker will resolve symbols according to the symbol table of the filter object as usual, but it will actually link to the definitions found in the shared object name. Thus the filter object can be used to select a subset of the symbols provided by the object name.
(https://linux.die.net/man/1/ld).

Shared Objects as Filters:
https://docs.oracle.com/cd/E19683-01/817-3677/chapter4-31738/index.html

Differential revision: https://reviews.llvm.org/D35352

llvm-svn: 308167

7 years agoRemove unnecessary cast. NFCI.
Simon Pilgrim [Mon, 17 Jul 2017 09:35:03 +0000 (09:35 +0000)]
Remove unnecessary cast. NFCI.

llvm-svn: 308166

7 years agoOpenMP RTL cleanup: eliminated warnings with -Wcast-qual, patch 2.
Andrey Churbanov [Mon, 17 Jul 2017 09:03:14 +0000 (09:03 +0000)]
OpenMP RTL cleanup: eliminated warnings with -Wcast-qual, patch 2.

Changes are: got all atomics to accept volatile pointers that allowed
to simplify many type conversions. Windows specific code fixed correspondingly.

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

llvm-svn: 308164

7 years ago[X86] Use MSVC's __cpuidex intrinsic instead of inline assembly in getHostCPUName...
Craig Topper [Mon, 17 Jul 2017 05:16:16 +0000 (05:16 +0000)]
[X86] Use MSVC's __cpuidex intrinsic instead of inline assembly in getHostCPUName/getHostCPUFeatures for 32-bit builds too.

We're already using it in 64-bit builds because 64-bit MSVC doesn't support inline assembly.

As far as I know we were using inline assembly because at the time the code was added we had to support MSVC 2008 pre-SP1 while the intrinsic was added to MSVC in SP1. Now that we don't have to support that we should be able to just use the intrinsic.

llvm-svn: 308163

7 years agoAnalysis/MemorySSA.cpp: Prune unused "llvm/Transforms/Scalar.h".
NAKAMURA Takumi [Mon, 17 Jul 2017 04:31:26 +0000 (04:31 +0000)]
Analysis/MemorySSA.cpp: Prune unused "llvm/Transforms/Scalar.h".

llvm-svn: 308162

7 years agoIR/Core.cpp: Prune unused "llvm/Bitcode/BitcodeReader.h".
NAKAMURA Takumi [Mon, 17 Jul 2017 04:31:23 +0000 (04:31 +0000)]
IR/Core.cpp: Prune unused "llvm/Bitcode/BitcodeReader.h".

llvm-svn: 308161

7 years agoSupport/Path.cpp: Prune unused "llvm/BinaryFormat".
NAKAMURA Takumi [Mon, 17 Jul 2017 04:31:20 +0000 (04:31 +0000)]
Support/Path.cpp: Prune unused "llvm/BinaryFormat".

llvm-svn: 308160

7 years agoAdd case for c++2a to libc++ and test macros
Marshall Clow [Mon, 17 Jul 2017 03:02:27 +0000 (03:02 +0000)]
Add case for c++2a to libc++ and test macros

llvm-svn: 308159

7 years agoRevert changes from my previous refactoring - will need to fix dependencies in clang...
Faisal Vali [Mon, 17 Jul 2017 02:03:21 +0000 (02:03 +0000)]
Revert changes from my previous refactoring - will need to fix dependencies in clang's extra tooling (such as clang-tidy etc.).

Sorry about that.

llvm-svn: 308158

7 years ago[NFC] Refactor the Preprocessor function that handles Macro definitions and rename...
Faisal Vali [Mon, 17 Jul 2017 01:27:53 +0000 (01:27 +0000)]
[NFC] Refactor the Preprocessor function that handles Macro definitions and rename Arguments to Parameters in Macro Definitions.
  - Extracted the reading of the tokens out into a separate function.
  - Replace 'Argument' with 'Parameter' when referring to the identifiers of the macro definition (as opposed to the supplied arguments - MacroArgs - during the macro invocation).

This is in preparation for submitting patches for review to implement __VA_OPT__ which will otherwise just keep lengthening the HandleDefineDirective function and making it less comprehensible.

Thanks!

llvm-svn: 308157

7 years agoEnable TLS support on OpenBSD.
Brad Smith [Mon, 17 Jul 2017 01:06:46 +0000 (01:06 +0000)]
Enable TLS support on OpenBSD.

llvm-svn: 308156

7 years agoEnable TLS support on OpenBSD, but default to the emulatated TLS model.
Brad Smith [Mon, 17 Jul 2017 00:49:31 +0000 (00:49 +0000)]
Enable TLS support on OpenBSD, but default to the emulatated TLS model.

llvm-svn: 308155

7 years ago[COFF, ARM64] Add initial relocation types
Mandeep Singh Grang [Mon, 17 Jul 2017 00:05:32 +0000 (00:05 +0000)]
[COFF, ARM64] Add initial relocation types

Reviewers: compnerd, ruiu, rnk

Reviewed By: compnerd

Subscribers: mstorsjo, aemerson, javed.absar, kristof.beyls, llvm-commits

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

llvm-svn: 308154

7 years agoUpdate libc++ status pages with results of the Toronto Meeting - and for C++2a
Marshall Clow [Sun, 16 Jul 2017 23:59:23 +0000 (23:59 +0000)]
Update libc++ status pages with results of the Toronto Meeting - and for C++2a

llvm-svn: 308153

7 years agoScopInfo: Remove not-in-DomainMap statements in separate function
Tobias Grosser [Sun, 16 Jul 2017 23:55:38 +0000 (23:55 +0000)]
ScopInfo: Remove not-in-DomainMap statements in separate function

This separates ScopBuilder internal and ScopBuilder external functionality.

llvm-svn: 308152

7 years ago[AVR] Add/remove XFAILs to get the backend passing Generic CodeGen tests
Dylan McKay [Sun, 16 Jul 2017 23:33:50 +0000 (23:33 +0000)]
[AVR] Add/remove XFAILs to get the backend passing Generic CodeGen tests

A few tests have since been fixed, and a few since now fail.

llvm-svn: 308151

7 years ago[DAGCombiner] Recognise vector rotations with non-splat constants
Andrew Zhogin [Sun, 16 Jul 2017 23:11:45 +0000 (23:11 +0000)]
[DAGCombiner] Recognise vector rotations with non-splat constants

Fixes PR33691.

Differential revision: https://reviews.llvm.org/D35381

llvm-svn: 308150

7 years agoFix typo in comment [NFC]
Tobias Grosser [Sun, 16 Jul 2017 22:44:17 +0000 (22:44 +0000)]
Fix typo in comment [NFC]

llvm-svn: 308149

7 years ago[AVR] Fix a typo in the tests
Dylan McKay [Sun, 16 Jul 2017 22:31:07 +0000 (22:31 +0000)]
[AVR] Fix a typo in the tests

llvm-svn: 308148

7 years agoAMDGPU: Fix amdgpu-flat-work-group-size/amdgpu-waves-per-eu check
Konstantin Zhuravlyov [Sun, 16 Jul 2017 19:38:47 +0000 (19:38 +0000)]
AMDGPU: Fix amdgpu-flat-work-group-size/amdgpu-waves-per-eu check

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

llvm-svn: 308147

7 years ago[X86][AVX512] Add 512-bit vector rotate tests
Simon Pilgrim [Sun, 16 Jul 2017 19:26:49 +0000 (19:26 +0000)]
[X86][AVX512] Add 512-bit vector rotate tests

llvm-svn: 308146

7 years agoAMDGPU: Remove duplicate print outs from .AMDGPU.csdata
Konstantin Zhuravlyov [Sun, 16 Jul 2017 19:24:08 +0000 (19:24 +0000)]
AMDGPU: Remove duplicate print outs from .AMDGPU.csdata

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

llvm-svn: 308145

7 years ago[InstCombine] Don't violate dominance when replacing instructions.
Davide Italiano [Sun, 16 Jul 2017 18:56:30 +0000 (18:56 +0000)]
[InstCombine] Don't violate dominance when replacing instructions.

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

llvm-svn: 308144

7 years agoStrip trailing whitespace. NFCI
Simon Pilgrim [Sun, 16 Jul 2017 18:37:23 +0000 (18:37 +0000)]
Strip trailing whitespace. NFCI

llvm-svn: 308143

7 years ago[X86] X86::CMOV to Branch heuristic based optimization.
Amjad Aboud [Sun, 16 Jul 2017 17:39:56 +0000 (17:39 +0000)]
[X86] X86::CMOV to Branch heuristic based optimization.

LLVM compiler recognizes opportunities to transform a branch into IR select instruction(s) - later it will be lowered into X86::CMOV instruction, assuming no other optimization eliminated the SelectInst.
However, it is not always profitable to emit X86::CMOV instruction. For example, branch is preferable over an X86::CMOV instruction when:
1. Branch is well predicted
2. Condition operand is expensive, compared to True-value and the False-value operands

In CodeGenPrepare pass there is a shallow optimization that tries to convert SelectInst into branch, but it is not enough.
This commit, implements machine optimization pass that converts X86::CMOV instruction(s) into branch, based on a conservative heuristic.

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

llvm-svn: 308142

7 years agoApply explicit instantiation workaround to DominanceFrontier
Jakub Kuderski [Sun, 16 Jul 2017 17:29:19 +0000 (17:29 +0000)]
Apply explicit instantiation workaround to DominanceFrontier

This is a workaround for the same explicit instantiation bug
as in DominatorTreeBase.

llvm-svn: 308141

7 years ago[Dominators] Workaround explicit instantiation bug.
Jakub Kuderski [Sun, 16 Jul 2017 17:01:40 +0000 (17:01 +0000)]
[Dominators] Workaround explicit instantiation bug.

Some platforms have problems with emmiting constructors when class
templates get explicitly instantiated.
This patch fixes the bug reported in D35315 by replacing `= default`
with an empty constructor body.

llvm-svn: 308140

7 years ago[Bash-autocompletion] Add support for -W<warning> and -Wno<warning>
Yuka Takahashi [Sun, 16 Jul 2017 15:07:20 +0000 (15:07 +0000)]
[Bash-autocompletion] Add support for -W<warning> and -Wno<warning>

Summary:
`-W[tab]` will autocomplete warnings defined in this link:
https://clang.llvm.org/docs/DiagnosticsReference.html#wweak-vtables

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

llvm-svn: 308139

7 years ago[X86] Add F16C scheduling tests
Simon Pilgrim [Sun, 16 Jul 2017 14:34:18 +0000 (14:34 +0000)]
[X86] Add F16C scheduling tests

llvm-svn: 308138

7 years ago[X86] Add POPCNT scheduling tests
Simon Pilgrim [Sun, 16 Jul 2017 14:22:39 +0000 (14:22 +0000)]
[X86] Add POPCNT scheduling tests

llvm-svn: 308137

7 years ago[X86] Add BMI2 scheduling tests
Simon Pilgrim [Sun, 16 Jul 2017 14:09:15 +0000 (14:09 +0000)]
[X86] Add BMI2 scheduling tests

llvm-svn: 308136

7 years ago[X86] Add BMI1 scheduling tests
Simon Pilgrim [Sun, 16 Jul 2017 13:59:44 +0000 (13:59 +0000)]
[X86] Add BMI1 scheduling tests

llvm-svn: 308135

7 years ago[Polly] Fix a typo [NFC]
Tobias Grosser [Sun, 16 Jul 2017 13:54:41 +0000 (13:54 +0000)]
[Polly] Fix a typo [NFC]

Reviewers: grosser, Meinersbur, bollu

Tags: #polly

Contributed-by: Nandini Singhal <cs15mtech01004@iith.ac.in>
Differential Revision: https://reviews.llvm.org/D35459

llvm-svn: 308134

7 years ago[X86] Add LZCNT scheduling tests
Simon Pilgrim [Sun, 16 Jul 2017 13:40:44 +0000 (13:40 +0000)]
[X86] Add LZCNT scheduling tests

llvm-svn: 308133

7 years ago[X86][SSE4A] Add EXTRQ/INSERTQ values to BTVER2 scheduling model
Simon Pilgrim [Sun, 16 Jul 2017 12:06:06 +0000 (12:06 +0000)]
[X86][SSE4A] Add EXTRQ/INSERTQ values to BTVER2 scheduling model

llvm-svn: 308132

7 years ago[X86][AVX] Regenerate tests with constant broadcast comments
Simon Pilgrim [Sun, 16 Jul 2017 11:43:16 +0000 (11:43 +0000)]
[X86][AVX] Regenerate tests with constant broadcast comments

llvm-svn: 308131

7 years ago[X86][AVX] Regenerate vector tzcnt tests with constant broadcast comments
Simon Pilgrim [Sun, 16 Jul 2017 11:40:23 +0000 (11:40 +0000)]
[X86][AVX] Regenerate vector tzcnt tests with constant broadcast comments

llvm-svn: 308130

7 years ago[X86][AVX] Regenerate vector idiv tests with constant broadcast comments
Simon Pilgrim [Sun, 16 Jul 2017 11:38:14 +0000 (11:38 +0000)]
[X86][AVX] Regenerate vector idiv tests with constant broadcast comments

llvm-svn: 308129

7 years ago[X86][AVX] Regenerate combine tests with constant broadcast comments
Simon Pilgrim [Sun, 16 Jul 2017 11:36:11 +0000 (11:36 +0000)]
[X86][AVX] Regenerate combine tests with constant broadcast comments

llvm-svn: 308128

7 years agofix typos in comments; NFC
Hiroshi Inoue [Sun, 16 Jul 2017 08:11:56 +0000 (08:11 +0000)]
fix typos in comments; NFC

llvm-svn: 308127

7 years agofix typos in comments; NFC
Hiroshi Inoue [Sun, 16 Jul 2017 07:48:48 +0000 (07:48 +0000)]
fix typos in comments; NFC

llvm-svn: 308126

7 years ago[InstSimplify] Use commutable matchers to simplify some code. NFC
Craig Topper [Sun, 16 Jul 2017 06:57:41 +0000 (06:57 +0000)]
[InstSimplify] Use commutable matchers to simplify some code. NFC

llvm-svn: 308125

7 years ago[InstCombine] Move (0 - x) & 1 --> x & 1 to SimplifyDemandedUseBits.
Craig Topper [Sun, 16 Jul 2017 05:37:58 +0000 (05:37 +0000)]
[InstCombine] Move (0 - x) & 1 --> x & 1 to SimplifyDemandedUseBits.

This removes a dedicated matcher and allows us to support more than just an AND masking the lower bit.

llvm-svn: 308124

7 years ago[asan] Disable not working new test on Windows
Vitaly Buka [Sun, 16 Jul 2017 01:28:40 +0000 (01:28 +0000)]
[asan] Disable not working new test on Windows

llvm-svn: 308123

7 years ago[msan] Add missing include for fix test on Windows
Vitaly Buka [Sun, 16 Jul 2017 01:19:35 +0000 (01:19 +0000)]
[msan] Add missing include for fix test on Windows

llvm-svn: 308122

7 years ago[tsan] Disable test with debug runtime
Vitaly Buka [Sun, 16 Jul 2017 01:05:37 +0000 (01:05 +0000)]
[tsan] Disable test with debug runtime

Test expects at least -O1 compiled runtime.

llvm-svn: 308121

7 years ago[asan] Attempt to fix test in Windows after r308064
Vitaly Buka [Sun, 16 Jul 2017 00:40:40 +0000 (00:40 +0000)]
[asan] Attempt to fix test in Windows after r308064

llvm-svn: 308120

7 years agoFix bot failures from r308114
Teresa Johnson [Sun, 16 Jul 2017 00:28:22 +0000 (00:28 +0000)]
Fix bot failures from r308114

Finally figured out that some bots were failing from r308114
with the message:
  llvm-lto2: LTO::run failed: No available targets are compatible with this triple.
after adding in some other checking that finally caused this to show up
in the FileCheck output.

Added "REQUIRES: x86-registered-target" which should fix it.

llvm-svn: 308119

7 years ago[c++2a] Add option -std=c++2a to enable support for potential/transitional C++2a...
Faisal Vali [Sun, 16 Jul 2017 00:23:04 +0000 (00:23 +0000)]
[c++2a] Add option -std=c++2a to enable support for potential/transitional C++2a features

- as usual C++2a implies all the C++'s that came before it.

Thank you Aaron for the feedback here: https://reviews.llvm.org/D35454

llvm-svn: 308118

7 years ago[compiler-rt] Fix fix format specifies type in test
Vitaly Buka [Sun, 16 Jul 2017 00:17:11 +0000 (00:17 +0000)]
[compiler-rt] Fix fix format specifies type in test

llvm-svn: 308117

7 years agoAttempt 2 to debug bot failures
Teresa Johnson [Sun, 16 Jul 2017 00:01:16 +0000 (00:01 +0000)]
Attempt 2 to debug bot failures

Modify checks from r308114 even more, to see if I can narrow down
why some bots are still failing.

llvm-svn: 308116

7 years agoAttempt to debug bot failures
Teresa Johnson [Sat, 15 Jul 2017 23:31:32 +0000 (23:31 +0000)]
Attempt to debug bot failures

Simplifying checks from r308114, to see if I can narrow down why some
bots are still failing.

llvm-svn: 308115

7 years agoRestore with fix "[ThinLTO] Ensure we always select the same function copy to import"
Teresa Johnson [Sat, 15 Jul 2017 22:58:06 +0000 (22:58 +0000)]
Restore with fix "[ThinLTO] Ensure we always select the same function copy to import"

This restores r308078/r308079 with a fix for bot non-determinisim (make
sure we run llvm-lto in single threaded mode so the debug output doesn't get
interleaved).

llvm-svn: 308114

7 years ago[ScopDetection] If a loop is not part of a scop, none of it backedges can be
Tobias Grosser [Sat, 15 Jul 2017 22:42:17 +0000 (22:42 +0000)]
[ScopDetection] If a loop is not part of a scop, none of it backedges can be

This patch makes sure that in case a loop is not fully contained within a region
that later forms a SCoP, none of the loop backedges are allowed to be part of
the region. We currently do not support the situation where only some of a loops
backedges are part of a scop. Today, this can break both scop modeling and code
generation. One such breaking test case is for example
test/ScopDetectionDiagnostics/loop_partially_in_scop-2.ll, where we totally
forgot to code generate some of the backedges. Fortunately, it is commonly not
necessary to support these partial loops, it is way more common that either
no backedge is included in a region or all loop backedge are included.

This fixes a recent miscompile in
MultiSource/Benchmarks/MiBench/consumer-typeset which was exposed after
r306477.

llvm-svn: 308113

7 years ago[IR] Implement Constant::isNegativeZeroValue/isZeroValue/isAllOnesValue/isOneValue...
Craig Topper [Sat, 15 Jul 2017 22:06:19 +0000 (22:06 +0000)]
[IR] Implement Constant::isNegativeZeroValue/isZeroValue/isAllOnesValue/isOneValue/isMinSignedValue for ConstantDataVector without going through getElementAsConstant

Summary:
Currently these methods call ConstantDataVector::getSplatValue which uses getElementsAsConstant to create a Constant object representing the element value. This method incurs a map lookup to see if we already have created such a Constant before and if not allocates a new Constant object.

This patch changes these methods to use getElementAsAPFloat and getElementAsInteger so we can just examine the data values directly.

Reviewers: spatel, pcc, dexonsmith, bogner, craig.topper

Reviewed By: craig.topper

Subscribers: llvm-commits

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

llvm-svn: 308112

7 years ago[InstCombine] Improve the expansion in SimplifyUsingDistributiveLaws to handle cases...
Craig Topper [Sat, 15 Jul 2017 21:49:49 +0000 (21:49 +0000)]
[InstCombine] Improve the expansion in SimplifyUsingDistributiveLaws to handle cases where one side doesn't simplify, but the other side resolves to an identity value

Summary:
If one side simplifies to the identity value for inner opcode, we can replace the value with just the operation that can't be simplified.

I've removed a couple now unneeded special cases in visitAnd and visitOr. There are probably other cases I missed.

Reviewers: spatel, majnemer, hfinkel, dberlin

Reviewed By: spatel

Subscribers: grandinj, llvm-commits, spatel

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

llvm-svn: 308111

7 years ago[X86][AVX] Regenerate tests with constant broadcast comments
Simon Pilgrim [Sat, 15 Jul 2017 21:17:35 +0000 (21:17 +0000)]
[X86][AVX] Regenerate tests with constant broadcast comments

llvm-svn: 308110

7 years ago[X86][AVX] Regenerate tests with constant broadcast comments
Simon Pilgrim [Sat, 15 Jul 2017 20:28:09 +0000 (20:28 +0000)]
[X86][AVX] Regenerate tests with constant broadcast comments

llvm-svn: 308109

7 years agoStrip trailing whitespace. NFCI
Simon Pilgrim [Sat, 15 Jul 2017 19:29:19 +0000 (19:29 +0000)]
Strip trailing whitespace. NFCI

llvm-svn: 308108

7 years ago[CodeView] Dump BuildInfoSym and ProcSym type indices
Reid Kleckner [Sat, 15 Jul 2017 18:10:39 +0000 (18:10 +0000)]
[CodeView] Dump BuildInfoSym and ProcSym type indices

I need to print the type index in hex so that I can match it in
FileCheck for a test I'm writing.

llvm-svn: 308107

7 years agoFix mis-use of std::lower_bound
Reid Kleckner [Sat, 15 Jul 2017 18:10:15 +0000 (18:10 +0000)]
Fix mis-use of std::lower_bound

Binary search in C++ is such a PITA. =/

llvm-svn: 308106

7 years ago[InstCombine] improve (1 << x) & 1 --> zext(x == 0) folding
Sanjay Patel [Sat, 15 Jul 2017 17:26:01 +0000 (17:26 +0000)]
[InstCombine] improve (1 << x) & 1 --> zext(x == 0) folding

1. Add a one-use check to prevent increasing instruction count.
2. Generalize the pattern matching to include vector types.

llvm-svn: 308105

7 years ago[InstCombine] Add test cases for (X & (Y | ~X)) -> (X & Y) where the not is an invert...
Craig Topper [Sat, 15 Jul 2017 17:09:23 +0000 (17:09 +0000)]
[InstCombine] Add test cases for (X & (Y | ~X)) -> (X & Y) where the not is an inverted compare. NFC

Do the same for (X | (Y & ~X)) -> (X | Y)

llvm-svn: 308104

7 years ago[InstCombine] Move 4 test cases from a test that didn't use FileCheck and merge them...
Craig Topper [Sat, 15 Jul 2017 17:09:22 +0000 (17:09 +0000)]
[InstCombine] Move 4 test cases from a test that didn't use FileCheck and merge them into a existing test file. NFC

llvm-svn: 308103

7 years ago[InstCombine] add tests for (1 << x) & 1 --> zext(x == 0) ; NFC
Sanjay Patel [Sat, 15 Jul 2017 15:55:07 +0000 (15:55 +0000)]
[InstCombine] add tests for (1 << x) & 1 --> zext(x == 0) ; NFC

This fold hit the trifecta:
1. It was untested.
2. It oversteps (multiuse is not checked, so increases instruction count).
3. It is incomplete (doesn't work for vectors).

llvm-svn: 308102

7 years ago[cxx_status] Fix typos.
Richard Smith [Sat, 15 Jul 2017 15:51:59 +0000 (15:51 +0000)]
[cxx_status] Fix typos.

llvm-svn: 308101

7 years ago[wasm] Update two tests for r308025 which causes scheduling changes due
Chandler Carruth [Sat, 15 Jul 2017 15:44:36 +0000 (15:44 +0000)]
[wasm] Update two tests for r308025 which causes scheduling changes due
to the newly improved AA information.

llvm-svn: 308100

7 years ago[cxx_status] Add approved Toronto WG21 motions.
Richard Smith [Sat, 15 Jul 2017 15:42:36 +0000 (15:42 +0000)]
[cxx_status] Add approved Toronto WG21 motions.

llvm-svn: 308099

7 years ago[InstCombine] allow (0 - x) & 1 --> x & 1 for vectors
Sanjay Patel [Sat, 15 Jul 2017 15:29:47 +0000 (15:29 +0000)]
[InstCombine] allow (0 - x) & 1 --> x & 1 for vectors

llvm-svn: 308098

7 years agoUpdate issues moved in Toronto
Marshall Clow [Sat, 15 Jul 2017 15:22:21 +0000 (15:22 +0000)]
Update issues moved in Toronto

llvm-svn: 308097

7 years ago[InstCombine] remove dead code/tests; NFCI
Sanjay Patel [Sat, 15 Jul 2017 15:01:33 +0000 (15:01 +0000)]
[InstCombine] remove dead code/tests; NFCI

These patterns and tests were added to InstSimplify with:
https://reviews.llvm.org/rL303004

llvm-svn: 308096

7 years agoRevert r308078 (and subsequent tweak in r308079) which introduces a test
Chandler Carruth [Sat, 15 Jul 2017 13:50:26 +0000 (13:50 +0000)]
Revert r308078 (and subsequent tweak in r308079) which introduces a test
that appears to exhibit non-determinism and is flaking on the bots
pretty consistently.

r308078: [ThinLTO] Ensure we always select the same function copy to import
r308079: Require asserts in new test that uses debug flag
llvm-svn: 308095

7 years ago[LoopInterchange] Add some optimization remarks.
Florian Hahn [Sat, 15 Jul 2017 13:13:19 +0000 (13:13 +0000)]
[LoopInterchange] Add some optimization remarks.

Reviewers: anemet, karthikthecool, blitz.opensource

Reviewed By: anemet

Subscribers: mzolotukhin, llvm-commits

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

llvm-svn: 308094

7 years ago[Polly] Translate Scop::DomainMap to islpp
Tobias Grosser [Sat, 15 Jul 2017 12:41:32 +0000 (12:41 +0000)]
[Polly] Translate Scop::DomainMap to islpp

Reviewers: grosser, Meinersbur, bollu

Subscribers: pollydev

Tags: #polly

Contributed-by: Nandini Singhal <cs15mtech01004@iith.ac.in>
Differential Revision: https://reviews.llvm.org/D35453

llvm-svn: 308093

7 years agoUse ARC parsing rules for ns_returns_retained in MRC so that code can
John McCall [Sat, 15 Jul 2017 11:06:46 +0000 (11:06 +0000)]
Use ARC parsing rules for ns_returns_retained in MRC so that code can
be shared without warnings.  Build AttributedTypes to leave breadcrumbs
for tools like the static analyzer.  Warn about attempting to use the
attribute with incompatible return types.

llvm-svn: 308092

7 years ago[Bash-autocompletion] Fixed a bug on bash
Yuka Takahashi [Sat, 15 Jul 2017 09:09:51 +0000 (09:09 +0000)]
[Bash-autocompletion] Fixed a bug on bash

Summary: Maybe I mismerged when merging previous commits by hand.

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

llvm-svn: 308091