SuccessChanges

Summary

  1. [InstSimplify] Cleanup out-of-range shift amount handling. (details)
  2. [flang] Add -J and -module-dir to f18 driver (details)
  3. [ConstraintElimination] Add initial ICMP_NE test cases. (details)
  4. [lld-macho] Fix cpuSubtype for non-x86_64 archs (details)
  5. [lld-macho] Clean up comments (details)
  6. Improve diagnostic for ignored GNU 'used' attribute (details)
  7. [JumpThreading] Clone noalias.scope.decl when threading blocks (details)
  8. [clang] Tweaked fixit for static assert with no message (details)
  9. [MemCpyOpt] Fix handling of readnone byval arguments (details)
  10. [sanitizers] Pass CMAKE_C_FLAGS into TSan buildgo script (details)
  11. [MLIR][affine] Prevent fusion when ops with memory effect free are present between producer and consumer (details)
  12. [RISCV] Custom isel the rest of the vector load/store intrinsics. (details)
  13. [ConstraintElimination] Use unsigned > 0 instead of != 0. (details)
  14. Making FindCommonBlock a const member (details)
  15. [AArch64][GlobalISel] Emit G_ASSERT_SEXT for SExt parameters in CallLowering (details)
  16. [llvm][Bitcode] Add bitcode reader/writer for DSOLocalEquivalent (details)
  17. [KnownBits] Pull out repeated getMinValue() calls from shift analysis. NFCI. (details)
Commit 476ff0327b7a97af50a15c7a8c3e0a6513627a8e by llvm-dev
[InstSimplify] Cleanup out-of-range shift amount handling.

Use APInt::uge() direct instead of getLimitedValue().

Use KnownBits::getMinValue() to make the bounds check more obvious.
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit 8720ec6b9a288b686089c5137dda64001a7a9f38 by tkeith
[flang] Add -J and -module-dir to f18 driver

Add -J to the f18 driver for compatibility with gfortran.
Add -module-dir for compatibility with the new flang driver.

They both set the output directory for .mod files and add the
directory to the search list. -module still only does the former.

Clean up the new driver test to match.

Differential Revision: https://reviews.llvm.org/D97164
The file was modifiedflang/tools/f18/f18.cpp
The file was addedflang/test/Driver/write-module.f90
The file was modifiedflang/test/Flang-Driver/write-module.f90
Commit 784c70d704d3147ec12181f1304971b44443850b by flo
[ConstraintElimination] Add initial ICMP_NE test cases.
The file was addedllvm/test/Transforms/ConstraintElimination/ne.ll
Commit 5bfdbdeb408a966fd882f20c6fa79f6b5eb12990 by jezng
[lld-macho] Fix cpuSubtype for non-x86_64 archs

dyld on iOS will complain if the LIB64 bit is set.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D96565
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was addedlld/test/MachO/header.s
Commit 8c4638c3676ef8071a4aba2070da09abe8fe3244 by jezng
[lld-macho] Clean up comments
The file was modifiedlld/MachO/SyntheticSections.cpp
Commit bccdf6b232f67aa4e91f18d49700308f2815ca09 by i
Improve diagnostic for ignored GNU 'used' attribute

Differential Revision: https://reviews.llvm.org/D97161
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/test/Sema/attr-used.c
The file was modifiedclang/test/SemaCXX/attr-used.cpp
The file was modifiedclang/lib/Sema/SemaDecl.cpp
Commit 5e7e499b912d2c9ebaa91b5783ca123dbedeabcc by nikita.ppv
[JumpThreading] Clone noalias.scope.decl when threading blocks

When cloning instructions during jump threading, also clone and
adapt any declared scopes. This is primarily important when
threading loop exits, because we'll end up with two dominating
scope declarations in that case (at least after additional loop
rotation). This addresses a loose thread from
https://reviews.llvm.org/rG2556b413a7b8#975012.

Differential Revision: https://reviews.llvm.org/D97154
The file was addedllvm/test/Transforms/JumpThreading/noalias-scope-decl.ll
The file was modifiedllvm/include/llvm/Transforms/Utils/Cloning.h
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp
The file was modifiedllvm/lib/Transforms/Utils/CloneFunction.cpp
Commit 5616c5b8664b54671e699e5c45178f11cbb680b3 by n.james93
[clang] Tweaked fixit for static assert with no message

If a static assert has a message as the right side of an and condition, suggest a fix it of replacing the '&&' to ','.

`static_assert(cond && "Failed Cond")` -> `static_assert(cond, "Failed cond")`

