SuccessChanges

Summary

  1. [sanitizer,android] Don't check devices on error (details)
Commit 8fac69c1f510b2d424920d19da8b4b8f13af27ab by Vitaly Buka
[sanitizer,android] Don't check devices on error

If we already have a build error we should not check
if tests were executed. If device went offlind for some reasons
we usually show exception as it's infrastructure issue.

Howeve if we already see some compilation error we
don't want it hidden from commiters by exception.
The file was modifiedzorg/buildbot/builders/sanitizers/buildbot_android_functions.sh (diff)

Summary

  1. [X86][AVX] SimplifyDemandedBitsForTargetNode - add basic X86ISD::VBROADCAST handling. (details)
  2. [PDB] Fix unsigned integer overflow (details)
  3. [MLIR][linalg] Make integer matmul ops cast before multiplying (details)
  4. [AMDGPU] Add selection pattern for v_xnor_b32 (details)
  5. [NFC] MCRegister fixes in RegisterClassInfo, and const-ed APIs (details)
  6. [libc++] Allow running CI on macOS when Ninja isn't installed outside of Xcode (details)
  7. [NFC] Const-ed 2 APIs in VirtRegMap (details)
  8. [NFC][regalloc] const-ed APIs, using MCRegister instead of unsigned (details)
  9. [InstCombine][NFC]Add a test for logical reductions. (details)
  10. [libc++] Make the from-scratch config work on macOS out-of-the-box (details)
  11. Add a helper for matching simple recurrence cycles (details)
  12. Change some addUsedGlobal to addUsedOrCompilerUsedGlobal (details)
  13. [libcxx] cleans up __cpp_concepts mess (details)
  14. Use helper introduced in 8020be0b8 to simplify ValueTracking [NFC] (details)
  15. [clang-tidy] Remove some test c++ mode restrictions. (details)
  16. [SanitizerCoverage] Clarify llvm.used/llvm.compiler.used and partially fix unmatched metadata sections on Windows (details)
  17. [clang-tidy][NFC] Tweak some generation of diag messages (details)
  18. [dfsan] Propagate origins for callsites (details)
  19. [scudo][test] Disable -Wfree-nonheap-object (details)
Commit ed1f45bce9fb4688a4ab06862b25c6d55b5dc415 by llvm-dev
[X86][AVX] SimplifyDemandedBitsForTargetNode - add basic X86ISD::VBROADCAST handling.

Simplify through to the scalar/vector source operand.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/vector-shuffle-combining-avx2.ll
Commit 301551ae8e8f54fd66867c9411fcc17b2f02be7d by thakis
[PDB] Fix unsigned integer overflow

When building with -fsanitize=unsigned-integer-overflow, this code
causes a diagnostic like:

    ../../llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp:159:15:
    runtime error: unsigned integer overflow:
    90 - 229 cannot be represented in type 'unsigned long'

unsigned integer overflow is well defined and it isn't an issue in
practice, but in obscure scenarios (S1.size() small, S2.size over 2GB
on 32-bit systems) it could even be a bug.

So use the usual idiom for implementing cmp functions instead of the
gernally considered buggy idiom :)
See e.g. https://www.gnu.org/software/libc/manual/html_node/Comparison-Functions.html
or https://stackoverflow.com/questions/10996418/efficient-integer-compare-function/10997428#10997428

Differential Revision: https://reviews.llvm.org/D97557
The file was modifiedllvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
Commit 21bb63893e8557df7a7ab690ad98cb5979099186 by gcmn
[MLIR][linalg] Make integer matmul ops cast before multiplying

Right now they multiply before casting which means they would frequently
overflow. There are various reasonable ways to do this, but until we
have robust op description infra, this is a simple and safe default. More
careful treatments are likely to be hardware specific, as well (e.g.
using an i8*i8->i16 mul instruction).

Reviewed By: nicolasvasilache, mravishankar

Differential Revision: https://reviews.llvm.org/D97505
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOpsSpec.tc
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir
Commit dc2259537a30127808efc4ee68ec5b0cae5c983a by jay.foad
[AMDGPU] Add selection pattern for v_xnor_b32

This allows GlobalISel to use this instruction where available. I assume
SelectionDAG always selects s_xnor_b32 so it isn't affected by this
change.

Differential Revision: https://reviews.llvm.org/D97560
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/xnor.ll
The file was modifiedllvm/lib/Target/AMDGPU/VOP2Instructions.td
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.td
Commit a00f7dc2d539bae2702e871e0767e4effb87ceb6 by mtrofin
[NFC] MCRegister fixes in RegisterClassInfo, and const-ed APIs
The file was modifiedllvm/include/llvm/CodeGen/RegisterClassInfo.h
Commit f8e810c359b51c911dfb3be1f8c48f28356c09ec by Louis Dionne
[libc++] Allow running CI on macOS when Ninja isn't installed outside of Xcode

