LLVM/llvm 374773llvm/trunk/include/llvm/Support Allocator.h MathExtras.h, llvm/trunk/lib/Support/Unix Memory.inc

[Alignment][NFC] Move and type functions from MathExtras to Alignment

This is patch is part of a series to introduce an Alignment type.
See this thread for context: 
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

LLVM/llvm 374772llvm/trunk/lib/Target/AArch64 AArch64FrameLowering.cpp AArch64InstrInfo.cpp, llvm/trunk/test/CodeGen/AArch64 framelayout-sve.mir

[AArch64] Stackframe accesses to SVE objects.

Materialize accesses to SVE frame objects from SP or FP, whichever is
available and beneficial.

This patch still assumes the objects are pre-allocated. The automatic
layout of SVE objects within the stackframe will be added in a separate

Reviewers: greened, cameron.mcinally, efriedma, rengolin, thegameg, rovka

Reviewed By: cameron.mcinally

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

LLVM/llvm 374771llvm/trunk/test/tools/llvm-size invalid-input.test no-input.test, llvm/trunk/tools/llvm-size llvm-size.cpp

[llvm-size] Tidy up error messages (PR42970)

Clean up some formatting inconsistencies in the error messages and correctly exit with 
non-zero in all error cases.

Differential Revision: https://reviews.llvm.org/D68906
Patch by Alex Cameron

LLVM/llvm 374770llvm/trunk/lib/CodeGen/AsmPrinter DwarfDebug.cpp, llvm/trunk/test/DebugInfo/X86 dbgcall-site-64-bit-imms.ll

[DebugInfo] Fix truncation of call site immediates

This addresses a bug in collectCallSiteParameters() where call site
immediates would be truncated from int64_t to unsigned.

This fixes PR43525.

Reviewers: djtodoro, NikolaPrica, aprantl, vsk

Reviewed By: aprantl

Subscribers: hiraditya, llvm-commits

Tags: #debug-info, #llvm

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

LLVM/llvm 374769lldb/trunk/source/Expression DWARFExpression.cpp, lldb/trunk/test/Shell/SymbolFile/DWARF debug_loc.s

DWARFExpression: Fix/add support for (v4) debug_loc base address selection entries

The DWARFExpression is parsing the location lists in about five places.
Of those, only one actually had proper support for base address
selection entries.

Since r374600, llvm has started to produce location expressions with
base address selection entries more aggresively, which caused some tests
to fail.

This patch adds support for these entries to the places which had it
missing, fixing the failing tests. It also adds a targeted test for the
two of the three fixes, which should continue testing this functionality
even if the llvm output changes. I am not aware of a way to write a
targeted test for the third fix (DWARFExpression::Evaluate).

LLVM/llvm 374768llvm/trunk/lib/Transforms/Scalar LowerConstantIntrinsics.cpp, llvm/trunk/test/CodeGen/Generic is-constant.ll

Revert "Add a pass to lower is.constant and objectsize intrinsics"

This reverts commit r374743. It broke the build with Ocaml enabled:

LLVM/llvm 374767llvm/trunk/lib/Target/AMDGPU SIFixSGPRCopies.cpp SIISelLowering.cpp, llvm/trunk/test/CodeGen/AMDGPU insert_vector_elt.ll fdiv32-to-rcp-folding.ll

[AMDGPU] Come back patch for the 'Assign register class for cross block values according 
to the divergence.'

  Detailed description:

    After https://reviews.llvm.org/D59990 submit several issues were discovered.
    Changes in common code were preserved but AMDGPU specific part was reverted to keep 
the backend working correctly.

    Discovered issues were addressed in the following commits:


    This change brings back AMDGPU specific changes.

  Reviewed by: rampitec, arsenm

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

LLVM/llvm 374766llvm/trunk/include/llvm/IR Intrinsics.td

Fixing typo in llvm/IR/Intrinsics.td

Fixing typo in comment line.

LLVM/llvm 374765llvm/trunk/lib/Target/X86 X86ScheduleBtVer2.td, llvm/trunk/test/tools/llvm-mca/X86/BtVer2 resources-avx1.s memcpy-like-test.s

[X86][BtVer2] Improved latency and throughput of float/vector loads and stores.

This patch introduces the following changes to the btver2 scheduling model:

- The number of micro opcodes for YMM loads and stores is now 2 (it was
  incorrectly set to 1 for both aligned and misaligned loads/stores).

