OSDN Git Service

android-x86/external-llvm.git
8 years ago[InstCombine] allow or(sext(A), B) --> A ? -1 : B transform for vectors
Sanjay Patel [Fri, 8 Jul 2016 17:01:15 +0000 (17:01 +0000)]
[InstCombine] allow or(sext(A), B) --> A ? -1 : B transform for vectors

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

8 years agoTry to fix compilation error in DebugInfoPDBTests.
Zachary Turner [Fri, 8 Jul 2016 16:57:14 +0000 (16:57 +0000)]
Try to fix compilation error in DebugInfoPDBTests.

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

8 years ago[SystemZ] Add support for the .word directive.
Zhan Jun Liau [Fri, 8 Jul 2016 16:50:02 +0000 (16:50 +0000)]
[SystemZ] Add support for the .word directive.

Summary: Branch off the work to add support for the .word directive,
using addAliasForDirective.

Reviewers: koriakin

Subscribers: llvm-commits

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

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

8 years ago[DSE] Minor refactor based on D21007. NFC.
Chad Rosier [Fri, 8 Jul 2016 16:48:40 +0000 (16:48 +0000)]
[DSE] Minor refactor based on D21007. NFC.

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

8 years agoadd vector tests to show missing transform
Sanjay Patel [Fri, 8 Jul 2016 16:39:53 +0000 (16:39 +0000)]
add vector tests to show missing transform

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

8 years ago[CodeGen, TargetPassConfig] Remove a race from createRegAllocPass
David Majnemer [Fri, 8 Jul 2016 16:39:00 +0000 (16:39 +0000)]
[CodeGen, TargetPassConfig] Remove a race from createRegAllocPass

The createRegAllocPass reads and writes to a global variable 'Registry'
via calls to getDefault and setDefault.  Run this under a call_once to
avoid races.

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

8 years agoPeepholeOptimizer: Make pass name match DEBUG_TYPE
Matt Arsenault [Fri, 8 Jul 2016 16:29:11 +0000 (16:29 +0000)]
PeepholeOptimizer: Make pass name match DEBUG_TYPE

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

8 years ago[SystemZ] Add support for missing instructions
Zhan Jun Liau [Fri, 8 Jul 2016 16:18:40 +0000 (16:18 +0000)]
[SystemZ] Add support for missing instructions

Summary:
Add support to allow clang integrated assembler to recognize some
missing instructions, for openssl.

Instructions are:
LM, LMH, LMY, STM, STMH, STMY, ICM, ICMH, ICMY, SLA, SLAK, TML, TMH, EX, EXRL.

Reviewers: uweigand

Subscribers: koriakin, llvm-commits

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

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

8 years agominimize tests
Sanjay Patel [Fri, 8 Jul 2016 16:11:48 +0000 (16:11 +0000)]
minimize tests

The cmp and load aren't required.

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

8 years agoMove setName after accessing Name
Eric Liu [Fri, 8 Jul 2016 16:09:51 +0000 (16:09 +0000)]
Move setName after accessing Name

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

8 years agoMake a std::string copy of StringRef Name so that it remains valid when the original...
Eric Liu [Fri, 8 Jul 2016 16:09:48 +0000 (16:09 +0000)]
Make a std::string copy of StringRef Name so that it remains valid when the original Name is overridden.

Summary: lib/IR/AutoUpgrade.cpp:348 and lib/IR/AutoUpgrade.cpp:350 upset sanitizer.

Reviewers: bkramer

Subscribers: llvm-commits

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

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

8 years agoregenerate checks
Sanjay Patel [Fri, 8 Jul 2016 16:06:38 +0000 (16:06 +0000)]
regenerate checks

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

8 years ago[Sparc] Leon errata fix passes.
Chris Dewhurst [Fri, 8 Jul 2016 15:33:56 +0000 (15:33 +0000)]
[Sparc] Leon errata fix passes.

Errata fixes for various errata in different versions of the Leon variants of the Sparc 32 bit processor.

The nature of the errata are listed in the comments preceding the errata fix passes. Relevant unit tests are implemented for each of these.

Note: Running clang-format has changed a few other lines too, unrelated to the implemented errata fixes. These have been left in as this keeps the code formatting consistent.

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

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

8 years agoDo not expand SDIV when compiling for minimum code size
Sjoerd Meijer [Fri, 8 Jul 2016 15:32:01 +0000 (15:32 +0000)]
Do not expand SDIV when compiling for minimum code size

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

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

