Changes

Summary

  1. clang-ve-ninja: build and install compiler-rt (details)
Commit 74ca6968913aa5e26828e51e0e6a7e6d7db25386 by simon.moll
clang-ve-ninja: build and install compiler-rt
The file was modifiedzorg/buildbot/builders/annotated/ve-linux-steps.make (diff)

Summary

  1. [DFSan] Fix flakey release_shadow_space.c accounting for Origin chains. (details)
  2. [LoopIdiom] Fix store size SCEV type. (details)
  3. [LLDB] Skip TestScriptedProcess on Arm/AArch64 Linux (details)
  4. re-land "[AA] Teach BasicAA to recognize basic GEP range information." (details)
  5. [fir] Add the abstract result conversion pass (details)
  6. [libcxx][pretty printers] Disable u16string tests (details)
  7. [LoopVectorize] Permit vectorisation of more select(cmp(), X, Y) reduction patterns (details)
  8. [BasicAA][NFC] Improve comment. (details)
  9. [AArch64] Emit AssertZExt for i1 arguments (details)
Commit 50a08e2c6d4185df6a5b0a5b41c7ef8849aad269 by Vitaly Buka
[DFSan] Fix flakey release_shadow_space.c accounting for Origin chains.

Test sometimes fails on buildbot (after two non-Origins executions):