- Increased the number of AGU resource cycles for YMM loads and stores
  to 2cy (instead of 1cy).

- Removed JFPU01 and JFPX from the list of resources consumed by pure
  float/vector loads (no MMX).

I verified with llvm-exegesis that pure XMM/YMM loads are no-pipe. Those
are dispatched to the FPU but not really issues on JFPU01.

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

LLVM/llvm 374764meta/trunk github-usernames.txt

Request commit access for sanwou01

LLVM/llvm 374763llvm/trunk/include/llvm/Analysis TargetTransformInfo.h, llvm/trunk/lib/Analysis TargetTransformInfo.cpp

[NFC][TTI] Add Alignment for isLegalMasked[Load/Store]

Add an extra parameter so the backend can take the alignment into

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

LLVM/llvm 374762meta/trunk github-usernames.txt

Added walkerkd

LLVM/llvm 374761llvm/trunk/include/llvm/Support Alignment.h

Fix D68936

LLVM/llvm 374760www/trunk/devmtg/2019-10 index.html

add roundtables proposed so far.

LLVM/llvm 374759llvm/trunk/utils/release build_llvm_package.bat

build_llvm_package.bat: Run check-clang-tools and check-clangd tests.

LLVM/llvm 374758llvm/trunk/include/llvm/Support Alignment.h MathExtras.h, llvm/trunk/unittests/Support AlignmentTest.cpp MathExtrasTest.cpp

[Alignment][NFC] Support compile time constants

This is patch is part of a series to introduce an Alignment type.
See this thread for context: 
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: llvm-commits

Tags: #llvm

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

LLVM/llvm 374757meta/trunk github-usernames.txt

Add github commit access for hokein

LLVM/llvm 374756cfe/trunk/docs LanguageExtensions.rst

[docs] loop pragmas: options implying transformations

Following our discussion on the cfe dev list:
I have added a paragraph that is explicit about loop pragmas, and
transformation options implying the corresponding transformation.

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

LLVM/llvm 374755llvm/trunk/lib/Target/X86 X86ISelLowering.cpp, llvm/trunk/test/CodeGen/X86 ssub_sat.ll ssub_sat_vec.ll

[X86] Teach EmitTest to handle ISD::SSUBO/USUBO in order to use the Z flag from the 
subtract directly during isel.

This prevents isel from emitting a TEST instruction that
optimizeCompareInstr will need to remove later.

In some of the modified tests, the SUB gets duplicated due to
the flags being needed in two places and being clobbered in
between. optimizeCompareInstr was able to optimize away the TEST
that was using the result of one of them, but optimizeCompareInstr
doesn't know to turn SUB into CMP after removing the TEST. It
only knows how to turn SUB into CMP if the result was already

With this change the TEST never exists, so optimizeCompareInstr
doesn't have to remove it. Then it can just turn the SUB into
CMP immediately.

Fixes PR43649.

LLVM/llvm 374754cfe/trunk/tools/clang-offload-bundler ClangOffloadBundler.cpp

[clang] [clang-offload-bundler] Fix finding installed llvm-objcopy

Allow finding installed llvm-objcopy in PATH if it's not present
in the directory containing clang-offload-bundler.  This is the case
if clang is being built stand-alone, and llvm-objcopy is already
installed while the c-o-b tool is still present in build directory.

This is consistent with how e.g. llvm-symbolizer is found in LLVM.
However, most of similar searches in LLVM and Clang are performed
without special-casing the program directory.

Fixes r369955.

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

LLVM/llvm 374753clang-tools-extra/trunk/clangd/test compile-commands-path-in-initialize.test system-include-extractor.test

clangd tests: use extended regex with sed

The escaped parens seem to confuse the combination of lit, cygwin
quoting, and cygwin's sed. unxutils sed in cmd.exe is fine with both
forms, so use the extended regex form that doesn't need an escaped

LLVM/llvm 374752clang-tools-extra/trunk/clangd/test symbol-info.test

convert another test to unix line endings

LLVM/llvm 374751clang-tools-extra/trunk/clangd/test symbols.test

convert a test to unix line endings

LLVM/llvm 374750clang-tools-extra/trunk/clangd/test symbols.test

fix typo in 374747

LLVM/llvm 374749cfe/trunk/test/Driver crash-report-crashfile.m, cfe/trunk/test/Modules crash-vfs-path-symlink-component.m crash-vfs-headermaps.m

