SuccessChanges

Summary

  1. [InstSimplify] refactor min/max folds with shared operand; NFC (details)
  2. [lldb/Host] Upstream macOS TCC code (details)
  3. [GlobalISel] Don't transform FSUB(-0, X) -> FNEG(X) in GlobalISel. (details)
  4. AMDGPU/GlobalISel: Ensure subreg is valid when selecting G_UNMERGE_VALUES (details)
  5. [DWARFYAML] Fix unintialized value Is64BitAddrSize. NFC. (details)
  6. [GlobalISel] Remove redundant FNEG tests. (details)
  7. [MLIR] Simplify semi-affine expressions (details)
  8. Fix sphinx indentation warnings by adding explicit line breaks to address space hierarchy (details)
  9. [gn build] (manually) merge 593e1962 (details)
  10. sanitizer_symbolizer_libcdep.cpp: Change --inlining=true to --inlines and --inlining=false to --no-inlines (details)
  11. Fix -Wconstant-conversion warning with explicit cast (details)
  12. [MLIR][SPIRVToLLVM] Indentation and style fix in tests (details)
  13. [InstSimplify] add tests for compare of min/max; NFC (details)
  14. [test] Fix another realpath->abspath. (details)
  15. [clang] improve diagnostics for misaligned and large atomics (details)
  16. Revert "[HotColdSplit] Add test case for unlikely attribute in outlined function" (details)
  17. [SCCP] Propagate inequalities (details)
Commit a16882047a3f7c37f2c7747a1b2ee0d7619d5645 by spatel
[InstSimplify] refactor min/max folds with shared operand; NFC
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit 041c7b84a4b925476d1e21ed302786033bb6035f by Jonas Devlieghere
[lldb/Host] Upstream macOS TCC code

Upstream the code for dealing with TCC introduced in macOS Mojave. This
will make the debuggee instead of the debugger responsible for the
privileges it needs.

Differential revision: https://reviews.llvm.org/D85217
The file was modifiedlldb/source/Host/macosx/objcxx/Host.mm
The file was addedlldb/source/Host/macosx/objcxx/PosixSpawnResponsible.h
Commit 23adbac9ee23c10976e40c80999abf02ecb389b7 by mcinally
[GlobalISel] Don't transform FSUB(-0, X) -> FNEG(X) in GlobalISel.

This patch stops unconditionally transforming FSUB(-0, X) into an FNEG(X) while building the MIR.

This corresponds with the SelectionDAGISel change in D84056.

Differential Revision: https://reviews.llvm.org/D85139
The file was modifiedllvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
Commit 0de547ed4ada068ea618bdb8ce58ddc89de9a42f by Matthew.Arsenault
AMDGPU/GlobalISel: Ensure subreg is valid when selecting G_UNMERGE_VALUES

Fixes verifier error with SGPR unmerges with 96-bit result types.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.s.buffer.load.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values.mir
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-unmerge-values.mir
Commit 12605bfd1ff5c6316e74587be1b41d24abd893fc by Xing
[DWARFYAML] Fix unintialized value Is64BitAddrSize. NFC.

This patch fixes the undefined behavior that reported by ubsan.

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/44524/
The file was modifiedllvm/include/llvm/ObjectYAML/DWARFEmitter.h
The file was modifiedllvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp
The file was modifiedllvm/lib/ObjectYAML/DWARFEmitter.cpp
Commit 724b035fe4df89e807f85ee202da8b0bc227895b by mcinally
[GlobalISel] Remove redundant FNEG tests.

These tests were made redundant by D85139.
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
Commit 56593fa370124a4d77703e7ddfa4dfca81e0c8f2 by uday
[MLIR] Simplify semi-affine expressions

Simplify semi-affine expression for the operations like ceildiv,
floordiv and modulo by any given symbol by checking divisibilty by that
symbol.

Some properties used in simplification are:

