Changes

Summary

  1. [RISCV] Add an extra vsetvli insertion test (details)
  2. [Flang][OpenMP] Initial lowering of the OpenMP worksharing loop (details)
  3. [CostModel][X86] Adjust 128-bit select costs to account for slow BLENDV op (details)
  4. [InstCombine] Fix scalable-vector bitwise select matching (details)
  5. [CostModel][X86] Relax fcmp costs on SSE41 targets or later (details)
  6. [InstCombine] Extract icmp of select transform (NFC) (details)
  7. Fix underlining length; NFC (details)
  8. [MLIR] Fix build with make (details)
  9. [clang][dataflow][NFC] Clarify guarantees on returned vector size for `runDataflowAnalysis`. (details)
  10. [NFC] Fix typo in assert message (details)
  11. [gn build] try to (manually) port 9ef451d1fdaa9a1 (hwasan_symbolize) (details)
  12. [RS4GC] Add support for 'freeze' instruction to findBaseDefiningValue (details)
  13. [compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3 (details)
  14. [clang][X86] Rename some intrinsics tests to use the *-builtins.c naming convention (details)
  15. [SLP][X86] Add test coverage for Issue #51088 (details)
  16. [Support] Fix asan AllocatorTest after ba0d50ad7ec66 (details)
  17. [libc++][P0943] Add stdatomic.h header. (details)
  18. Revert "[HWASan] Clean up hwasan_symbolize." (details)
  19. Revert "[HWASan] Allow to linkify symbolizer output." (details)
  20. [gn build] Port 37ba1b9d1ac7 (details)
  21. [gn build] Port 586efd52b93f (details)
  22. [InstCombine] Add additional icmp of select tests (NFC) (details)
  23. [InstCombine] Fold icmp of select with non-constant operand (details)
  24. [flang] Fix AllocaOp/AllocMemOp type conversion (details)
  25. [clangd] Add parsing for IgnoreHeaders config option (details)
  26. [flang] Support external procedure passed as actual argument with implicit character type (details)
  27. [flang] Add one semantic check for masked array assignment (details)
  28. [clang] createInvocationFromCommandLine -> createInvocation, delete former. NFC (details)
  29. Fix lifetime of DiagnosticsEngine in diagtool. (details)
  30. [clangd] Speed up an unfortunate timer-based test. (details)
Commit 588155aaa72317d536dd017e15d56e23b8dca667 by fraser
[RISCV] Add an extra vsetvli insertion test

This test starts failing with the changes in D125021.
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vsetvli-insert-crossbb.mir
Commit b85c39dd007858aac3edd915d802ff191bd58fe3 by kiran.chandramohan
[Flang][OpenMP] Initial lowering of the OpenMP worksharing loop

The OpenMP worksharing loop operation in the dialect is a proper loop
operation and not a container of a loop. So we have to lower the
parse-tree OpenMP loop construct and the do-loop inside the construct
to a omp.wsloop operation and there should not be a fir.do_loop inside
it. This is achieved by skipping fir.do_loop creation and calling genFIR
for the nested evaluations in the lowering of the do construct.

Note: Handling of more clauses, parallel do, storage of loop index variable etc will come in separate patches.

Part of the upstreaming effort to move LLVM Flang from fir-dev branch of
https://github.com/flang-compiler/f18-llvm-project to the LLVM Project.

Reviewed By: peixin

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

Co-authored-by: Sourabh Singh Tomar <SourabhSingh.Tomar@amd.com>
Co-authored-by: Shraiysh Vaishay <Shraiysh.Vaishay@amd.com>
The file was modifiedflang/lib/Lower/Bridge.cpp
The file was addedflang/test/Lower/OpenMP/omp-wsloop.f90
The file was modifiedflang/lib/Lower/OpenMP.cpp
Commit cbfa85734632ad7f961b18539464e7e870f80fd6 by llvm-dev
[CostModel][X86] Adjust 128-bit select costs to account for slow BLENDV op

Based off the script from D103695 - Jaguar, Bulldozer, Silvermont (et al) and Haswell all have slow BLENDV ops, so adjust the worse case cost values
The file was modifiedllvm/test/Analysis/CostModel/X86/reduce-umax.ll
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.cpp
The file was modifiedllvm/test/Analysis/CostModel/X86/fptoi_sat.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/arith-usat.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/reduce-umin.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/arith-ssat.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/vselect-cost.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/arith-uminmax.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/vector-scalar-select-cost.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/fshl.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/arith-sminmax.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/reduce-smax.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/fshr.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/reduce-smin.ll
Commit bafab9c09f68190d1928a341255d50a7732443ab by fraser
[InstCombine] Fix scalable-vector bitwise select matching

D113035 enhanced the matching of bitwise selects from vector types. This
change unfortunately introduced crashes as it tries to cast scalable
vector types to integers.

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D124997
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
The file was modifiedllvm/test/Transforms/InstCombine/logical-select.ll
Commit 3d107ce2b2f00e723dbce28adc4930484f0e3c49 by llvm-dev
[CostModel][X86] Relax fcmp costs on SSE41 targets or later

Only pre-SSE41 targets double-pump the fp comparison ops
The file was modifiedllvm/test/Analysis/CostModel/X86/fcmp.ll
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.cpp
Commit b457ac42406fbb5d826a321942e99ba4ef860115 by npopov
[InstCombine] Extract icmp of select transform (NFC)

To make it either to extend to the case where the other operand
is not a constant.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineInternal.h
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
Commit 43d8ffeeb1f2ba68e51652ee50da8cf5bf49fdfd by aaron
Fix underlining length; NFC
The file was modifiedclang/docs/ReleaseNotes.rst
Commit 686bd6dd2bf53763b720a1ee60ee01d9054f9434 by npopov
[MLIR] Fix build with make

https://reviews.llvm.org/D124075 causes MLIR to no longer build
when using make rather than ninja, due to a tablegen-generated
header being used before it is created.

It seems that this is related to the use of LLVM_ENABLE_OBJLIB when
using add_tablgen with a non-Ninja/Xcode generator. In that case an
intermediate objlib target is generated.

This patch fixes the issue by a) declaring dependencies in
add_tablegen for mlir-pdll and b) making sure those dependencies
are added to the objlib target.