Prefer 'env not' over 'not env' in tests.

That way, lit's builtin 'env' command can be used for the 'env' bit.

Also it's clearer that way that the 'not' shouldn't cover 'env'

LLVM/llvm 374748llvm/trunk/test/CodeGen/X86 h-registers-0.ll h-registers-3.ll

[X86] Autogenerate complete checks. NFC

LLVM/llvm 374747clang-tools-extra/trunk/clangd/test symbols.test, clang-tools-extra/trunk/clangd/test/Inputs symbols.test.yaml

Make symbols.test pass on Windows.

See commit message of r374746 for details.

Hopefully final bit of PR43592.

LLVM/llvm 374746clang-tools-extra/trunk/clangd/test code-action-request.test request-reply.test

Make code-action-request.test and request-reply.test pass on Windows.

clangd's test:// scheme expands to /clangd-test on non-Win and to
C:/clang-test on Win, so it can't be mixed freely with
file:///clangd-test since that's wrong on Windows. This makes both
tests consistenly use the test:// scheme. (Alternatively, we could use
the //INPUT_DIR pattern used in a few other tests.)

Part of PR43592.

LLVM/llvm 374745clang-tools-extra/trunk/clangd/test background-index.test

Don't run background-index.test on Windows.

The test had a "UNSUPPORTED: win32" line, but the spelling of that
changed in r339307 a year ago. Finally update this test too.

Part of PR43592.

LLVM/llvm 374744llvm/trunk/lib/Transforms/Scalar NewGVN.cpp

[NewGVN] Use m_Br to simplify code a bit. (NFC)

LLVM/llvm 374743llvm/trunk/lib/Transforms/Scalar LowerConstantIntrinsics.cpp, llvm/trunk/test/CodeGen/Generic is-constant.ll

Add a pass to lower is.constant and objectsize intrinsics

This pass lowers is.constant and objectsize intrinsics not simplified by
earlier constant folding, i.e. if the object given is not constant or if
not using the optimized pass chain. The result is recursively simplified
and constant conditionals are pruned, so that dead blocks are removed
even for -O0. This allows inline asm blocks with operand constraints to
work all the time.

The new pass replaces the existing lowering in the codegen-prepare pass
and fallbacks in SDAG/GlobalISEL and FastISel. The latter now assert
on the intrinsics.

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

LLVM/llvm 374742cfe/trunk/lib/CodeGen CGBuiltin.cpp, cfe/trunk/test/CodeGen builtin-constant-p.c ppc-emmintrin.c

Improve __builtin_constant_p lowering

__builtin_constant_p used to be short-cut evaluated to false when
building with -O0. This is undesirable as it means that constant folding
in the front-end can give different results than folding in the back-end.
It can also create conditional branches on constant conditions that don't
get folded away. With the pending improvements to the llvm.is.constant
handling on the LLVM side, the short-cut is no longer useful.

Adjust various codegen tests to not depend on the short-cut or the
backend optimisations.

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

LLVM/llvm 374741llvm/trunk/utils/release merge-request.sh

merge-request.sh: Update 9.0 metabug for 9.0.1

LLVM/llvm 374740zorg/trunk/zorg/buildbot/builders UnifiedTreeBuilder.py, zorg/trunk/zorg/buildbot/process factory.py

Set a default build directory in the LLVMBuildFactory and then properly use it.

LLVM/llvm 374739llvm/trunk/lib/Transforms/IPO Attributor.cpp, llvm/trunk/test/Transforms/FunctionAttrs fn_noreturn.ll internal-noalias.ll

[Attributor] Shortcut no-return through will-return

No-return and will-return are exclusive, assuming the latter is more
prominent we can avoid updates of the former unless will-return is not
known for sure.

LLVM/llvm 374738zorg/trunk/buildbot/osuosl/master/config builders.py

Remove build directory for each build on clang-x86_64-debian-fast.

LLVM/llvm 374737llvm/trunk/lib/Transforms/IPO Attributor.cpp, llvm/trunk/test/Transforms/FunctionAttrs nonnull.ll noalias_returned.ll

[Attributor][FIX] NullPointerIsDefined needs the pointer AS (AANonNull)

Also includes a shortcut via AADereferenceable if possible.