1) Commutative property of the floordiv and ceildiv:
((expr1 floordiv expr2) floordiv expr3 ) = ((expr1 floordiv expr3) floordiv expr2)
((expr1 ceildiv expr2) ceildiv expr3 ) = ((expr1 ceildiv expr3) ceildiv expr2)

While simplification if operations are different no simplification is
possible as there is no property that simplify expressions like these:
((expr1 ceildiv expr2) floordiv expr3) or  ((expr1 floordiv expr2)
ceildiv expr3).

2) If both expr1 and expr2 are divisible by the expr3 then:
(expr1 % expr2) / expr3 = ((expr1 / expr3) % (expr2 / expr3))
where / is divide symbol.

3) If expr1 is divisible by expr2 then expr1 % expr2 = 0.

Signed-off-by: Yash Jain <yash.jain@polymagelabs.com>

Differential Revision: https://reviews.llvm.org/D84920
The file was modifiedmlir/test/Dialect/Affine/simplify-affine-structures.mlir
The file was modifiedmlir/lib/IR/AffineExpr.cpp
Commit 83cb98f9e7a57360e137b32b26500fca630df617 by llvm-dev
Fix sphinx indentation warnings by adding explicit line breaks to address space hierarchy
The file was modifiedclang/include/clang/Basic/AttrDocs.td
Commit 6a4fd03698e1aab09c47215b7eace942a23de074 by thakis
[gn build] (manually) merge 593e1962
The file was modifiedllvm/utils/gn/secondary/llvm/tools/llvm-symbolizer/BUILD.gn
Commit e4441fc653912ec4efc5611a8dd926f8bdd0306c by i
sanitizer_symbolizer_libcdep.cpp: Change --inlining=true to --inlines and --inlining=false to --no-inlines
The file was modifiedcompiler-rt/lib/asan/scripts/asan_symbolize.py
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp
Commit e31cfc4cd3e393300002e9c519787c96e3b67bab by dblaikie
Fix -Wconstant-conversion warning with explicit cast

Introduced by fd6584a22043b254a323635c142b28ce80ae5b5b

Following similar use of casts in AsmParser.cpp, for instance - ideally
this type would use unsigned chars as they're more representative of raw
data and don't get confused around implementation defined choices of
char's signedness, but this is what it is & the signed/unsigned
conversions are (so far as I understand) safe/bit preserving in this
usage and what's intended, given the API design here.
The file was modifiedllvm/lib/Target/AArch64/AArch64FrameLowering.cpp
Commit b9266f81bc0a2b53406a84e6ef0c4989d5f7e296 by georgemitenk0v
[MLIR][SPIRVToLLVM] Indentation and style fix in tests

Second patch with test fixes. Redundant `%{{.*}} = `
removed, label checks added, tabs converted to spaces and
some namings are changed to match the convention.

Fixed tests:
- constant-op-to-llvm
- func-ops-to-llvm (renamed)
- memory-ops-to-llvm
- misc-ops-to-llvm
- module-ops-to-llvm
- shift-ops-to-llvm (renamed)
- spirv-types-to-llvm-invalid (renamed)

Reviewed By: ftynse, rriddle

Differential Revision: https://reviews.llvm.org/D85206
The file was modifiedmlir/test/Conversion/SPIRVToLLVM/misc-ops-to-llvm.mlir
The file was removedmlir/test/Conversion/SPIRVToLLVM/func-to-llvm.mlir
The file was addedmlir/test/Conversion/SPIRVToLLVM/shift-ops-to-llvm.mlir
The file was removedmlir/test/Conversion/SPIRVToLLVM/spirv-types-to-llvm.invalid.mlir
The file was addedmlir/test/Conversion/SPIRVToLLVM/func-ops-to-llvm.mlir
The file was removedmlir/test/Conversion/SPIRVToLLVM/shifts-to-llvm.mlir
The file was modifiedmlir/test/Conversion/SPIRVToLLVM/memory-ops-to-llvm.mlir
The file was addedmlir/test/Conversion/SPIRVToLLVM/spirv-types-to-llvm-invalid.mlir
The file was modifiedmlir/test/Conversion/SPIRVToLLVM/constant-op-to-llvm.mlir
Commit 960cef75f4d289e01b338c2f98c5dca2520ee8ff by spatel
[InstSimplify] add tests for compare of min/max; NFC