This use case comes up when lazily replacing asserts with static asserts.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D89065
The file was modifiedclang/lib/Parse/ParseDeclCXX.cpp
The file was addedclang/test/FixIt/fixit-static-assert.cpp
Commit 4125afc35723b490556f7a38f7835f0914f70292 by nikita.ppv
[MemCpyOpt] Fix handling of readnone byval arguments

If the call is readnone, then there may not be any MemoryAccess
associated with the call. Bail out in that case.

This fixes the issue reported at
https://reviews.llvm.org/D94376#2578312.
The file was addedllvm/test/Transforms/MemCpyOpt/byval-readnone.ll
The file was modifiedllvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
Commit ed4230732adeb04a23fc25b7a5924e423ba5ac91 by protze
[sanitizers] Pass CMAKE_C_FLAGS into TSan buildgo script

When compiling with ccache, compiler commands get split into smaller steps
and clang's default -Wunused-command-line-argument complains about unused
include directory arguments. In combination -Werror, compilation aborts.

If CMAKE_C_FLAGS contains -Wno-unused-command-line-argument or
-Wno-error=unused-command-line-argument, the latter flag is passed into the
build script.

This is a re-commit. The previous version was reverted because of failing
tests.

Differential Revision: https://reviews.llvm.org/D96762
The file was modifiedcompiler-rt/lib/tsan/CMakeLists.txt
The file was modifiedcompiler-rt/lib/tsan/go/buildgo.sh
Commit 15332982c3d8d1c9e8bd7ae9f76f22f77adb51ee by uday
[MLIR][affine] Prevent fusion when ops with memory effect free are present between producer and consumer

This commit fixes a bug in affine fusion pipeline where an
incorrect fusion is performed despite a dealloc op is present
between a producer and a consumer. This is done by creating a
node for dealloc op in the MDG.

Reviewed By: bondhugula, dcaballe

Differential Revision: https://reviews.llvm.org/D97032
The file was modifiedmlir/test/Transforms/loop-fusion.mlir
The file was modifiedmlir/lib/Transforms/LoopFusion.cpp
Commit 1aeb927fedbeee328913ba085bb8860fbafaa1b1 by craig.topper
[RISCV] Custom isel the rest of the vector load/store intrinsics.

A previous patch moved the index versions. This moves the rest.
I also removed the custom lowering for VLEFF since we can now
do everything directly in the isel handling.

I had to update getLMUL to handle mask registers to index the
pseudo table correctly for VLE1/VSE1.

This is good for another 15K reduction in llc size.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D97097
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
Commit 95daec6a8497dae8fe359b8b2b363e28cb3cff23 by flo
[ConstraintElimination] Use unsigned > 0 instead of != 0.

ICMP_NE predicates cannot be directly represented as constraint. But we
can use ICMP_UGT instead ICMP_NE for %x != 0.

See https://alive2.llvm.org/ce/z/XlLCsW
The file was modifiedllvm/lib/Transforms/Scalar/ConstraintElimination.cpp
The file was modifiedllvm/test/Transforms/ConstraintElimination/ne.ll
Commit 7d1397f7ad4bbdad56468d5a4c7a77fa4c553936 by rkauffmann
Making FindCommonBlock a const member
https://reviews.llvm.org/D97093
The file was modifiedflang/lib/Semantics/scope.cpp
The file was modifiedflang/include/flang/Semantics/scope.h
Commit 95d13c01ecba5c9dba8ea1bd875c4179cbaea9e2 by Jessica Paquette
[AArch64][GlobalISel] Emit G_ASSERT_SEXT for SExt parameters in CallLowering

Similar to how we emit G_ASSERT_ZEXT when we have CCValAssign::LocInfo::ZExt.

This will allow us to combine away some redundant sign extends.

Example: https://godbolt.org/z/cTbKvr

Differential Revision: https://reviews.llvm.org/D96915
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/call-translator-ios.ll
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/call-lowering-signext.ll
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
Commit 1c932baeaafbd4c9051ed4836f320db9003f4068 by leonardchan
[llvm][Bitcode] Add bitcode reader/writer for DSOLocalEquivalent

This is necessary for compilation with [thin]lto.

Differential Revision: https://reviews.llvm.org/D96170
The file was modifiedllvm/include/llvm/Bitcode/LLVMBitCodes.h
The file was addedllvm/test/Bitcode/dso_local_equivalent.ll
The file was modifiedllvm/lib/Bitcode/Reader/BitcodeReader.cpp
The file was modifiedllvm/lib/Bitcode/Writer/BitcodeWriter.cpp
The file was modifiedllvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
Commit bb20cf2f1c7ad6ef8a6ab0bc5ca5ea7db4b2282d by llvm-dev
[KnownBits] Pull out repeated getMinValue() calls from shift analysis. NFCI.
The file was modifiedllvm/lib/Support/KnownBits.cpp