LLVM/llvm 374736llvm/trunk/include/llvm/Transforms/IPO Attributor.h, llvm/trunk/lib/Transforms/IPO Attributor.cpp

[Attributor][MemBehavior] Fallback to the function state for arguments

Even if an argument is captured, we cannot have an effect the function
does not have. This is fine except for the special case of `inalloca` as
it does not behave by the rules.

TODO: Maybe the special rule for `inalloca` is wrong after all.

LLVM/llvm 374735llvm/trunk/lib/Transforms/IPO Attributor.cpp, llvm/trunk/test/Transforms/FunctionAttrs arg_returned.ll dereferenceable.ll

[Attributor][FIX] Use check prefix that is actually tested

This changes "CHECK" check lines to "ATTRIBUTOR" check lines where
necessary and also fixes the now exposed, mostly minor, problems.

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

LLVM/llvm 374734llvm/trunk/lib/Transforms/InstCombine InstCombineShifts.cpp

[NFC][InstCombine] Some preparatory cleanup in dropRedundantMaskingOfLeftShiftInput()

LLVM/llvm 374733llvm/trunk/docs Reference.rst UserGuides.rst

[Docs] Moves Control Flow Document to User Guides

Moves Control Flow document from Reference docs page to User guides page.

LLVM/llvm 374732llvm/trunk/lib/Target/X86 X86ISelLowering.cpp

[X86] getTargetShuffleInputs - Control KnownUndef mask element resolution as well as 

We were already controlling whether the KnownZero elements were being written to the 
target mask, this extends it to the KnownUndef elements as well so we can prevent the 
target shuffle mask being manipulated at all.

LLVM/llvm 374731llvm/trunk/lib/Target/X86 X86ISelLowering.cpp, llvm/trunk/test/CodeGen/X86 vector-trunc-usat.ll vector-trunc-ssat.ll

[X86] Enable use of avx512 saturating truncate instructions in more cases.

This enables use of the saturating truncate instructions when the
result type is less than 128 bits. It also enables the use of
saturating truncate instructions on KNL when the input is less
than 512 bits. We can do this by widening the input and then
extracting the result.

LLVM/llvm 374730clang-tools-extra/trunk/clangd/test system-include-extractor.test

Add missing "REQUIRES: shell" to system-include-extractor.test

Part of PR43592.

LLVM/llvm 374729llvm/trunk/lib/IR ConstantFold.cpp, llvm/trunk/test/Transforms/ConstProp InsertElement.ll

[ConstantFold] fix inconsistent handling of extractelement with undef index (PR42689)

Any constant other than zero was already folded to undef if the index is undef.

LLVM/llvm 374728llvm/trunk/lib/Transforms/InstCombine InstCombineCasts.cpp, llvm/trunk/test/Transforms/InstCombine load-bitcast-vec.ll

[InstCombine] don't assume 'inbounds' for bitcast deref or null pointer in non-default 
address space

Follow-up to D68244 to account for a corner case discussed in:

Add one more restriction: if the pointer is deref-or-null and in a non-default
(non-zero) address space, we can't assume inbounds.

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

LLVM/llvm 374727clang-tools-extra/trunk/clangd/unittests DiagnosticsTests.cpp

Make the last to clangd unit tests pass on Windows.

(Some lit tests still fail.)

See FIXME in diff for details.

Part of PR43592.

LLVM/llvm 374726llvm/trunk/test/Transforms/InstCombine sign-bit-test-via-right-shifting-all-other-bits.ll shift-amount-reassociation.ll

[NFC][InstCombine] More test for "sign bit test via shifts" pattern (PR43595)

While that pattern is indirectly handled via
that incursme one-use restriction on truncation,
which is pointless since we know that we'll produce a single instruction.

Additionally, *if* we are only looking for sign bit,
we don't need shifts to be identical,
which isn't the case in general,
and is the blocker for me in bug in question:


LLVM/llvm 374725llvm/trunk/lib/Target/X86 X86ISelLowering.cpp

[X86] SimplifyMultipleUseDemandedBitsForTargetNode - use getTargetShuffleInputs with 
KnownUndef/Zero results.

LLVM/llvm 374724llvm/trunk/lib/Target/X86 X86ISelLowering.cpp

[X86] getTargetShuffleInputs - add KnownUndef/Zero output support

Adjust SimplifyDemandedVectorEltsForTargetNode to use the known elts masks instead of 
recomputing it locally.