The test are adapted from the existing tests for cmp/select idioms.
The file was modifiedllvm/test/Transforms/InstSimplify/maxmin_intrinsics.ll
Commit 31ec6e969d601eb4fbee7bd4be3d03d23b5b3c11 by rupprecht
[test] Fix another realpath->abspath.

This is a followup to 817b3a6fe3a4452eb61a2503c8beaa7267ca0351: in `builder_base` we should use abspath, not realpath, because the name is significant.
This is used by test cases that use `@skipIf(compiler="clang", compiler_version=['<', <version>])`
The file was modifiedlldb/packages/Python/lldbsuite/test/plugins/builder_base.py
Commit e18c6ef6b41a59af73bf5c3d7d52a8c53a471e5d by JF Bastien
[clang] improve diagnostics for misaligned and large atomics

"Listing the alignment and access size (== expected alignment) in the warning
seems like a good idea."

solves PR 46947

  struct Foo {
    struct Bar {
      void * a;
      void * b;
    };
    Bar bar;
  };

  struct ThirtyTwo {
    struct Large {
      void * a;
      void * b;
      void * c;
      void * d;
    };
    Large bar;
  };

  void braz(Foo *foo, ThirtyTwo *braz) {
    Foo::Bar bar;
    __atomic_load(&foo->bar, &bar, __ATOMIC_RELAXED);

    ThirtyTwo::Large foobar;
    __atomic_load(&braz->bar, &foobar, __ATOMIC_RELAXED);
  }

repro.cpp:21:3: warning: misaligned atomic operation may incur significant performance penalty; the expected (16 bytes) exceeds the actual alignment (8 bytes) [-Watomic-alignment]
  __atomic_load(&foo->bar, &bar, __ATOMIC_RELAXED);
  ^
repro.cpp:24:3: warning: misaligned atomic operation may incur significant performance penalty; the expected (32 bytes) exceeds the actual alignment (8 bytes) [-Watomic-alignment]
  __atomic_load(&braz->bar, &foobar, __ATOMIC_RELAXED);
  ^
repro.cpp:24:3: warning: large atomic operation may incur significant performance penalty; the access size (32 bytes) exceeds the max lock-free size (16  bytes) [-Watomic-alignment]
3 warnings generated.

Differential Revision: https://reviews.llvm.org/D85102
The file was modifiedclang/lib/CodeGen/CGAtomic.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticFrontendKinds.td
The file was modifiedclang/include/clang/Basic/DiagnosticGroups.td
The file was modifiedclang/test/CodeGen/atomics-sema-alignment.c
Commit f8cc94a61afe48a4b77f111a8ad313fc3b9417de by 1894981+hiraditya
Revert "[HotColdSplit] Add test case for unlikely attribute in outlined function"

This reverts commit aa1f905890fbbfedf396530f1e14409875ece13c.

The flag -codegenprepare maybe causing failures. Reverting this
to investigate the root cause.
The file was modifiedllvm/test/Transforms/HotColdSplit/coldentrycount.ll
Commit 456497450482153afe86838ac2e2be395206d377 by nikita.ppv
[SCCP] Propagate inequalities

Teach SCCP to create notconstant lattice values from inequality
assumes and nonnull metadata, and update getConstant() to make
use of them. Additionally isOverdefined() needs to be changed to
consider notconstant an overdefined value.

Handling inequality branches is delayed until our branch on undef
story in other passes has been improved.

Differential Revision: https://reviews.llvm.org/D83643
The file was modifiedllvm/test/Transforms/SCCP/assume.ll
The file was modifiedllvm/lib/Transforms/Scalar/SCCP.cpp
The file was modifiedllvm/test/Transforms/SCCP/metadata.ll
The file was modifiedllvm/include/llvm/Analysis/ValueLattice.h