Xcode does bundle Ninja, so we can use that Ninja if there's no system-wide
Ninja installed. This is useful on some CI bots we have that don't come
with Ninja pre-installed.
The file was modifiedlibcxx/utils/ci/run-buildbot
Commit a2bfc43ae10e9ed1252d96fd25add647c42b79f9 by mtrofin
[NFC] Const-ed 2 APIs in VirtRegMap
The file was modifiedllvm/include/llvm/CodeGen/VirtRegMap.h
The file was modifiedllvm/lib/CodeGen/VirtRegMap.cpp
Commit 3e992326a510035adcddd284399ba67db374131c by mtrofin
[NFC][regalloc] const-ed APIs, using MCRegister instead of unsigned
The file was modifiedllvm/lib/CodeGen/RegAllocGreedy.cpp
Commit 7820518d55f9c40cd55adbe7185743e1bd2c936d by a.bataev
[InstCombine][NFC]Add a test for logical reductions.
The file was addedllvm/test/Transforms/InstCombine/vector-logical-reductions.ll
Commit 27f9ed78506329cbf14b91eb545ca7419a983e00 by Louis Dionne
[libc++] Make the from-scratch config work on macOS out-of-the-box
The file was modifiedlibcxx/test/configs/libcxx-trunk-shared.cfg.in
The file was modifiedlibcxx/test/configs/libcxx-trunk-static.cfg.in
Commit 8020be0b8b57e0d29d93f0a4a5b2e9bbfd2242e7 by listmail
Add a helper for matching simple recurrence cycles

This helper came up in another review, and I've got about 4 different patches with copies of this copied into it.  Time to precommit the routine.  :)
The file was modifiedllvm/include/llvm/Analysis/ValueTracking.h
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit 28cb620321f5461255423f84c85e6891b5174c13 by i
Change some addUsedGlobal to addUsedOrCompilerUsedGlobal

An global value in the `llvm.used` list does not have GC root semantics on ELF targets.
This will be changed in a subsequent backend patch.

Change some `llvm.used` in the ELF code path to use `llvm.compiler.used` to
prevent undesired GC root semantics.

Change one extern "C" alias (due to `__attribute__((used))` in extern "C") to use `llvm.compiler.used` on all targets.

GNU ld has a rule "`__start_/__stop_` references from a live input section retain the associated C identifier name sections",
which LLD may drop entirely (currently refined to exclude SHF_LINK_ORDER/SHF_GROUP) in a future release (the rule makes it clumsy to GC metadata sections; D96914 added a way to try the potential future behavior).
For `llvm.used` global values defined in a C identifier name section, keep using `llvm.used` so that
the future LLD change will not affect them.

rnk kindly categorized the changes:
```
ObjC/blocks: this wants GC root semantics, since ObjC mainly runs on Mac.
MS C++ ABI stuff: wants GC root semantics, no change
OpenMP: unsure, but GC root semantics probably don't hurt
CodeGenModule: affected in this patch to *not* use GC root semantics so that __attribute__((used)) behavior remains the same on ELF, plus two other minor use cases that don't want GC semantics
Coverage: Probably want GC root semantics
CGExpr.cpp: refers to LTO, wants GC root
CGDeclCXX.cpp: one is MS ABI specific, so yes GC root, one is some other C++ init functionality, which should form GC roots (C++ initializers can have side effects and must run)
CGDecl.cpp: Changed in this patch for __attribute__((used))
```

Differential Revision: https://reviews.llvm.org/D97446
The file was modifiedclang/test/CodeGen/attr-used.c
The file was modifiedclang/test/CodeGenCXX/extern-c.cpp
The file was modifiedclang/test/CodeGen/attr-x86-interrupt.c
The file was modifiedclang/lib/CodeGen/CGDecl.cpp
The file was modifiedclang/lib/CodeGen/CodeGenModule.h
The file was modifiedclang/test/CodeGen/attr-msp430.c
The file was modifiedclang/test/CodeGen/2005-12-04-AttributeUsed.c
The file was modifiedclang/test/CodeGenCUDA/llvm-used.cu
The file was modifiedclang/test/CodeGen/attr-target-mv.c
The file was modifiedclang/test/CodeGen/keep-static-consts.cpp
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was modifiedclang/test/CodeGenCXX/attr-x86-interrupt.cpp
Commit e4dd614ae81194b0a50361a91f8bd4364916ef2e by cjdb
[libcxx] cleans up __cpp_concepts mess

