SuccessChanges

Summary

  1. [Diagnostics] Turn string concat warning to avoid false positives (details)
  2. [Polly] Reuse LLVM's build rules for gtest/gmock (details)
  3. [SCEVExpander] Avoid re-using existing casts if it means updating users. (details)
  4. [VectorCombine] try to create vector loads from scalar loads (details)
  5. [Diagnostics] Handle string concat pattern and avoid false positives (details)
  6. [Tests] Precommit tests for D85593 (details)
  7. [HotColdSplit] Add options for splitting cold functions in separate section (details)
  8. [SCEVExpander] Make sure cast properly dominates Builder's IP. (details)
  9. [InstSimplify/NewGVN] Add option to control the use of undef. (details)
  10. [InstSimplify] Make sure CanUseUndef is initialized in all cases. (details)
  11. Fix 64-bit copy to SCC (details)
  12. [X86][GlobalISel] Enable a test case for sext i32->i64 that was commented out. (details)
  13. [clang] Fix typo in comment (details)
  14. [NFC][StackSafety] Avoid some duplications in tests (details)
  15. [X86] Added testcases for PR47024 and PR46315 (details)
  16. [clangd] Add more error details on the remote index server side (details)
  17. [AST] Fixed string concatenation warnings (details)
  18. [AST] Fixed string list in test (details)
  19. [NFC][StackSafety] Add shell test requirement (details)
  20. [NFC][StackSafety] Add index test (details)
  21. [StackSafety] Use getSignedMin() to serialize ranges (details)
  22. [StackSafety] Don't keep FullSet in index (details)
Commit 04a23f1fe08a6ad0baf1305d7308231d2cb4843b by Dávid Bolvanský
[Diagnostics] Turn string concat warning to avoid false positives
The file was modifiedclang/test/Sema/string-concat.c
The file was modifiedclang/lib/Sema/SemaExpr.cpp
Commit c8b629a3a5854506dd25e84f9b4174b53f8f667b by mgorny
[Polly] Reuse LLVM's build rules for gtest/gmock

Reuse LLVM's CMakeLists.txt for gtest/gmock instead of reinventing
them in Polly.  This fixes a lot of linking errors due to not linking
LLVMSupport in for me.

Differential Revision: https://reviews.llvm.org/D85280
The file was modifiedpolly/CMakeLists.txt
Commit c70f0b9d4a063df396bb63378963cedbaa357bb8 by flo
[SCEVExpander] Avoid re-using existing casts if it means updating users.

Currently the SCEVExpander tries to re-use existing casts, even if they
are not exactly at the insertion point it was asked to create the cast.
To do so in some case, it creates a new cast at the insertion point and
updates all users to use the new cast.

This behavior is problematic, because it changes the IR outside of the
instructions created during the expansion. Therefore we cannot
completely undo all changes made during expansion.

This re-use should be only an extra optimization, so only using the new
cast in the expanded instructions should not be a correctness issue.
There are many cases equivalent instructions are created during
expansion.

This patch also adjusts findInsertPointAfter to skip instructions
inserted during expansion. This enables re-using existing casts without
the renaming any uses, by picking a better insertion point.

Reviewed By: efriedma, lebedev.ri

Differential Revision: https://reviews.llvm.org/D84399
The file was modifiedllvm/test/Transforms/LoopStrengthReduce/pr27056.ll
The file was modifiedllvm/test/Transforms/LoopIdiom/reuse-cast.ll
The file was modifiedllvm/test/Transforms/LoopDistribute/bounds-expansion-bug.ll
The file was modifiedllvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
The file was modifiedllvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
Commit 43bdac290663f4424f9fb3920c47c7288a2aabb4 by spatel
[VectorCombine] try to create vector loads from scalar loads