Differential Revision: https://reviews.llvm.org/D125010
The file was modifiedmlir/tools/mlir-pdll/CMakeLists.txt
The file was modifiedllvm/cmake/modules/AddLLVM.cmake
Commit a45647d82b728a7ccdfe28338bb8a115dee7a735 by yitzhakm
[clang][dataflow][NFC] Clarify guarantees on returned vector size for `runDataflowAnalysis`.

Adjusts the comment to specify that the output vector's size matches the number of CFG blocks.

Differential Revision: https://reviews.llvm.org/D125091
The file was modifiedclang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
Commit e6a7afae0310b2f314b649a56015914f166f442e by mkazantsev
[NFC] Fix typo in assert message
The file was modifiedllvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
Commit 07a83b5564ff88e5b8a0bc3af4021dd22767fc7d by thakis
[gn build] try to (manually) port 9ef451d1fdaa9a1 (hwasan_symbolize)

needed by check-hwasan as of 4af9392e13a212
The file was modifiedllvm/utils/gn/secondary/compiler-rt/test/hwasan/BUILD.gn
The file was addedllvm/utils/gn/secondary/compiler-rt/lib/hwasan/scripts/BUILD.gn
Commit 5a08e81779d0c7968558a6aebb989240c98c93a7 by mkazantsev
[RS4GC] Add support for 'freeze' instruction to findBaseDefiningValue