libc++ was previously a bit confused by what the value of __cpp_concepts
should be. Also replaces `__floating_point` with `floating_point` now
that it exists.

Differential Revision: https://reviews.llvm.org/D97015
The file was modifiedlibcxx/include/version
The file was modifiedlibcxx/include/random
The file was modifiedlibcxx/test/std/language.support/support.limits/support.limits.general/numbers.version.pass.cpp
The file was modifiedlibcxx/include/concepts
The file was modifiedlibcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
The file was modifiedlibcxx/utils/generate_feature_test_macro_components.py
The file was modifiedlibcxx/include/numbers
The file was modifiedlibcxx/utils/libcxx/test/features.py
Commit ebd3aeba273736596163d498c38cc32e743bed31 by listmail
Use helper introduced in 8020be0b8 to simplify ValueTracking [NFC]

Direct rewrite of the code the helper was extracted from.
The file was modifiedllvm/include/llvm/Analysis/ValueTracking.h
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit b18f14d6897b9e9f34ffd0d8ed46b8ac596fbf05 by n.james93
[clang-tidy] Remove some test c++ mode restrictions.

Some comments are redundant, others just simple fixes.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D97544
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/google-readability-casting.cpp
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-x86.cpp
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-ppc.cpp
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/abseil-faster-strsplit-delimiter.cpp
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/abseil-upgrade-duration-conversions.cpp
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/abseil-time-subtraction.cpp
Commit b55f29c194d31cb51096d80b5e2710fc3385a7ef by i
[SanitizerCoverage] Clarify llvm.used/llvm.compiler.used and partially fix unmatched metadata sections on Windows

`__sancov_pcs` parallels the other metadata section(s). While some optimizers
(e.g. GlobalDCE) respect linker semantics for comdat and retain or discard the
sections as a unit, some (e.g.  GlobalOpt/ConstantMerge) do not. So we have to
conservatively retain all unconditionally in the compiler.

When a comdat is used, the COFF/ELF linkers' GC semantics ensure the
associated parallel array elements are retained or discarded together,
so `llvm.compiler.used` is sufficient.

Otherwise (MachO (see rL311955/rL311959), COFF special case where comdat is not
used), we have to use `llvm.used` to conservatively make all sections retain by
the linker. This will fix the Windows problem once internal linkage
GlobalObject's in `llvm.used` are retained via `/INCLUDE:`.

Reviewed By: morehouse, vitalybuka

Differential Revision: https://reviews.llvm.org/D97432
The file was modifiedllvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
The file was modifiedllvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard.ll
Commit 1a721b6a2634d9740b389a7604275b426c22600a by n.james93
[clang-tidy][NFC] Tweak some generation of diag messages

Fix up cases where diag is called by piecing together a string in favour of placeholders.
Fix up cases where select could be used instead of duplicating the message for sake of 1 word difference.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D97488
The file was modifiedclang-tools-extra/clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/misc-uniqueptr-reset-release.cpp
The file was modifiedclang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/UseNodiscardCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp
The file was modifiedclang-tools-extra/clang-tidy/bugprone/ParentVirtualCallCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/abseil/DurationFactoryFloatCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/portability/SIMDIntrinsicsCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/UseTransparentFunctorsCheck.cpp
Commit a47d435bc4307ca71612dd03f09f12f7ff6b461f by jianzhouzh
[dfsan] Propagate origins for callsites

This is a part of https://reviews.llvm.org/D95835.

Each customized function has two wrappers. The
first one dfsw is for the normal shadow propagation. The second one dfso is used
when origin tracking is on. It calls the first one, and does additional
origin propagation. Which one to use can be decided at instrumentation
time. This is to ensure minimal additional overhead when origin tracking
is off.

Reviewed-by: morehouse

Differential Revision: https://reviews.llvm.org/D97483
The file was addedllvm/test/Instrumentation/DataFlowSanitizer/origin_abilist.ll
The file was modifiedcompiler-rt/lib/dfsan/dfsan.syms.extra
The file was modifiedllvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
The file was addedllvm/test/Instrumentation/DataFlowSanitizer/origin_call.ll
Commit bed888242662c2327b32b91a03635e079ad5667e by leonardchan
[scudo][test] Disable -Wfree-nonheap-object

As of 4f395db86b5cc11bb56853323d3cb1d4b6db5a0b which contains updates to
-Wfree-nonheap-object, a line in this test will trigger the warning. This
particular line is ok though since it's meant to test a free on a bad pointer.

Differential Revision: https://reviews.llvm.org/D97516
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp