LLVM/project 5f76369libc/test/src/math/smoke FmaTest.h, utils/bazel/llvm-project-overlay/libc/test/src/math/smoke BUILD.bazel

[libc][math] Update test/src/math/smoke/FmaTest.h to not rely on compiler runtime. (#159503)

DeltaFile
+18-20utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+1-2libc/test/src/math/smoke/FmaTest.h
+19-222 files

LLVM/project 5e1b416clang-tools-extra/clang-tidy/abseil DurationRewriter.cpp

[clang-tidy][NFC] Construct map at compile time (#158166)

The important part of this PR is the changes to
`getDurationInverseForScale`. I changed the other `get*ForScale`
functions so that they all follow the same pattern, but those aren't as
important.
DeltaFile
+29-77clang-tools-extra/clang-tidy/abseil/DurationRewriter.cpp
+29-771 files

LLVM/project bc91e81llvm/benchmarks CMakeLists.txt

benchmarks: Skip runtime libcalls benchmark for llvm-driver build

Apparently if you enable LLVM_TOOL_LLVM_DRIVER_BUILD, many individual
tool binaries are not built and instead create object targets which
are linked into an llvm-driver tool which you need to use instead.
In principle we could reconstruct this command with llvm-driver, but
I can't get a build to complete when I turn this on as a standalone
option.
DeltaFile
+22-16llvm/benchmarks/CMakeLists.txt
+22-161 files

LLVM/project ac2b51eclang/lib/Serialization ASTWriter.cpp, clang/test/Modules pr159424.cppm pr133720.cppm

[C++20] [Modules] Fix issues with non-exported in-class friend declarations

Close https://github.com/llvm/llvm-project/issues/159424
Close https://github.com/llvm/llvm-project/issues/133720

For in-class friend declaration, it is hard for the serializer to decide
if they are visible to other modules. But luckily, Sema can handle it
perfectly enough. So it is fine to make all of the in-class friend
declaration as generally visible in ASTWriter and let the Sema to make
the final call. This is safe as long as the corresponding class's
visibility are correct.
DeltaFile
+36-0clang/test/Modules/pr159424.cppm
+31-0clang/test/Modules/pr133720.cppm
+11-3clang/lib/Serialization/ASTWriter.cpp
+78-33 files

LLVM/project 4663d25llvm/lib/Transforms/Scalar LoopPassManager.cpp, llvm/test/Other loop-pm-invalidation.ll

[NewPM] Don't preserve BlockFrequencyInfo in FunctionToLoopPassAdaptor (#157888)

Function analyses in LoopStandardAnalysisResults are marked as preserved
by the loop pass adaptor, because LoopAnalysisManagerFunctionProxy
manually invalidates most of them.

However the proxy doesn't invalidate BFI, since it is only preserved on
a "lossy" basis: see https://reviews.llvm.org/D86156 and
https://reviews.llvm.org/D110438.

So any changes to the CFG will result in BFI giving incorrect results,
which is fine for loop passes which deal with the lossiness.

But the loop pass adapator still marks it as preserved, which causes the
lossy result to leak out into function passes.

This causes incorrect results when viewed from e.g. LoopVectorizer,
where an innermost loop header may be reported to have a smaller
frequency than its successors.

    [7 lines not shown]
DeltaFile
+30-0llvm/test/Other/loop-pm-invalidation.ll
+0-4llvm/lib/Transforms/Scalar/LoopPassManager.cpp
+30-42 files

LLVM/project fc722d5clang/include/clang/Basic BuiltinsLoongArchLASX.def, clang/lib/Basic/Targets LoongArch.cpp

[clang][LoongArch] Introduce LASX and LSX conversion intrinsics

This patch introduces the LASX and LSX conversion intrinsics:

- __m256 __lasx_cast_128_s (__m128)
- __m256d __lasx_cast_128_d (__m128d)
- __m256i __lasx_cast_128 (__m128i)
- __m256 __lasx_concat_128_s (__m128, __m128)
- __m256d __lasx_concat_128_d (__m128, __m128d)
- __m256i __lasx_concat_128 (__m128, __m128i)
- __m128 __lasx_extract_128_lo_s (__m256)
- __m128d __lasx_extract_128_lo_d (__m256d)
- __m128i __lasx_extract_128_lo (__m256i)
- __m128 __lasx_extract_128_hi_s (__m256)
- __m128d __lasx_extract_128_hi_d (__m256d)
- __m128i __lasx_extract_128_hi (__m256i)
- __m256 __lasx_insert_128_lo_s (__m256, __m128)
- __m256d __lasx_insert_128_lo_d (__m256d, __m128d)
- __m256i __lasx_insert_128_lo (__m256i, __m128i)

    [3 lines not shown]
DeltaFile
+157-0clang/test/CodeGen/LoongArch/lasx/builtin.c
+153-0clang/test/CodeGen/LoongArch/lasx/builtin-alias.c
+113-0clang/lib/Headers/lasxintrin.h
+19-0clang/include/clang/Basic/BuiltinsLoongArchLASX.def
+3-0clang/test/Preprocessor/init-loongarch.c
+1-0clang/lib/Basic/Targets/LoongArch.cpp
+446-06 files

LLVM/project b6e440butils/bazel/llvm-project-overlay/libc BUILD.bazel, utils/bazel/llvm-project-overlay/libc/test/src/math/smoke BUILD.bazel

[libc][bazel] Add BUILD rules for fma and fmaf functions. (#159502)

This change adds the capability to build fma/fmaf with Bazel (fmal,
fmaf128 variants are not implemented yet), and run smoke tests.

BUILD rules for regular MPFR-based tests will be added later, since they
require support for building rand/srand as well, which is missing in
Bazel for now.
DeltaFile
+13-1utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+9-1utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+22-22 files

LLVM/project aceb318llvm/include/llvm/IR IntrinsicsLoongArch.td, llvm/lib/Target/LoongArch LoongArchLASXInstrInfo.td LoongArchISelLowering.cpp

[llvm][LoongArch] Introduce LASX and LSX conversion intrinsics

This patch introduces the LASX and LSX conversion intrinsics:

- <8 x float> @llvm.loongarch.lasx.cast.128.s(<4 x float>)
- <4 x double> @llvm.loongarch.lasx.cast.128.d(<2 x double>)
- <4 x i64> @llvm.loongarch.lasx.cast.128(<2 x i64>)
- <8 x float> @llvm.loongarch.lasx.concat.128.s(<4 x float>, <4 x float>)
- <4 x double> @llvm.loongarch.lasx.concat.128.d(<2 x double>, <2 x double>)
- <4 x i64> @llvm.loongarch.lasx.concat.128(<2 x i64>, <2 x i64>)
- <4 x float> @llvm.loongarch.lasx.extract.128.lo.s(<8 x float>)
- <2 x double> @llvm.loongarch.lasx.extract.128.lo.d(<4 x double>)
- <2 x i64> @llvm.loongarch.lasx.extract.128.lo(<4 x i64>)
- <4 x float> @llvm.loongarch.lasx.extract.128.hi.s(<8 x float>)
- <2 x double> @llvm.loongarch.lasx.extract.128.hi.d(<4 x double>)
- <2 x i64> @llvm.loongarch.lasx.extract.128.hi(<4 x i64>)
- <8 x float> @llvm.loongarch.lasx.insert.128.lo.s(<8 x float>, <4 x float>)
- <4 x double> @llvm.loongarch.lasx.insert.128.lo.d(<4 x double>, <2 x double>)
- <4 x i64> @llvm.loongarch.lasx.insert.128.lo(<4 x i64>, <2 x i64>)

    [3 lines not shown]
DeltaFile
+234-0llvm/test/CodeGen/LoongArch/lasx/intrinsic-conversion.ll
+38-0llvm/include/llvm/IR/IntrinsicsLoongArch.td
+31-0llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td
+5-0llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+308-04 files

LLVM/project 8548fa0llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV/rvv fixed-vectors-reduction-formation.ll

[RISCV] Match fmaxnum and fminnum to reduction ops. (#159244)

This patch tries to match fmaxnum and fminnum to vector reductions.
DeltaFile
+30-0llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-formation.ll
+20-7llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+50-72 files

LLVM/project 27f8f9ellvm/lib/Target/RISCV RISCVInstrInfo.cpp RISCVInstrInfoZibi.td, llvm/test/CodeGen/RISCV zibi.ll

[RISCV][CodeGen] Add CodeGen support of Zibi experimental extension (#146858)

This adds the CodeGen support of Zibi v0.1 experimental extension, which
depends on #127463.
DeltaFile
+442-0llvm/test/CodeGen/RISCV/zibi.ll
+23-0llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+21-0llvm/lib/Target/RISCV/RISCVInstrInfoZibi.td
+1-0llvm/lib/Target/RISCV/RISCVInstrPredicates.td
+1-0llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+488-05 files

LLVM/project e03a7c1llvm/lib/Transforms/InstCombine InstCombineAndOrXor.cpp, llvm/test/Transforms/InstCombine and-or-icmps.ll icmp-range.ll

[InstCombine] Generalize `foldAndOrOfICmpsUsingRanges` to handle more cases. (#158498)

Closes https://github.com/llvm/llvm-project/issues/158326.
Closes https://github.com/llvm/llvm-project/issues/59555.

Proof for `(X & -Pow2) == C -> (X - C) < Pow2`:
https://alive2.llvm.org/ce/z/HMgkuu
DeltaFile
+40-59llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+42-7llvm/test/Transforms/InstCombine/and-or-icmps.ll
+1-4llvm/test/Transforms/InstCombine/icmp-range.ll
+83-703 files

LLVM/project c78239ellvm/benchmarks CMakeLists.txt

Reapply "RuntimeLibcalls: Use get_host_tool_path for executables used … (#159488) (#159489)

This reverts commit 44b7abcc75b005ab87e11e2beac155bf0b155992.

Add additional if TARGET checks
DeltaFile
+20-0llvm/benchmarks/CMakeLists.txt
+20-01 files

LLVM/project 1a172b9llvm/include/llvm/CodeGen/GlobalISel LegalizerHelper.h, llvm/lib/CodeGen/GlobalISel LegalizerHelper.cpp

[RISCV][GISel] Lower G_SSUBE (#157855)

### Summary
Try to implemente Lower G_SSUBE in LegalizerHelper::lower
DeltaFile
+220-0llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-ssube-rv64.mir
+180-0llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-ssube-rv32.mir
+23-0llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+4-3llvm/test/CodeGen/RISCV/GlobalISel/legalizer-info-validation.mir
+1-1llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
+1-0llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
+429-46 files

LLVM/project 7ca448ellvm/include/llvm/CodeGen MachineOperand.h, llvm/lib/CodeGen MachineOperand.cpp

[LoongArch] Fix MergeBaseOffset for constant pool index operand (#159336)

Fixes #159200
DeltaFile
+38-0llvm/test/CodeGen/LoongArch/inline-asm-constraint-m.ll
+13-0llvm/lib/CodeGen/MachineOperand.cpp
+4-0llvm/lib/Target/LoongArch/LoongArchMergeBaseOffset.cpp
+3-0llvm/include/llvm/CodeGen/MachineOperand.h
+1-1llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp
+59-15 files

LLVM/project 9be83eellvm/test/CodeGen/AMDGPU llvm.amdgcn.mfma.scale.f32.32x32x64.f8f6f4.ll llvm.amdgcn.smfmac.gfx950.ll

AMDGPU: Select VGPR MFMAs by default

AGPRs are undesirable since they are only usable by a
handful instructions like loads, stores and mfmas and everything
else requires copies to/from VGPRs. Using the AGPR form should be
a measure of last resort if we must use more than 256 VGPRs.
DeltaFile
+2,436-4,283llvm/test/CodeGen/AMDGPU/llvm.amdgcn.mfma.scale.f32.32x32x64.f8f6f4.ll
+2,931-2llvm/test/CodeGen/AMDGPU/llvm.amdgcn.smfmac.gfx950.ll
+1,006-1,115llvm/test/CodeGen/AMDGPU/llvm.amdgcn.mfma.ll
+952-1,158llvm/test/CodeGen/AMDGPU/mfma-loop.ll
+540-740llvm/test/CodeGen/AMDGPU/llvm.amdgcn.mfma.gfx942.ll
+168-1,050llvm/test/CodeGen/AMDGPU/llvm.amdgcn.mfma.scale.f32.16x16x128.f8f6f4.ll
+8,033-8,34822 files not shown
+11,189-10,93428 files

LLVM/project 91c72e8flang/include/flang/Support Fortran-features.h, flang/lib/Semantics resolve-names.cpp

[flang] Add a warning for CDEFINED declarations that have initializers (#159456)

CDEFINED declarations are similar to "extern" declarations in C. If they
have initializers, this could lead to linker errors. clang warns about
"extern" declarations with initializers. Add similar warning to flang:
```
$ flang -c cdefined.f90 -pedantic
./cdefined.f90:3:57: warning: CDEFINED variable should not have an initializer [-Wcdefined-init]
    integer(c_int), bind(C, name='c_global', CDEFINED) :: c  = 4
                                                          ^
```
DeltaFile
+6-0flang/test/Semantics/cdefined.f90
+3-0flang/lib/Semantics/resolve-names.cpp
+1-1flang/include/flang/Support/Fortran-features.h
+10-13 files

LLVM/project 8c778b6llvm/test/CodeGen/AMDGPU mfma-loop.ll

AMDGPU: Add more mfma loop test cases

Test cases where the exit uses must be VGPRs,
and don't happen to be a store that could use AGPRs.
DeltaFile
+517-0llvm/test/CodeGen/AMDGPU/mfma-loop.ll
+517-01 files

LLVM/project 24b7e3dllvm/lib/Target/AMDGPU SIInstrInfo.cpp

AMDGPU: Remove unnecessary AGPR legalize logic

The manual legalizeOperands code only need to consider cases that
require full instruction context to know if the operand is legal.
This does not need to handle basic operand register class constraints.
DeltaFile
+0-13llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+0-131 files

LLVM/project 4229875llvm/lib/Target/Mips MipsExpandPseudo.cpp, llvm/test/CodeGen/Mips atomic-min-max.ll

Revert "[Mips] Fix atomic min/max generate mips4 instructions when compiling …"

This reverts commit b7f68cb08ca6e6d4a935640e8065d54b1590d144.
DeltaFile
+0-521llvm/test/CodeGen/Mips/atomic-min-max.ll
+25-188llvm/lib/Target/Mips/MipsExpandPseudo.cpp
+25-7092 files

LLVM/project c8e6457clang-tools-extra/clang-doc Serialize.cpp, clang-tools-extra/test/clang-doc long-name.cpp

[clang-doc] concatenate SymbolIDs to truncated mangled names

Previously, if mangled names were too long to be used as filenames, the
object's SymbolID was used as a filename. This worked for length
restrictions, but made URLs/filenames inconsistent. This patch truncates
the mangled name and appends the SymbolID. Thus, we can keep some
context in the URL/filename while preserving uniqueness.
DeltaFile
+4-6clang-tools-extra/clang-doc/Serialize.cpp
+2-2clang-tools-extra/test/clang-doc/long-name.cpp
+6-82 files

LLVM/project b7c546fllvm/cmake config-ix.cmake

Use try_compile tests to get sizeof(uintptr_t)
DeltaFile
+15-16llvm/cmake/config-ix.cmake
+15-161 files

LLVM/project 04bd0edllvm/cmake config-ix.cmake, llvm/include/llvm/Config llvm-config.h.cmake

Add LLVM_NATIVE_ARCH_SIZEOF_UINTPTR_T
DeltaFile
+19-1llvm/cmake/config-ix.cmake
+3-2llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
+3-0llvm/include/llvm/Config/llvm-config.h.cmake
+25-33 files

LLVM/project 48076d4llvm/include/llvm/IR RuntimeLibcalls.h, llvm/utils/TableGen/Basic RuntimeLibcallsEmitter.cpp

Use Bitset
DeltaFile
+5-46llvm/include/llvm/IR/RuntimeLibcalls.h
+6-4llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
+11-502 files

LLVM/project 601ec04llvm/include/llvm/IR RuntimeLibcalls.h, llvm/test/TableGen RuntimeLibcallEmitter.td RuntimeLibcallEmitter-calling-conv.td

RuntimeLibcalls: Add bitset for available libcalls

This is a step towards separating the set of available libcalls
from the lowering decision of which call to use. Libcall recognition
now directly checks availability instead of indirectly checking through
the lowering table.
DeltaFile
+64-0llvm/include/llvm/IR/RuntimeLibcalls.h
+32-4llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
+22-2llvm/test/TableGen/RuntimeLibcallEmitter.td
+15-0llvm/test/TableGen/RuntimeLibcallEmitter-calling-conv.td
+15-0llvm/test/TableGen/RuntimeLibcallEmitter-conflict-warning.td
+148-65 files

LLVM/project 1ff0932llvm/benchmarks CMakeLists.txt

Reapply "RuntimeLibcalls: Use get_host_tool_path for executables used … (#159488)

This reverts commit 44b7abcc75b005ab87e11e2beac155bf0b155992.

Add additional if TARGET checks
DeltaFile
+20-0llvm/benchmarks/CMakeLists.txt
+20-01 files

LLVM/project 44b7abcllvm/benchmarks CMakeLists.txt

Revert "RuntimeLibcalls: Use get_host_tool_path for executables used … (#159488)

…in benchmark (#153955)"

This reverts commit f3c9c6c0c51880109b39411be4e6d742c16210d1.

Fails fuschia bot.
DeltaFile
+0-19llvm/benchmarks/CMakeLists.txt
+0-191 files

LLVM/project 43ec53bclang/lib/Sema HeuristicResolver.cpp, clang/unittests/Sema HeuristicResolverTest.cpp

[clang][HeuristicResolver] Default argument heuristic for template template parameters (#156404)

Fixes https://github.com/clangd/clangd/issues/2478
DeltaFile
+19-0clang/lib/Sema/HeuristicResolver.cpp
+18-0clang/unittests/Sema/HeuristicResolverTest.cpp
+37-02 files

LLVM/project f3c9c6cllvm/benchmarks CMakeLists.txt

RuntimeLibcalls: Use get_host_tool_path for executables used in benchmark (#153955)

Copied from what the llvm-shlib build is doing.

This reverts commit 0b1b567d9f84e67124c58d69b5aa375357d68c9e.
DeltaFile
+19-0llvm/benchmarks/CMakeLists.txt
+19-01 files

LLVM/project 38f2a1cllvm/test/CodeGen/RISCV/GlobalISel/legalizer legalize-uadde-rv64.mir legalize-uadde-rv32.mir

[RISCV][GISel] Test legalizing s64 G_UADDE on RV32. And s128 on RV64. NFC (#159412)

DeltaFile
+40-26llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-uadde-rv64.mir
+37-26llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-uadde-rv32.mir
+77-522 files

LLVM/project aa8b624llvm/lib/Target/AMDGPU SIInstrInfo.cpp

AMDGPU: Remove unnecessary operand legalization for WMMAs (#159370)

The operand constraints already express this constraint, and
InstrEmitter will respect them.
DeltaFile
+0-15llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+0-151 files