8 years agoInstCombine rule to fold truncs whose value is available
Anna Thomas [Fri, 8 Jul 2016 15:18:56 +0000 (15:18 +0000)]
InstCombine rule to fold truncs whose value is available

We can fold truncs whose operand feeds from a load, if the trunc value
is available through a prior load/store.

This change is from: http://reviews.llvm.org/D21246, which folded the
trunc but missed the bitcast or ptrtoint/inttoptr required in the RAUW
call, when the load type didnt match the prior load/store type.

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

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

8 years ago[AMDGPU] fix ds_swizzle_b32 opcode for VI (bz 28371)
Valery Pykhtin [Fri, 8 Jul 2016 15:12:46 +0000 (15:12 +0000)]
[AMDGPU] fix ds_swizzle_b32 opcode for VI (bz 28371)

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

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

8 years agoAddressing post-commit comments regarding not expanding UDIV;
Sjoerd Meijer [Fri, 8 Jul 2016 14:17:09 +0000 (14:17 +0000)]
Addressing post-commit comments regarding not expanding UDIV;
we don't expand only when compiling for minimum code size.

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

8 years ago[X86][SSE] Improve constant folding tests for CVTSD/CVTSS/CVTTSD/CVTTSS
Simon Pilgrim [Fri, 8 Jul 2016 13:28:34 +0000 (13:28 +0000)]
[X86][SSE] Improve constant folding tests for CVTSD/CVTSS/CVTTSD/CVTTSS

As discussed on D22106, improve the testing for constant folding sse scalar conversion intrinsics to ensure we are correctly handling special/out of range cases

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

8 years agoCode size optimisation: don't expand a div to a mul and and a shift sequence.
Sjoerd Meijer [Fri, 8 Jul 2016 12:54:43 +0000 (12:54 +0000)]
Code size optimisation: don't expand a div to a mul and and a shift sequence.
As a result, the urem instruction will not be expanded to a sequence of umull,
lsrs, muls and sub instructions, but just a call to __aeabi_uidivmod.

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

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

8 years ago[modules] Add missing includes.
Vassil Vassilev [Fri, 8 Jul 2016 12:00:08 +0000 (12:00 +0000)]
[modules] Add missing includes.

Patch by Cristina Cristescu!

Reviewed by Adrian Prantl (D21985)

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

8 years ago[AArch64] Macro fusion of simple ALU ops with branches for Broadcom's Vulcan
Pankaj Gode [Fri, 8 Jul 2016 11:13:59 +0000 (11:13 +0000)]
[AArch64] Macro fusion of simple ALU ops with branches for Broadcom's Vulcan

Support for the macro fusion of simple ALU ops with branches for the Vulcan sub-target.

Patch by Meador Inge <meadori@gmail.com>

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

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

8 years ago[X86][SSE] Accept any shuffle mask that is all zeroes
Simon Pilgrim [Fri, 8 Jul 2016 10:39:12 +0000 (10:39 +0000)]
[X86][SSE] Accept any shuffle mask that is all zeroes

Until we have a better way to extract constants through bitcasted build vectors (and how to handle undefs of partial lanes etc.) at least accept build vectors that are all zeroes.

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

8 years agoBug 28444: Fix assertion when extract_vector_elt has mismatched type
Matt Arsenault [Fri, 8 Jul 2016 07:05:00 +0000 (07:05 +0000)]
Bug 28444: Fix assertion when extract_vector_elt has mismatched type

For some reason extract_vector_elt is sometimes allowed to have
a different result type than the vector element type.

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

8 years ago[AVX512] Remove and autoupgrade a duplicate set of 512-bit masked shift intrinsics.
Craig Topper [Fri, 8 Jul 2016 06:14:47 +0000 (06:14 +0000)]
[AVX512] Remove and autoupgrade a duplicate set of 512-bit masked shift intrinsics.

I'm not sure if clang ever used these builtin names or not.

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

8 years ago[X86] Remove intrinsics that already have autoupgrade support.
Craig Topper [Fri, 8 Jul 2016 06:14:41 +0000 (06:14 +0000)]
[X86] Remove intrinsics that already have autoupgrade support.

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

8 years ago[PM] Port UnreachableBlockElim to the new Pass Manager
Wei Mi [Fri, 8 Jul 2016 03:32:49 +0000 (03:32 +0000)]
[PM] Port UnreachableBlockElim to the new Pass Manager

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

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

8 years agoAdd an assertion for the value enumerator (bitcode writer) NFC
Mehdi Amini [Fri, 8 Jul 2016 01:13:41 +0000 (01:13 +0000)]
Add an assertion for the value enumerator (bitcode writer) NFC

I have an LTO snapshot (for which I don't have sources) that can't
be read back by LLVM. It seems the writer emitted broken bitcode
and this assertions aims at catching such cases.

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

8 years agoAMDGPU: Move si_mask_branch register operand to be a use
Matt Arsenault [Fri, 8 Jul 2016 00:55:44 +0000 (00:55 +0000)]
AMDGPU: Move si_mask_branch register operand to be a use

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

8 years agoAMDGPU: Cleanup. Use definesRegister instead of manual loop
Matt Arsenault [Fri, 8 Jul 2016 00:55:39 +0000 (00:55 +0000)]
AMDGPU: Cleanup. Use definesRegister instead of manual loop

Also this will be more precise since it will check
exec_lo/exec_hi writes.

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

8 years agoARM: support high registers in __builtin_longjmp on WoA
Saleem Abdulrasool [Fri, 8 Jul 2016 00:48:22 +0000 (00:48 +0000)]
ARM: support high registers in __builtin_longjmp on WoA

Windows on ARM uses a pure thumb-2 environment.  This means that it can select a
high register when doing a __builtin_longjmp.  We would use a tLDRi which would
truncate the register to a low register.  Use a t2LDRi12 to get the full
register file access.  Tweak the code to just load into PC, as that is an
interworking branch on all supported cores anyways.

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

8 years agoTemporarily remove a test case to unblock PPC bots.
Andrew Kaylor [Fri, 8 Jul 2016 00:35:39 +0000 (00:35 +0000)]
Temporarily remove a test case to unblock PPC bots.

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

8 years agoTemporarily remove one test run line to unblock PPC bots.
Andrew Kaylor [Fri, 8 Jul 2016 00:32:58 +0000 (00:32 +0000)]
Temporarily remove one test run line to unblock PPC bots.

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

8 years agoFix LTO document
Piotr Padlewski [Fri, 8 Jul 2016 00:28:29 +0000 (00:28 +0000)]
Fix LTO document

Summary: fixed very old document

Reviewers: tejohnson, pcc

Subscribers: mehdi_amini, eraman, llvm-commits

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

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

8 years ago[lanai] Use peephole optimizer to generate more conditional ALU operations.
Jacques Pienaar [Thu, 7 Jul 2016 23:36:04 +0000 (23:36 +0000)]
[lanai] Use peephole optimizer to generate more conditional ALU operations.

Summary:
* Similiar to the ARM backend yse the peephole optimizer to generate more conditional ALU operations;
* Add predicated type with default always true to RR instructions in LanaiInstrInfo.td;
* Move LanaiSetflagAluCombiner into optimizeCompare;
* The ASM parser can currently only handle explicitly specified CC, so specify ".t" (true) where needed in the ASM test;
* Remove unused MachineOperand flags;

Reviewers: eliben

Subscribers: aemerson

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

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

8 years agoRecommit r274692 - [X86] Transform setcc + movzbl into xorl + setcc
Michael Kuperstein [Thu, 7 Jul 2016 22:50:23 +0000 (22:50 +0000)]
Recommit r274692 - [X86] Transform setcc + movzbl into xorl + setcc

xorl + setcc is generally the preferred sequence due to the partial register
stall setcc + movzbl suffers from. As a bonus, it also encodes one byte smaller.
This fixes PR28146.

The original commit tried inserting an 8bit-subreg into a GR32 (not GR32_ABCD)
which was not appreciated by fast regalloc on 32-bit.

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

8 years ago[tsan] Try harder to not instrument gcov counters
Vedant Kumar [Thu, 7 Jul 2016 22:45:28 +0000 (22:45 +0000)]
[tsan] Try harder to not instrument gcov counters

GCOVProfiler::emitProfileArcs() can create many variables with names
starting with "__llvm_gcov_ctr", so llvm appends a numeric suffix to
most of them. Teach tsan about this.

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

8 years agoAdd checks to the MachOObjectFile() constructor to make sure load commands sizes
Kevin Enderby [Thu, 7 Jul 2016 22:11:42 +0000 (22:11 +0000)]
Add checks to the MachOObjectFile() constructor to make sure load commands sizes
are the correct multiple.

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

8 years ago[PM] Port InstSimplify to the new pass manager.
Davide Italiano [Thu, 7 Jul 2016 21:14:36 +0000 (21:14 +0000)]
[PM] Port InstSimplify to the new pass manager.

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

8 years ago[DSE] Remove dead stores in end blocks containing fence
Anna Thomas [Thu, 7 Jul 2016 20:51:42 +0000 (20:51 +0000)]
[DSE] Remove dead stores in end blocks containing fence

We can remove dead stores in the presence of fence instructions. Fence
does not change an otherwise thread local store to visible.

reviewers: reames, dexonsmith, jfb
Differential Revision: http://reviews.llvm.org/D22001

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

8 years agoAdd a missing semicolon.
Rui Ueyama [Thu, 7 Jul 2016 20:21:50 +0000 (20:21 +0000)]
Add a missing semicolon.

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

8 years agoAdd a reference for Elf_Chdr type.
Rui Ueyama [Thu, 7 Jul 2016 20:19:19 +0000 (20:19 +0000)]
Add a reference for Elf_Chdr type.

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

8 years agoClang-format LoadStoreVectorizer
Alina Sbirlea [Thu, 7 Jul 2016 20:10:35 +0000 (20:10 +0000)]
Clang-format LoadStoreVectorizer

Reviewers: llvm-commits, jlebar, arsenm

Subscribers: mzolotukhin

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

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

8 years ago[AArch64] Change the preferred alignment for char and short to word alignment.
Chad Rosier [Thu, 7 Jul 2016 20:02:18 +0000 (20:02 +0000)]
[AArch64] Change the preferred alignment for char and short to word alignment.

The commit reinstates r273279, which was informally approved.

Original Review: http://reviews.llvm.org/D21414

This reverts commit ca632c91aaa7cafc50942f890c49f727a046ace1.

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

8 years agoGlobalISel: remove redundant property setting. NFC.
Tim Northover [Thu, 7 Jul 2016 19:45:45 +0000 (19:45 +0000)]
GlobalISel: remove redundant property setting. NFC.

AsmString is empty by default.

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

8 years agoInclude SelectionDAGISel in the opt-bisect process
Andrew Kaylor [Thu, 7 Jul 2016 18:55:02 +0000 (18:55 +0000)]
Include SelectionDAGISel in the opt-bisect process

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

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

8 years agoThinLTO: Do not take into account whether a definition has multiple copies when promo...
Peter Collingbourne [Thu, 7 Jul 2016 18:31:51 +0000 (18:31 +0000)]
ThinLTO: Do not take into account whether a definition has multiple copies when promoting.

We currently do not touch a symbol's linkage in the case where a definition
has a single copy. However, this code is effectively unnecessary: either
the definition is not exported, in which case the internalize phase sets
its linkage to internal, or it is exported, in which case we need to promote
linkage to weak. Those two cases are already handled by existing code.

I believe that the only real functional change here is in the case where we
have a single definition which does not prevail (e.g. because the definition
in a native object file prevails). In that case we now lower linkage to
available_externally following the existing code path for that case.

As a result we can remove the isExported function parameter from the
thinLTOResolveWeakForLinkerInIndex function.

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

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

8 years ago[NVVM] Rename __nvvm_bar0 builtin back to __syncthreads.
Justin Lebar [Thu, 7 Jul 2016 18:14:55 +0000 (18:14 +0000)]
[NVVM] Rename __nvvm_bar0 builtin back to __syncthreads.

__syncthreads was renamed to __nvvm_bar0 in r274664.  But __syncthreads
is part of our user-facing API, so we need to keep the name.

This will momentarily break clang; we need a matching patch there.

Patch by Justin Bogner.

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

8 years ago[LibFuzzer] Unbreak the build on macOS which was broken by r272858.
Dan Liew [Thu, 7 Jul 2016 18:14:11 +0000 (18:14 +0000)]
[LibFuzzer] Unbreak the build on macOS which was broken by r272858.

``afl_driver.cpp`` currently relies on weak symbols which doesn't
work properly under macOS. For now fix the build by providing a
dummy implementation of ``LLVMFuzzerInitialize(...)``. This is just
a temporary measure until we fix ``afl_driver.cpp`` for macOS.

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

8 years agotests: accept different TargetOpcode values.
Tim Northover [Thu, 7 Jul 2016 17:51:42 +0000 (17:51 +0000)]
tests: accept different TargetOpcode values.

These tests don't actually care about the internal opcode number, but have to
be updated whenever we add a new one for GlobalISel. That's bad.

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

8 years ago[LoopStrengthReduce] Fix -Wmisleading-indentation. Reported by GCC6.
Davide Italiano [Thu, 7 Jul 2016 17:44:38 +0000 (17:44 +0000)]
[LoopStrengthReduce] Fix -Wmisleading-indentation. Reported by GCC6.

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

8 years agoRevert r274692 to check whether this is what breaks windows selfhost.
Michael Kuperstein [Thu, 7 Jul 2016 16:55:35 +0000 (16:55 +0000)]
Revert r274692 to check whether this is what breaks windows selfhost.

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

8 years agoNVPTX: Remove the legacy ptx intrinsics
Justin Bogner [Thu, 7 Jul 2016 16:40:17 +0000 (16:40 +0000)]
NVPTX: Remove the legacy ptx intrinsics

- Rename the ptx.read.* intrinsics to nvvm.read.ptx.sreg.* - some but
  not all of these registers were already accessible via the nvvm
  name.
- Rename ptx.bar.sync nvvm.bar.sync, to match nvvm.bar0.

There's a fair amount of code motion here, but it's all very
mechanical.

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

8 years agoRevert "[AArch64] Change the preferred alignment for char and short to word alignment"
Chad Rosier [Thu, 7 Jul 2016 16:37:29 +0000 (16:37 +0000)]
Revert "[AArch64] Change the preferred alignment for char and short to word alignment"

This reverts commit r273279 as the change was not properly approved.

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

8 years agofix formatting; NFC
Sanjay Patel [Thu, 7 Jul 2016 16:19:09 +0000 (16:19 +0000)]
fix formatting; NFC

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

8 years ago[SystemZ] Fix regression when handling conditional calls
Zhan Jun Liau [Thu, 7 Jul 2016 15:34:46 +0000 (15:34 +0000)]
[SystemZ] Fix regression when handling conditional calls

Summary:
A regression showed up in node.js when handling conditional calls.
Fix the regression by recognizing external symbols as a possible
operand type in CallJG.

Reviewers: koriakin

Subscribers: llvm-commits

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

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

8 years agosave type in local var; NFCI
Sanjay Patel [Thu, 7 Jul 2016 15:28:17 +0000 (15:28 +0000)]
save type in local var; NFCI

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

8 years agoAddressing post-commit comments for not rewriting fputs:
Sjoerd Meijer [Thu, 7 Jul 2016 14:31:19 +0000 (14:31 +0000)]
Addressing post-commit comments for not rewriting fputs:
moved the optimise for size check inside function optimizeFPuts.

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

8 years ago[AMDGPU] fix ds_write_src2 encoding (bz26027)
Valery Pykhtin [Thu, 7 Jul 2016 14:23:38 +0000 (14:23 +0000)]
[AMDGPU] fix ds_write_src2 encoding (bz26027)

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

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

8 years agoDon't crash trying to relax 32 loads on COFF.
Rafael Espindola [Thu, 7 Jul 2016 14:00:07 +0000 (14:00 +0000)]
Don't crash trying to relax 32 loads on COFF.

Fixes pr28452.

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

8 years agoCode size optimisation: don't rewrite fputs to fwrite when optimising for size
Sjoerd Meijer [Thu, 7 Jul 2016 13:56:23 +0000 (13:56 +0000)]
Code size optimisation: don't rewrite fputs to fwrite when optimising for size
because fwrite requires more arguments and thus extra MOVs are required.

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

8 years ago[ARM] Do not test for CPUs, use SubtargetFeatures. Also remove 1 flag
Diana Picus [Thu, 7 Jul 2016 09:11:39 +0000 (09:11 +0000)]
[ARM] Do not test for CPUs, use SubtargetFeatures. Also remove 1 flag

This is a follow-up for r273544.

The end goal is to get rid of the isSwift / isCortexXY / isWhatever methods.

This commit also removes a command line flag that isn't used in any of the tests:
check-vmlx-hazards. It can be replaced easily with the mattr mechanism, since
this is now a subtarget feature.

There is still some work left regarding FeatureExpandMLx. In the past MLx
expansion was enabled for subtargets with hasVFP2(), until r129775 [1] switched
from that to isCortexA9, without too much justification.

In spite of that, the code performing MLx expansion still contains calls to
isSwift/isLikeA9, although the results of those are pretty clear given that
we're only enabling it for the A9.

We should try to enable it for all targets that have FeatureHasVMLxHazards, as
it seems to be closely related to that behaviour, and if that is possible try to
clean up the MLx expansion pass from all calls to isWhatever. This will require
some performance testing, so it will be done in another patch.

[1] http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20110418/119725.html

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

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

8 years ago[LCG] Hoist the definitions of the stream operator friends to be inline
Chandler Carruth [Thu, 7 Jul 2016 07:52:07 +0000 (07:52 +0000)]
[LCG] Hoist the definitions of the stream operator friends to be inline
friend definitions.

Based on the experiments Sean Silva and Reid did, this seems the safest
course of action and also will work around a questionable warning
provided by GCC6 on the old form of the code. Thanks for Davide pointing
out the issue and other suggesting ways to fix.

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

8 years ago[LoopAccessAnalysis] Fix an integer overflow
David Majnemer [Thu, 7 Jul 2016 06:24:36 +0000 (06:24 +0000)]
[LoopAccessAnalysis] Fix an integer overflow

We were inappropriately using 32-bit types to account for quantities
that can be far larger.

Fixed in PR28443.

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

8 years ago[AVX512] Zero extend the result of vpcmpeq/vpcmpgt and similar intrinsics in the...
Craig Topper [Thu, 7 Jul 2016 06:11:07 +0000 (06:11 +0000)]
[AVX512] Zero extend the result of vpcmpeq/vpcmpgt and similar intrinsics in the autoupgrade code. This currently results in worse codegen but is needed for correctness.

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

8 years agoFixed a bug in vectorizing GEP before gather/scatter intrinsic.
Elena Demikhovsky [Thu, 7 Jul 2016 06:06:46 +0000 (06:06 +0000)]
Fixed a bug in vectorizing GEP before gather/scatter intrinsic.

Vectorizing GEP was incorrect and broke SSA in some cases.

The patch fixes PR27997 https://llvm.org/bugs/show_bug.cgi?id=27997.

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

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

8 years ago[CodeView] Implement support for thread-local variables
David Majnemer [Thu, 7 Jul 2016 05:14:21 +0000 (05:14 +0000)]
[CodeView] Implement support for thread-local variables

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

8 years agoDefine endianness-aware type for Elf_Chdr.
Rui Ueyama [Thu, 7 Jul 2016 03:53:00 +0000 (03:53 +0000)]
Define endianness-aware type for Elf_Chdr.

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

8 years ago[esan:cfrag] Add option -esan-aux-field-info
Qin Zhao [Thu, 7 Jul 2016 03:20:16 +0000 (03:20 +0000)]
[esan:cfrag] Add option -esan-aux-field-info

Summary:
Adds option -esan-aux-field-info to control generating binary with
auxiliary struct field information.

Extracts code for creating auxiliary information from
createCacheFragInfoGV into createCacheFragAuxGV.

Adds test struct_field_small.ll for -esan-aux-field-info test.

Reviewers: aizatsky

Subscribers: llvm-commits, bruening, eugenis, kcc, zhaoqin, vitalybuka

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

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

8 years agoThinLTO: Remove check for multiple modules before applying weak resolutions.
Peter Collingbourne [Thu, 7 Jul 2016 01:51:11 +0000 (01:51 +0000)]
ThinLTO: Remove check for multiple modules before applying weak resolutions.

This check is not only unnecessary, it can produce the wrong result. If we
are linking a single module and it has an exported linkonce symbol, we need
to promote to weak in order to avoid PR19901-style problems.

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

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

8 years agoUse the class version of getPointerTy rather than getting back to
Eric Christopher [Thu, 7 Jul 2016 01:49:59 +0000 (01:49 +0000)]
Use the class version of getPointerTy rather than getting back to
ourselves via a call through the DAG.

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

8 years agoUse the class definition for useSoftFloat.
Eric Christopher [Thu, 7 Jul 2016 01:49:57 +0000 (01:49 +0000)]
Use the class definition for useSoftFloat.

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

8 years agoRename argument for consistency.
Eric Christopher [Thu, 7 Jul 2016 01:08:23 +0000 (01:08 +0000)]
Rename argument for consistency.

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

8 years agoRemove the plumbing for isDarwinABI from EmitTailCallLoadFPAndRetAddr.
Eric Christopher [Thu, 7 Jul 2016 01:08:21 +0000 (01:08 +0000)]
Remove the plumbing for isDarwinABI from EmitTailCallLoadFPAndRetAddr.

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

8 years agoUse the MachineFunction that we've already queried for in the function.
Eric Christopher [Thu, 7 Jul 2016 01:08:19 +0000 (01:08 +0000)]
Use the MachineFunction that we've already queried for in the function.

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

8 years agoRemove the plumbing for isDarwinABI from the PrepareTailCall hierarchy.
Eric Christopher [Thu, 7 Jul 2016 01:08:17 +0000 (01:08 +0000)]
Remove the plumbing for isDarwinABI from the PrepareTailCall hierarchy.

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

8 years ago[PM] Avoid getResult on a higher level in LoopAccessAnalysis
Sean Silva [Thu, 7 Jul 2016 01:01:53 +0000 (01:01 +0000)]
[PM] Avoid getResult on a higher level in LoopAccessAnalysis

Note that require<domtree> and require<loops> aren't needed because they
come in implicitly via the loop pass manager.

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

8 years agoRemove the plumbing of 64-bitness from PrepareTailCall and functions
Eric Christopher [Thu, 7 Jul 2016 00:39:32 +0000 (00:39 +0000)]
Remove the plumbing of 64-bitness from PrepareTailCall and functions
called by it.

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

8 years agoSink call to get the MachineFunction into EmitTailCallStoreFPAndRetAddr
Eric Christopher [Thu, 7 Jul 2016 00:39:30 +0000 (00:39 +0000)]
Sink call to get the MachineFunction into EmitTailCallStoreFPAndRetAddr
and remove the argument.

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

8 years agoRemove unnecessary subtarget parameters in PPCTargetLowering.
Eric Christopher [Thu, 7 Jul 2016 00:39:27 +0000 (00:39 +0000)]
Remove unnecessary subtarget parameters in PPCTargetLowering.

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

8 years ago[PM] Port TailCallElim
Sean Silva [Wed, 6 Jul 2016 23:48:41 +0000 (23:48 +0000)]
[PM] Port TailCallElim

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

8 years agoFix missing member initializers
Matt Arsenault [Wed, 6 Jul 2016 23:30:54 +0000 (23:30 +0000)]
Fix missing member initializers

This fixes the -Werror build with some combination of
warning flags.

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

8 years ago[PM] Port CorrelatedValuePropagation
Sean Silva [Wed, 6 Jul 2016 23:26:29 +0000 (23:26 +0000)]
[PM] Port CorrelatedValuePropagation

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

8 years agofix documentation comment. NFC.
Junmo Park [Wed, 6 Jul 2016 23:18:58 +0000 (23:18 +0000)]
fix documentation comment. NFC.

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

8 years agoMinor code cleanup. NFC.
Junmo Park [Wed, 6 Jul 2016 23:15:18 +0000 (23:15 +0000)]
Minor code cleanup. NFC.

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

8 years agoThinLTO: Add test cases for promote+internalize.
Peter Collingbourne [Wed, 6 Jul 2016 22:53:02 +0000 (22:53 +0000)]
ThinLTO: Add test cases for promote+internalize.

This tests the effect of both promotion and internalization on a module,
and helps show that D21883 is NFC wrt promotion+internalization.

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

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

8 years ago[InstCombine] enhance (select X, C1, C2 --> ext X) to handle vectors
Sanjay Patel [Wed, 6 Jul 2016 22:23:01 +0000 (22:23 +0000)]
[InstCombine] enhance (select X, C1, C2 --> ext X) to handle vectors

By replacing dyn_cast of ConstantInt with m_Zero/m_One/m_AllOnes, we
allow these transforms for splat vectors.

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

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

8 years agoMinor formatting change, NFC
Vedant Kumar [Wed, 6 Jul 2016 22:02:55 +0000 (22:02 +0000)]
Minor formatting change, NFC

The rest of llvm-cov does not use LLVM_ATTRIBUTE_UNUSED. Leave unused
params unnamed to be consistent.

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

8 years agoAdd testing coverage for r274582.
Manman Ren [Wed, 6 Jul 2016 22:01:28 +0000 (22:01 +0000)]
Add testing coverage for r274582.

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

8 years ago[X86] Transform setcc + movzbl into xorl + setcc
Michael Kuperstein [Wed, 6 Jul 2016 21:56:18 +0000 (21:56 +0000)]
[X86] Transform setcc + movzbl into xorl + setcc

xorl + setcc is generally the preferred sequence due to the partial register
stall setcc + movzbl suffers from. As a bonus, it also encodes one byte smaller.

This fixes PR28146.

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

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

8 years ago[llvm-cov] Add support for creating html reports
Vedant Kumar [Wed, 6 Jul 2016 21:44:05 +0000 (21:44 +0000)]
[llvm-cov] Add support for creating html reports

Based on a patch by Harlan Haskins!

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

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

8 years agoAArch64: Change modeling of zero cycle zeroing.
Matthias Braun [Wed, 6 Jul 2016 21:39:33 +0000 (21:39 +0000)]
AArch64: Change modeling of zero cycle zeroing.

On CPUs with the zero cycle zeroing feature enabled "movi v.2d" should
be used to zero a vector register. This was previously done at
instruction selection time, however the register coalescer sometimes
widened multiple vregs to the Q width because of that leading to extra
spills. This patch leaves the decision on how to zero a register to the
AsmPrinter phase where it doesn't affect register allocation anymore.

This patch also sets isAsCheapAsAMove=1 on FMOVS0, FMOVD0.

This fixes http://llvm.org/PR27454, rdar://25866262

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

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

8 years agoAArch64: Replace a RegScavenger instance with LivePhysRegs
Matthias Braun [Wed, 6 Jul 2016 21:31:27 +0000 (21:31 +0000)]
AArch64: Replace a RegScavenger instance with LivePhysRegs

findScratchNonCalleeSaveRegister() just needs a simple liveness
analysis, use LivePhysRegs for that as it is simpler and does not depend
on the kill flags.

This commit adds a convenience function available() to LivePhysRegs:
This function returns true if the given register is not reserved and
neither the register nor any of its aliases are alive.

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

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

8 years ago[MemorySSA] Reinstate the legacy printer and verifier.
Chad Rosier [Wed, 6 Jul 2016 21:20:47 +0000 (21:20 +0000)]
[MemorySSA] Reinstate the legacy printer and verifier.

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

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

8 years agoAdd initial support for R_386_GOT32X.
Rafael Espindola [Wed, 6 Jul 2016 21:19:11 +0000 (21:19 +0000)]
Add initial support for R_386_GOT32X.

This adds it only for movl mov@GOT(%reg), %reg.

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

8 years ago[CodeView] Emit an appropriate symbol kind for globals
David Majnemer [Wed, 6 Jul 2016 21:07:47 +0000 (21:07 +0000)]
[CodeView] Emit an appropriate symbol kind for globals

We emitted debug info for globals/functions as if they all had external
linkage.  Instead, emit local symbol records when appropriate.

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

8 years ago[CodeView] Unions are always sealed
David Majnemer [Wed, 6 Jul 2016 21:07:42 +0000 (21:07 +0000)]
[CodeView] Unions are always sealed

It is impossible to inherit from a union.  We are missing a way to
represent this in IR for classes/structs...

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

8 years ago[NVPTX] Add sm_60, sm_61, sm_62 targets to LLVM.
Justin Lebar [Wed, 6 Jul 2016 21:06:10 +0000 (21:06 +0000)]
[NVPTX] Add sm_60, sm_61, sm_62 targets to LLVM.

Reviewers: tra

Subscribers: jholewinski, llvm-commits

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

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

8 years ago[LIR] Fix mis-compilation with unwinding.
Haicheng Wu [Wed, 6 Jul 2016 21:05:40 +0000 (21:05 +0000)]
[LIR] Fix mis-compilation with unwinding.

To fix PR27859, bail out if there is an instruction may throw.

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

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

8 years ago[InstCombine] use more specific pattern matchers; NFCI
Sanjay Patel [Wed, 6 Jul 2016 21:01:26 +0000 (21:01 +0000)]
[InstCombine] use more specific pattern matchers; NFCI

Follow-up from r274465: we don't need to capture the value in these cases,
so just match the constant that we're looking for. m_One/m_Zero work with
vector splats as well as scalars.

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

8 years agoAdd 'thinlto_src_module' metadata to imported function
Piotr Padlewski [Wed, 6 Jul 2016 20:26:25 +0000 (20:26 +0000)]
Add 'thinlto_src_module' metadata to imported function

Added metadata to be able to make statistics on how many functions
that have been imported have been removed. Also module name might
be helpfull when debugging.

Reviewers: tejohnson, eraman

Subscribers: mehdi_amini, llvm-commits

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

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