SuccessChanges

Summary

  1. [ARM] Fixup single source mla reductions. (details)
  2. [InstCombine][X86] Add tests for masked load/stores with comparisons. (details)
  3. Reland [AssumeBundles] Use operand bundles to encode alignment assumptions (details)
  4. [MachineScheduler] Fix operand scheduling for pre/post-increment loads (details)
  5. [Clang] Add option to allow marking pass-by-value args as noalias. (details)
Commit 6cfd38d03d5fc3cde929ebf82529415595e8ef8e by david.green
[ARM] Fixup single source mla reductions.

This fixes a complication on top of D87276. If we are sign extending
around a mul with the two operands that are the same, instcombine will
helpfully convert one of the sext to a zext. Reverse that so that we
again generate a reduction.

Differnetial Revision: https://reviews.llvm.org/D87287
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vecreduce-mlapred.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vecreduce-mla.ll (diff)
Commit d030aad7893a8cf7a68877b8b55eed1cd632411a by llvm-dev
[InstCombine][X86] Add tests for masked load/stores with comparisons.

As detailed on PR11210, if the mask is known to come from a (sign extended) bool vector (e.g. comparisons) then we can represent with a generic masked load/store without losing anything.
The file was modifiedllvm/test/Transforms/InstCombine/X86/x86-masked-memops.ll (diff)
Commit 78de7297abe2e8fa782682168989c70e3cb34a5c by tyker
Reland [AssumeBundles] Use operand bundles to encode alignment assumptions

NOTE: There is a mailing list discussion on this: http://lists.llvm.org/pipermail/llvm-dev/2019-December/137632.html

Complemantary to the assumption outliner prototype in D71692, this patch
shows how we could simplify the code emitted for an alignemnt
assumption. The generated code is smaller, less fragile, and it makes it
easier to recognize the additional use as a "assumption use".

As mentioned in D71692 and on the mailing list, we could adopt this
scheme, and similar schemes for other patterns, without adopting the
assumption outlining.
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function.cpp (diff)
The file was modifiedllvm/unittests/Analysis/AssumeBundleQueriesTest.cpp (diff)
The file was modifiedllvm/lib/IR/IRBuilder.cpp (diff)
The file was modifiedclang/test/OpenMP/simd_metadata.c (diff)
The file was modifiedclang/test/CodeGen/assume-aligned-and-alloc-align-attributes.c (diff)
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-openmp.cpp (diff)
The file was modifiedllvm/lib/Analysis/AssumeBundleQueries.cpp (diff)
The file was modifiedllvm/test/Transforms/Inline/byref-align.ll (diff)
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-attribute-align_value-on-lvalue.cpp (diff)
The file was modifiedllvm/include/llvm/IR/IRBuilder.h (diff)
The file was modifiedllvm/test/Transforms/PhaseOrdering/inlining-alignment-assumptions.ll (diff)
The file was modifiedclang/test/CodeGen/builtin-align.c (diff)
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp (diff)
The file was modifiedclang/test/CodeGen/builtin-align-array.c (diff)
The file was modifiedllvm/include/llvm/Transforms/Scalar/AlignmentFromAssumptions.h (diff)
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-three-params.cpp (diff)
The file was modifiedclang/test/CodeGen/builtin-assume-aligned.c (diff)
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function-two-params.cpp (diff)
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function-variable.cpp (diff)
The file was modifiedclang/test/CodeGen/non-power-of-2-alignment-assumptions.c (diff)
The file was modifiedclang/test/OpenMP/simd_codegen.cpp (diff)
The file was modifiedllvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp (diff)
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function.cpp (diff)
The file was modifiedllvm/test/Transforms/Inline/align.ll (diff)
The file was modifiedllvm/test/Transforms/AlignmentFromAssumptions/simple32.ll (diff)
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen.cpp (diff)
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-attribute-align_value-on-paramvar.cpp (diff)
The file was modifiedllvm/lib/IR/Verifier.cpp (diff)
The file was modifiedclang/test/CodeGen/align_value.cpp (diff)
The file was modifiedclang/test/CodeGen/alloc-align-attr.c (diff)
The file was modifiedllvm/test/Transforms/InstCombine/assume.ll (diff)
The file was modifiedllvm/test/Transforms/AlignmentFromAssumptions/simple.ll (diff)
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp (diff)
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-three-params-variable.cpp (diff)
The file was modifiedllvm/test/Verifier/assume-bundles.ll (diff)
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-two-params.cpp (diff)
Commit 2e61cd1295e0031b2379af2b65373e2798a551cb by eleviant
[MachineScheduler] Fix operand scheduling for pre/post-increment loads

Differential revision: https://reviews.llvm.org/D87557
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrFormats.td (diff)
The file was modifiedllvm/test/tools/llvm-mca/AArch64/Exynos/load.s (diff)
Commit a874d63344093752c912d01de60211f65745ea6f by flo
[Clang] Add option to allow marking pass-by-value args as noalias.

After the recent discussion on cfe-dev 'Can indirect class parameters be
noalias?' [1], it seems like using using noalias is problematic for
current C++, but should be allowed for C-only code.

This patch introduces a new option to let the user indicate that it is
safe to mark indirect class parameters as noalias. Note that this also
applies to external callers, e.g. it might not be safe to use this flag
for C functions that are called by C++ functions.

In targets that allocate indirect arguments in the called function, this
enables more agressive optimizations with respect to memory operations
and brings a ~1% - 2% codesize reduction for some programs.

[1] : http://lists.llvm.org/pipermail/cfe-dev/2020-July/066353.html

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D85473
The file was modifiedclang/include/clang/Driver/Options.td (diff)
The file was addedclang/test/CodeGen/pass-by-value-noalias.c
The file was addedclang/test/CodeGenObjC/pass-by-value-noalias.m
The file was modifiedclang/include/clang/Basic/CodeGenOptions.def (diff)
The file was modifiedclang/lib/CodeGen/CGCall.cpp (diff)
The file was addedclang/test/CodeGenCXX/pass-by-value-noalias.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp (diff)