/usr/bin/ld: warning: Cannot export local symbol 'dfsan_flush'
RSS at start: 4620, after mmap: 107020, after mmap+set label: 209424, after fixed map: 4624, after another mmap+set label: 209424, after munmap: 4624
/usr/bin/ld: warning: Cannot export local symbol 'dfsan_flush'
RSS at start: 4620, after mmap: 107020, after mmap+set label: 209424, after fixed map: 4624, after another mmap+set label: 209424, after munmap: 4624
/usr/bin/ld: warning: Cannot export local symbol 'dfsan_flush'
RSS at start: 4620, after mmap: 107020, after mmap+set label: 317992, after fixed map: 10792, after another mmap+set label: 317992, after munmap: 10792
release_shadow_space.c.tmp: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/dfsan/release_shadow_space.c:91: int main(int, char **): Assertion `after_fixed_mmap <= before + delta' failed.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D111522
The file was modifiedcompiler-rt/test/dfsan/release_shadow_space.c
Commit 6aaf1e7ea931a1865cc97ebf8fcb084772f8142e by courbet
[LoopIdiom] Fix store size SCEV type.

We were using the type of the loop back edge count to represent the
store size. This failed for small loop counts (e.g. in the added test,
the loop count was an i2).

Use the index type instead.

Fixes PR52104.

Differential Revision: https://reviews.llvm.org/D111401
The file was modifiedllvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
The file was addedllvm/test/Transforms/LoopIdiom/memset-pr52104.ll
Commit c63cb0c80ec7eb2dedad6e89fb9a3042b71d3b0f by omair.javaid
[LLDB] Skip TestScriptedProcess on Arm/AArch64 Linux

This is failing on Arm and AArch64 Linux buildbots since the time it was
comitted.

https://lab.llvm.org/buildbot/#/builders/96/builds/12628

Differential Revision: https://reviews.llvm.org/D107585
The file was modifiedlldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
Commit 83ded5d3239170a430e49cde80ea40e68b9af230 by courbet
re-land "[AA] Teach BasicAA to recognize basic GEP range information."

Now that PR52104 is fixed.
The file was modifiedllvm/test/Analysis/BasicAA/sequential-gep.ll
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
The file was modifiedllvm/test/Analysis/BasicAA/assume-index-positive.ll
The file was addedllvm/test/Analysis/BasicAA/range.ll
Commit b0eef1eef0500315bf74721dda3d7a8e3c6a6eac by clementval
[fir] Add the abstract result conversion pass

Add pass that convert abstract result to function argument.
This pass is needed before the conversion to LLVM IR.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: schweitz

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

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
The file was addedflang/lib/Optimizer/Transforms/AbstractResult.cpp
The file was addedflang/test/Fir/abstract-results.fir
The file was modifiedflang/lib/Optimizer/Transforms/CMakeLists.txt
The file was modifiedflang/include/flang/Optimizer/Transforms/Passes.h
The file was modifiedflang/lib/Optimizer/Dialect/FIROps.cpp
The file was modifiedflang/include/flang/Optimizer/Transforms/Passes.td
Commit cd1bd95d8707371da0e4f75cd01669c427466931 by david.spickett
[libcxx][pretty printers] Disable u16string tests

Due to reported failures in a local build.

FAIL: Something is wrong in the test framework.
Converting character sets: Invalid argument.

(was enabled in https://reviews.llvm.org/D111138)
The file was modifiedlibcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
Commit 26b7d9d62275e782da190d1717849c49588a4b0c by david.sherwood
[LoopVectorize] Permit vectorisation of more select(cmp(), X, Y) reduction patterns

This patch adds further support for vectorisation of loops that involve
selecting an integer value based on a previous comparison. Consider the
following C++ loop:

  int r = a;
  for (int i = 0; i < n; i++) {
    if (src[i] > 3) {
      r = b;
    }
    src[i] += 2;
  }

We should be able to vectorise this loop because all we are doing is
selecting between two states - 'a' and 'b' - both of which are loop
invariant. This just involves building a vector of values that contain
either 'a' or 'b', where the final reduced value will be 'b' if any lane
contains 'b'.

The IR generated by clang typically looks like this:

  %phi = phi i32 [ %a, %entry ], [ %phi.update, %for.body ]
  ...
  %pred = icmp ugt i32 %val, i32 3
  %phi.update = select i1 %pred, i32 %b, i32 %phi

We already detect min/max patterns, which also involve a select + cmp.
However, with the min/max patterns we are selecting loaded values (and
hence loop variant) in the loop. In addition we only support certain
cmp predicates. This patch adds a new pattern matching function
(isSelectCmpPattern) and new RecurKind enums - SelectICmp & SelectFCmp.
We only support selecting values that are integer and loop invariant,
however we can support any kind of compare - integer or float.

Tests have been added here:

  Transforms/LoopVectorize/AArch64/sve-select-cmp.ll
  Transforms/LoopVectorize/select-cmp-predicated.ll
  Transforms/LoopVectorize/select-cmp.ll

Differential Revision: https://reviews.llvm.org/D108136
The file was modifiedllvm/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was addedllvm/test/Transforms/LoopVectorize/select-cmp-predicated.ll
The file was modifiedllvm/lib/Analysis/IVDescriptors.cpp
The file was addedllvm/test/Transforms/LoopVectorize/AArch64/sve-select-cmp.ll
The file was modifiedllvm/include/llvm/Analysis/IVDescriptors.h
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/scalable-reduction-inloop.ll
The file was addedllvm/test/Transforms/LoopVectorize/select-cmp.ll
The file was modifiedllvm/include/llvm/Transforms/Utils/LoopUtils.h
Commit 342d7b654c63cadaa6135913c9582a7272fced58 by courbet
[BasicAA][NFC] Improve comment.
The file was modifiedllvm/test/Analysis/BasicAA/assume-index-positive.ll
Commit 7ae8f392a1610992c9a925c867fd7238c70d3ce0 by andrew.savonichev
[AArch64] Emit AssertZExt for i1 arguments

AAPCS requires i1 argument to be zero-extended to 8-bits by the
caller. Emit a new AArch64ISD::ASSERT_ZEXT_BOOL hint (or AssertZExt
for GlobalISel) to enable some optimization opportunities. In
particular, when the argument is forwarded to the callee, we can avoid
zero-extension and use it as-is.

Differential Revision: https://reviews.llvm.org/D107160
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.td
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator-switch.ll
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
The file was modifiedllvm/test/CodeGen/AArch64/i1-contents.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.h
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/call-translator.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-aapcs.ll
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/call-lowering-signext.ll