This patch was adjusted to match the most basic pattern that starts with an insertelement
(so there's no extract created here). Hopefully, that removes any concern about
interfering with other passes. Ie, the transform should almost always be profitable.

We could make an argument that this could be part of canonicalization, but we
conservatively try not to create vector ops from scalar ops in passes like instcombine.

If the transform is not profitable, the backend should be able to re-scalarize the load.

Differential Revision: https://reviews.llvm.org/D81766
The file was modifiedllvm/test/Transforms/VectorCombine/X86/load.ll
The file was modifiedllvm/lib/Transforms/Vectorize/VectorCombine.cpp
Commit 975467e4aa7ce1b8fcf4af0e25cdf053cfa8669e by Dávid Bolvanský
[Diagnostics] Handle string concat pattern and avoid false positives
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was modifiedclang/test/Sema/string-concat.c
Commit dee938e5ccdb5b3afe4e5b6e91b41db9c7fe61bd by Dávid Bolvanský
[Tests] Precommit tests for D85593
The file was addedllvm/test/Transforms/InstCombine/not-add.ll
Commit 53ac14484869a62e0c8eb569c6a030e7af1312e8 by aditya7
[HotColdSplit] Add options for splitting cold functions in separate section

Add support for (if enabled) splitting cold functions into a separate section
in order to further boost locality of hot code.

Authored by: rjf (Ruijie Fang)
Reviewed by: hiraditya,rcorcs,vsk

Differential Revision: https://reviews.llvm.org/D85331
The file was addedllvm/test/Transforms/HotColdSplit/section-splitting-default.ll
The file was modifiedllvm/lib/Transforms/IPO/HotColdSplitting.cpp
The file was addedllvm/test/Transforms/HotColdSplit/section-splitting-custom.ll
Commit 23817cbd0b6549d6145e4d0dbc0162370184a21e by flo
[SCEVExpander] Make sure cast properly dominates Builder's IP.

The selected cast must properly dominate the Builder's IP, so we cannot
re-use the cast, if it matches the builder's IP.
The file was modifiedllvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
The file was addedllvm/test/Transforms/LoopStrengthReduce/X86/expander-crashes.ll
Commit d236e1c7b606c461b5cb8a8a87d50ead5d1bcbb9 by flo
[InstSimplify/NewGVN] Add option to control the use of undef.

Making use of undef is not safe if the simplification result is not used
to replace all uses of the result. This leads to problems in NewGVN,
which does not replace all uses in the IR directly. See PR33165 for more
details.

This patch adds an option to SimplifyQuery to disable the use of undef.

Note that I've only guarded uses if isa<UndefValue>/m_Undef where
SimplifyQuery is currently available. If we agree on the general
direction, I'll update the remaining uses.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D84792
The file was removedllvm/test/Transforms/NewGVN/todo-pr33165-distribute-undef.ll
The file was modifiedllvm/include/llvm/Analysis/InstructionSimplify.h
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was addedllvm/test/Transforms/NewGVN/pr33165-distribute-undef.ll
The file was modifiedllvm/lib/Transforms/Scalar/NewGVN.cpp
Commit 5a0d6cdbd16c80d39e3a237582f6bb47aadacb67 by flo
[InstSimplify] Make sure CanUseUndef is initialized in all cases.

This should fix a bunch of buildbot failures.
The file was modifiedllvm/include/llvm/Analysis/InstructionSimplify.h
Commit 62d8b8a2253c4615723e4fdd92505f25d78c75ee by Piotr Sobczak
Fix 64-bit copy to SCC

Fix 64-bit copy to SCC by restricting the pattern resulting
in such a copy to subtargets supporting 64-bit scalar compare,
and mapping the copy to S_CMP_LG_U64.

Before introducing the S_CSELECT pattern with explicit SCC
(0045786f146e78afee49eee053dc29ebc842fee1), there was no need
for handling 64-bit copy to SCC ($scc = COPY sreg_64).

The proposed handling to read only the low bits was however
based on a false premise that it is only one bit that matters,
while in fact the copy source might be a vector of booleans and
all bits need to be considered.

The practical problem of mapping the 64-bit copy to SCC is that
the natural instruction to use (S_CMP_LG_U64) is not available
on old hardware. Fix it by restricting the problematic pattern
to subtargets supporting the instruction (hasScalarCompareEq64).

Differential Revision: https://reviews.llvm.org/D85207
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/addrspacecast.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/urem64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fshr.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-idiv.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/select-vectors.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/vselect.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ctlz_zero_undef.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sint_to_fp.f64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/uint_to_fp.f64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/32-bit-local-address-space.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/udiv64.ll
The file was modifiedllvm/lib/Target/AMDGPU/SOPInstructions.td
The file was modifiedllvm/test/CodeGen/AMDGPU/udivrem.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_elt.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sad.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sdiv64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fshl.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sdiv.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/srem64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/trunc.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ctlz.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/select-opt.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/extractelt-to-trunc.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fceil64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/mad_uint24.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/select64.ll
Commit 4e681fad46868c1c68a5ff9193447eb245824ca1 by craig.topper
[X86][GlobalISel] Enable a test case for sext i32->i64 that was commented out.

Test case seems to work so I guess whatever lead to it being
commented out with a FIXME has been fixed.
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/ext-x86-64.ll
Commit 898880fe4e329ce7fc6bbe30f309ef3b91535c21 by Dávid Bolvanský
[clang] Fix typo in comment

In the handleIntToFloatConversion() function, 6th parameter is ConvertFloat, 7th parameter is ConvertInt.

Reviewed By: njames93, xbolva00

Differential Revision: https://reviews.llvm.org/D85568
The file was modifiedclang/lib/Sema/SemaExpr.cpp
Commit 2a11d5dcc97a454bfd6db0771709cd554a5ccfac by Vitaly Buka
[NFC][StackSafety] Avoid some duplications in tests
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/ipa.ll
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/ipa-alias.ll
Commit 86cc7226874ad471d07066172fa0b023b1c3f37c by Dávid Bolvanský
[X86] Added testcases for PR47024 and PR46315
The file was addedllvm/test/CodeGen/X86/mov-zero-to-xor.ll
Commit 836f937a1f1150d81c0bf2b6a14872146da5b89e by kbobyrev
[clangd] Add more error details on the remote index server side

Reviewed By: kadircet

Differential Revision: https://reviews.llvm.org/D85502
The file was modifiedclang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
Commit 9658647d72d24f339f8b8129da9f116c358f30d5 by Dávid Bolvanský
[AST] Fixed string concatenation warnings
The file was modifiedclang/unittests/AST/CommentParser.cpp
Commit eeb7c496e385d2a88c39a0e0ebfe8a9908762cc3 by Dávid Bolvanský
[AST] Fixed string list in test
The file was modifiedclang/unittests/AST/CommentParser.cpp
Commit 2fa401fe53dbad184eeecfe4d0bd20599c5f35ce by Vitaly Buka
[NFC][StackSafety] Add shell test requirement
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/ipa-alias.ll
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/ipa.ll
Commit eff04f95951749665e541908e60216ecee926fb3 by Vitaly Buka
[NFC][StackSafety] Add index test

This directly covers generateParamAccessSummary
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/ipa.ll
Commit 654266bea9ba1fdd0a8e13029b48ac7043bd7cb4 by Vitaly Buka
[StackSafety] Use getSignedMin() to serialize ranges

Almost NFC as it's important only for full sets which should not
be serialized at all.
The file was modifiedllvm/lib/IR/AsmWriter.cpp
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/ipa.ll
Commit 3a34228bff6fdf45b50cb57cf5fb85d659eeb672 by Vitaly Buka
[StackSafety] Don't keep FullSet in index

Optimization. Missing record is enterpreted as FullSet anyway.
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/ipa.ll