Because this instruction is a noop, we can simply go through it in
search of the base.
The file was modifiedllvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
The file was addedllvm/test/Transforms/RewriteStatepointsForGC/pr55308.ll
Commit 3902ebdd5793763431264259dfdca871ef453017 by ben.shi
[compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3

Reviewed By: aykevl, dylanmckay

Differential Revision: https://reviews.llvm.org/D125077
The file was modifiedcompiler-rt/lib/builtins/avr/mulhi3.S
The file was modifiedcompiler-rt/lib/builtins/avr/mulqi3.S
The file was modifiedclang/test/Preprocessor/avr-common.c
The file was modifiedclang/lib/Basic/Targets/AVR.cpp
Commit 102824f04893452b6d1602a8d57949844b07bef9 by llvm-dev
[clang][X86] Rename some intrinsics tests to use the *-builtins.c naming convention
The file was removedclang/test/CodeGen/X86/avx512cdintrin.c
The file was addedclang/test/CodeGen/X86/avx512vlvp2intersect-builtins.c
The file was addedclang/test/CodeGen/X86/avx512vp2intersect-builtins.c
The file was addedclang/test/CodeGen/X86/avx512cd-builtins.c
The file was removedclang/test/CodeGen/X86/intel-avx512vlvp2intersect.c
The file was addedclang/test/CodeGen/X86/cldemote-builtins.c
The file was removedclang/test/CodeGen/X86/cldemote.c
The file was addedclang/test/CodeGen/X86/cet-builtins.c
The file was removedclang/test/CodeGen/X86/cetintrin.c
The file was removedclang/test/CodeGen/X86/intel-avx512vp2intersect.c
Commit cbd300f62dded21ba9e417e58e0f65be05324db2 by llvm-dev
[SLP][X86] Add test coverage for Issue #51088
The file was addedllvm/test/Transforms/SLPVectorizer/X86/reduction-transpose.ll
Commit 56ee5d9337fac7fcf9e755e75d85563d84d1b89c by sam.mccall
[Support] Fix asan AllocatorTest after ba0d50ad7ec66

We were counting the number of bytes allocated, but under asan there's
extra redzone bytes by default. Disable this.
The file was modifiedllvm/unittests/Support/AllocatorTest.cpp
Commit 586efd52b93f083d095bf3319da7e42f221c3f4a by Louis Dionne
[libc++][P0943] Add stdatomic.h header.

* https://wg21.link/P0943
* https://eel.is/c++draft/stdatomic.h.syn

This is a re-application of 5d1c1a24, which was reverted in 987c7f407
because it broke the LLDB build.

Co-authored-by: Marek Kurdej <marek.kurdej@gmail.com>

Differential Revision: https://reviews.llvm.org/D97044
The file was modifiedlibcxx/test/libcxx/no_assert_include.compile.pass.cpp
The file was addedlibcxx/test/libcxx/atomics/stdatomic.h.syn/incompatible_with_atomic.verify.cpp
The file was modifiedlibcxx/utils/generate_header_tests.py
The file was modifiedlibcxx/include/atomic
The file was addedlibcxx/include/stdatomic.h
The file was modifiedlibcxx/include/version
The file was modifiedlibcxx/docs/FeatureTestMacroTable.rst
The file was modifiedlibcxx/test/libcxx/nasty_macros.compile.pass.cpp
The file was modifiedlibcxx/include/module.modulemap
The file was addedlibcxx/test/libcxx/atomics/stdatomic.h.syn/dont_hijack_header.compile.pass.cpp
The file was modifiedlibcxx/test/libcxx/clang_tidy.sh.cpp
The file was modifiedlibcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
The file was modifiedlibcxx/utils/generate_feature_test_macro_components.py
The file was addedlibcxx/test/libcxx/atomics/atomics.syn/incompatible_with_stdatomic.verify.cpp
The file was modifiedlibcxx/test/libcxx/double_include.sh.cpp
The file was modifiedlibcxx/docs/Status/Cxx2bPapers.csv
The file was addedlibcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
The file was modifiedlibcxx/test/libcxx/assertions/headers_declare_assertion_handler.sh.cpp
The file was modifiedlibcxx/include/CMakeLists.txt
The file was addedlibcxx/test/std/language.support/support.limits/support.limits.general/stdatomic.h.version.compile.pass.cpp
The file was modifiedlibcxx/test/libcxx/min_max_macros.compile.pass.cpp
Commit f3d31c7f8173624ed436a5754ffeab5952136058 by thakis
Revert "[HWASan] Clean up hwasan_symbolize."

This reverts commit 6ca1df61d29c1c46d8d6f51a1091a7651c8b1ab1.
Prerequisite for reverting 4af9392e13a212fe295dc.
The file was modifiedcompiler-rt/lib/hwasan/scripts/hwasan_symbolize
Commit c9faea04b1f8ef658ee5367ba8f00266b2051263 by thakis
Revert "[HWASan] Allow to linkify symbolizer output."

This reverts commit 4af9392e13a212fe295dc33455bc591b2dc8f859.
The new test fails on several machines (including some bots),
see https://reviews.llvm.org/D124950
The file was removedcompiler-rt/test/hwasan/TestCases/hwasan_symbolize.cpp
The file was modifiedcompiler-rt/lib/hwasan/scripts/hwasan_symbolize
Commit 6d74721a0787af977319e66328788803a7d1dc07 by llvmgnsyncbot
[gn build] Port 37ba1b9d1ac7
The file was modifiedllvm/utils/gn/secondary/libcxx/include/BUILD.gn
Commit 1df36d56163716c4827f975003bf10b4c306271f by llvmgnsyncbot
[gn build] Port 586efd52b93f
The file was modifiedllvm/utils/gn/secondary/libcxx/include/BUILD.gn
Commit d7b6fd47b223c3b5243973188a8598b1eecb1046 by npopov
[InstCombine] Add additional icmp of select tests (NFC)
The file was addedllvm/test/Transforms/InstCombine/icmp-select.ll
Commit 0863abe3ac47c281fdd35dc87d83c495cf741da0 by npopov
[InstCombine] Fold icmp of select with non-constant operand

Try to push an icmp into a select even if the icmp operand isn't
constant - perform a generic SimplifyICmpInst instead.

This doesn't appear to impact compile-time much, and forming
logical and/or is generally profitable, as we have very good
support for them.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
The file was modifiedllvm/test/Transforms/InstCombine/shift.ll
The file was modifiedllvm/test/Transforms/InstCombine/icmp-select.ll
Commit ac0f4c8f362e819316ca152315e930f4e6515e9d by qiaopeixin
[flang] Fix AllocaOp/AllocMemOp type conversion

For arrays without a constant interior or arrays of character with
dynamic length arrays, the data types are converted to a pointer to the
element type, so the scale size of the constant extents needs to be
counted. The previous AllocaOp conversion does not consider the arrays
of character with dynamic length arrays, and the previous AllocMemOp
conversion does not consider arrays without a constant interior. This
fixes them and refactors the code so that it can be shared. Also add
the test cases.

Reviewed By: Jean Perier

Differential Revision: https://reviews.llvm.org/D124766
The file was modifiedflang/test/Fir/convert-to-llvm.fir
The file was modifiedflang/test/Fir/alloc.fir
The file was modifiedflang/lib/Optimizer/CodeGen/CodeGen.cpp
Commit 9fe89a1f0fa6d88aa4786580b89e81dc906fcc52 by kadircet
[clangd] Add parsing for IgnoreHeaders config option
The file was modifiedclang-tools-extra/clangd/ConfigYAML.cpp
The file was modifiedclang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp
Commit ffc7f9d542370eb72ad1f4bf79f763ca685bab8b by qiaopeixin
[flang] Support external procedure passed as actual argument with implicit character type

As Fortran 2018 15.5.2.9 point 2, the actual argument and dummy argument
have the same type and type parameters and an external function with
assumed character length may be associated with a dummy argument with
explicit character length. As Fortran 2018 15.5.2.9 point 7, if an
external procedure is used as an actual argument, it can be explicitly
declared to have the EXTERNAL attribute. This supports the external
procedure passed as actual argument with implicit character type, either
explicit character length or assumed character length.

Reviewed By: Jean Perier, klausler

Differential Revision: https://reviews.llvm.org/D124345
The file was addedflang/test/Lower/ext-proc-as-actual-argument-1.f90
The file was modifiedflang/include/flang/Optimizer/Builder/Character.h
The file was addedflang/test/Lower/ext-proc-as-actual-argument-2.f90
The file was modifiedflang/lib/Optimizer/Builder/Character.cpp
Commit 2472b6869a6eeb198a4e982fd7c3ffc89dd4f6f5 by qiaopeixin
[flang] Add one semantic check for masked array assignment

As Fortran 2018 states, in each where-assignment-stmt, the mask-expr and
the variable being defined shall be arrays of the same shape. The
previous check does not consider checking if it is an array.

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D125022
The file was modifiedflang/test/Semantics/assign01.f90
The file was modifiedflang/lib/Semantics/assignment.cpp
The file was modifiedflang/test/Semantics/assign04.f90
Commit 499d0b96cb52c828e7fc4d58825b5e8b3f9931c5 by sam.mccall
[clang] createInvocationFromCommandLine -> createInvocation, delete former. NFC

(Followup from 40c13720a4b977d4347bbde53c52a4d0703823c2)

Differential Revision: https://reviews.llvm.org/D125012
The file was modifiedclang/lib/Frontend/CreateInvocationFromCommandLine.cpp
The file was modifiedclang/unittests/Serialization/ModuleCacheTest.cpp
The file was modifiedclang/tools/diagtool/ShowEnabledWarnings.cpp
The file was modifiedclang/tools/c-index-test/core_main.cpp
The file was modifiedclang/unittests/Frontend/CompilerInstanceTest.cpp
The file was modifiedclang/lib/Frontend/ASTUnit.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
The file was modifiedclang/unittests/Tooling/Syntax/TokensTest.cpp
The file was modifiedclang/include/clang/Frontend/Utils.h
The file was modifiedclang/unittests/Tooling/Syntax/TreeTestBase.cpp
The file was modifiedclang/tools/libclang/Indexing.cpp
The file was modifiedclang/unittests/Frontend/ASTUnitTest.cpp
Commit d2405e1da5b6ee8d6568469610071d86414cdc93 by sam.mccall
Fix lifetime of DiagnosticsEngine in diagtool.
The file was modifiedclang/tools/diagtool/ShowEnabledWarnings.cpp
Commit 076dd0a763fd803897b0f806e0e350a27d2c087c by sam.mccall
[clangd] Speed up an unfortunate timer-based test.
The file was modifiedclang-tools-extra/clangd/unittests/TUSchedulerTests.cpp