LLVM/project 5e79d97llvm/test/tools/llc mattr-mcpu-help.ll mtune.ll, llvm/tools/llc llc.cpp

[llc] Fix -mcpu=help for default target triple (#187878)

Previously, a command like `llc -mcpu=help` would fail on invalid target
triple, due to wrongly passing empty target to `Triple::normalize`
resulting in `unknown`.
DeltaFile
+7-8llvm/test/tools/llc/mattr-mcpu-help.ll
+3-5llvm/test/tools/llc/mtune.ll
+4-3llvm/tools/llc/llc.cpp
+14-163 files

LLVM/project 7617797llvm/test/tools/opt mattr-mcpu-help.ll, llvm/tools/opt optdriver.cpp

[opt] Enable -mcpu=help without an input file (#187876)

This patch enables `-mcpu=help` or `-mattr=help` invocation without an
input file, like `llc`. For example, the following command `opt
-mtriple=aarch64 -mattr=help` would previously hang but now it succeeds.

The implementation is similar to llc, creating a target machine for help
printing side effects and existing early. Note: llc has a bug in the
default triple handling that we already fix here upfront. Ill submit a
separate fix for llc.
DeltaFile
+34-0llvm/test/tools/opt/mattr-mcpu-help.ll
+27-0llvm/tools/opt/optdriver.cpp
+61-02 files

LLVM/project 96fb294compiler-rt/test/asan/TestCases disable_container_overflow_checks.cpp stack_container_dynamic_lib.cpp

[ASan] Enable __SANITIZER_DISABLE_CONTAINER_OVERFLOW__ tests (#181721)

Now that the corresponding libcxx change has landed, these tests should
be passing on some platforms.

This patch re-enables them for all platforms, so that we can see which
bots these do not work on and mark them unsupported accordingly.

rdar://167946476
DeltaFile
+0-2compiler-rt/test/asan/TestCases/disable_container_overflow_checks.cpp
+0-2compiler-rt/test/asan/TestCases/stack_container_dynamic_lib.cpp
+0-42 files

LLVM/project d607d6fllvm/lib/CodeGen/SelectionDAG LegalizeIntegerTypes.cpp, llvm/test/CodeGen/AArch64 cls.ll pr61549.ll

[LegalizeTypes] Keep non-negative info in SUB(CTLZ) (#186338)

When legalizing CTLZ for a wider type with a SUB bit-width compensation,
the result for a zero-defined case can have an extra bit that exceeds
the maximum value of the original type width. Unlike CTLS, which covers
all bits within its type width, CTLZ leads to producing undefined
KnownBits. So, after subtraction, the KnownBits could represent a
negative value, which prevents subsequent optimizations.

This patch ensures that non-negative information is preserved during the
SUB(CTLZ) expansion, so that KnownBits after SUB will take a stricter
range within the type width, thus allowing further combine optimizations
following by SUB. Particularly, this enables the DAG Combiner to remove
unnecessary AND instructions for CTLZ output type conversion.

Fixes #136516

---------

Co-authored-by: Simon Pilgrim <git at redking.me.uk>
DeltaFile
+44-0llvm/test/CodeGen/AArch64/cls.ll
+4-4llvm/test/CodeGen/VE/Scalar/ctlz.ll
+6-2llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+2-2llvm/test/CodeGen/AArch64/pr61549.ll
+56-84 files

LLVM/project b929f2flibclc/clc/include/clc/math gentype.inc, libclc/clc/include/clc/relational binary_decl.inc unary_decl.inc

[libclc][NFC] Remove __CLC_BIT_INTN macro (#188023)

This macro was originally introduced in 64735ad63975 for relational
built-ins. It is functionally identical to __CLC_S_GENTYPE. Replacing it
simplifies gentype.inc, which is widely used in the library.
DeltaFile
+0-40libclc/clc/include/clc/math/gentype.inc
+1-1libclc/clc/include/clc/relational/binary_decl.inc
+1-1libclc/clc/include/clc/relational/unary_decl.inc
+1-1libclc/clc/lib/generic/atomic/clc_atomic_exchange.cl
+1-1libclc/clc/lib/generic/atomic/clc_atomic_load.cl
+1-1libclc/clc/lib/generic/atomic/clc_atomic_store.cl
+5-453 files not shown
+8-489 files

LLVM/project fbddf80clang/include/clang/Serialization ASTWriter.h, clang/lib/Frontend MultiplexConsumer.cpp

[C++20] [Modules] Apply DeclUpdate lazily in reduced BMI (#175498)

Previously we will apply all decl update unconditionally, but it might
not be best. See the attached example
'class-instantiate-no-change-02.cppm' for example. Sometimes these BMIs
are reducible.

Would land after 22 cut.
DeltaFile
+96-0clang/test/Modules/special-member-definitions.cppm
+55-14clang/lib/Serialization/ASTWriter.cpp
+45-0clang/test/Modules/class-instantiate-no-change-02.cppm
+13-4clang/include/clang/Serialization/ASTWriter.h
+0-6clang/lib/Frontend/MultiplexConsumer.cpp
+0-3clang/lib/Sema/SemaModule.cpp
+209-271 files not shown
+209-307 files

LLVM/project d1b9b4cllvm/include/llvm/MC MCELFStreamer.h MCStreamer.h, llvm/lib/MC MCWinCOFFStreamer.cpp

[MC] Remove unused NoExecStack parameter from MCStreamer::initSections. NFC (#188184)

Unused after commit 34bc5d580b73c0ca79653bb03e5c50419be2c634
DeltaFile
+2-2llvm/lib/MC/MCParser/MasmParser.cpp
+2-2llvm/lib/MC/MCParser/AsmParser.cpp
+1-2llvm/lib/MC/MCWinCOFFStreamer.cpp
+1-1llvm/include/llvm/MC/MCELFStreamer.h
+1-1llvm/include/llvm/MC/MCStreamer.h
+1-1llvm/include/llvm/MC/MCWinCOFFStreamer.h
+8-911 files not shown
+19-2017 files

LLVM/project 1a5e521libclc/clc/include/clc/math clc_ep_decl.inc, libclc/clc/lib/generic/math clc_log1p.inc clc_ep.inc

libclc: Update log1p (#188186)
DeltaFile
+17-137libclc/clc/lib/generic/math/clc_log1p.inc
+59-1libclc/clc/lib/generic/math/clc_ep.inc
+3-1libclc/clc/include/clc/math/clc_ep_decl.inc
+3-1libclc/clc/lib/generic/math/clc_log1p.cl
+82-1404 files

LLVM/project 7f6c96bclang/include/clang/CIR MissingFeatures.h, clang/lib/CIR/CodeGen CIRGenModule.cpp CIRGenModule.h

[CIR] Add addLLVMUsed and addLLVMCompilerUsed methods to CIRGenModule
DeltaFile
+104-2clang/lib/CIR/CodeGen/CIRGenModule.cpp
+27-0clang/test/CIR/CodeGenHIP/hip-cuid.hip
+19-0clang/lib/CIR/CodeGen/CIRGenModule.h
+0-1clang/include/clang/CIR/MissingFeatures.h
+150-34 files

LLVM/project 32c6a53libclc/clc/lib/generic/conversion clc_convert_float.inc clc_convert_float2float.cl

libclc: Fix -cl-denorms-are-zero for rtp and rtn conversions (#188148)
DeltaFile
+12-0libclc/clc/lib/generic/conversion/clc_convert_float.inc
+1-0libclc/clc/lib/generic/conversion/clc_convert_float2float.cl
+13-02 files

LLVM/project d710fbalibclc/clc/include/clc/math clc_ep_decl.inc, libclc/clc/lib/generic/math clc_log1p.inc clc_ep.inc

libclc: Update log1p

This was originally ported from rocm device libs in
bf9f76fbe0fb8b8af3377d2c6ce7d7cc290894ad, merge in more
recent changes.
DeltaFile
+17-137libclc/clc/lib/generic/math/clc_log1p.inc
+59-1libclc/clc/lib/generic/math/clc_ep.inc
+3-1libclc/clc/include/clc/math/clc_ep_decl.inc
+3-1libclc/clc/lib/generic/math/clc_log1p.cl
+82-1404 files

LLVM/project c9818d0libclc/clc/lib/generic/conversion clc_convert_float.inc clc_convert_float2float.cl

libclc: Fix -cl-denorms-are-zero for rtp and rtn conversions
DeltaFile
+12-0libclc/clc/lib/generic/conversion/clc_convert_float.inc
+1-0libclc/clc/lib/generic/conversion/clc_convert_float2float.cl
+13-02 files

LLVM/project 2e39b1ellvm/include/llvm/ExecutionEngine/Orc Core.h, llvm/lib/ExecutionEngine/Orc Core.cpp

[ORC] Add a bootstrap symbols JITDylib to ExecutionSession. (#188172)

The ExecutionSession constructor now creates a "<bootstrap>" JITDylib
and populates it with the bootstrap symbols from the
ExecutorProcessControl object. This allows bootstrap symbols to be
looked up via ExecutionSession::lookup, providing greater consistency
with other JIT symbol lookups.
DeltaFile
+63-0llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
+9-1llvm/lib/ExecutionEngine/Orc/Core.cpp
+8-0llvm/include/llvm/ExecutionEngine/Orc/Core.h
+80-13 files

LLVM/project cba948blibclc/clc/include/clc/math clc_atan_helpers.h clc_atan_helpers_decl.inc, libclc/clc/lib/generic/math clc_atan.inc clc_atan_helpers.inc

libclc: Update atan (#188095)

This was originally ported from rocm device libs in
47882923c7b48c00d6c0ea9960b5457e957093c4. Merge in more
recent changes.
DeltaFile
+30-140libclc/clc/lib/generic/math/clc_atan.inc
+53-0libclc/clc/lib/generic/math/clc_atan_helpers.inc
+17-0libclc/clc/include/clc/math/clc_atan_helpers.h
+14-0libclc/clc/lib/generic/math/clc_atan_helpers.cl
+10-0libclc/clc/include/clc/math/clc_atan_helpers_decl.inc
+3-2libclc/clc/lib/generic/math/clc_atan.cl
+127-1421 files not shown
+128-1427 files

LLVM/project ff68154libclc/clc/lib/generic/math clc_asin.inc clc_asin.cl

libclc: Update asin (#188094)

This was originally ported from rocm device libs in
64a8e1b83e14836f97dab4d28dae498e897804e6. Update for more
recent changes.
DeltaFile
+108-100libclc/clc/lib/generic/math/clc_asin.inc
+3-0libclc/clc/lib/generic/math/clc_asin.cl
+111-1002 files

LLVM/project f7fb467llvm/test/Analysis/DependenceAnalysis weak-crossing-siv-coeff-may-zero.ll

[DA] Add a test where the Weak Crossing SIV test misses dependency (NFC) (#188183)

The root cause is that the Weak Crossing SIV test assumes the
coefficients are non‑zero without verifying it.
DeltaFile
+58-0llvm/test/Analysis/DependenceAnalysis/weak-crossing-siv-coeff-may-zero.ll
+58-01 files

LLVM/project 31aa520libclc/clc/lib/generic/conversion clc_convert_float.inc clc_convert_float2float.cl

libclc: Use nextup and nextdown in place of nextafter (#188141)

Unfortunately it seems the optimizer isn't able to clean this
up, so this is a code quality improvement.
DeltaFile
+3-4libclc/clc/lib/generic/conversion/clc_convert_float.inc
+2-0libclc/clc/lib/generic/conversion/clc_convert_float2float.cl
+2-0libclc/clc/lib/generic/conversion/clc_convert_int2float.cl
+7-43 files

LLVM/project ef5658alibclc/clc/lib/generic/conversion clc_convert_float.inc

libclc: Simplify rtz conversion (#188137)
DeltaFile
+1-2libclc/clc/lib/generic/conversion/clc_convert_float.inc
+1-21 files

LLVM/project 428995bllvm/test/tools/sancov/XCOFF xcoff-sancov-symbols.test lit.local.cfg, llvm/tools/sancov sancov.cpp

Add XCOFF object file support in sanitizer coverage tool (#179884)

The sancov tool fails to find coverage symbols in XCOFF object files
because XCOFF uses a "." prefix for function entry point symbols. For
example, `__sanitizer_cov_trace_pc_guard appears` as
`.__sanitizer_cov_trace_pc_guard` in the symbol table.

Before this change, sancov reports:
`ERROR: __sanitizer_cov* functions not found`

This change strips the prefix "." when checking symbol names in XCOFF
files, allowing sancov to correctly identify coverage symbols.

---------

Co-authored-by: Honey Goyal <honey.goyal3 at ibm.com>
DeltaFile
+53-0llvm/test/tools/sancov/XCOFF/xcoff-sancov-symbols.test
+7-1llvm/tools/sancov/sancov.cpp
+2-0llvm/test/tools/sancov/XCOFF/lit.local.cfg
+62-13 files

LLVM/project 7257106libclc CMakeLists.txt

Disable unity build for CMake configuration
DeltaFile
+2-0libclc/CMakeLists.txt
+2-01 files

LLVM/project 85e1c64llvm/test/Transforms/LoopVectorize/AArch64 sve-interleaved-masked-accesses.ll partial-reduce-dot-product.ll, llvm/test/Transforms/LoopVectorize/ARM tail-folding-counting-down.ll

[LV][NFC] Remove some unused attributes from tests (#188091)

The local_unnamed_addr and dso_local attributes add no value to any of
the tests and simply increase file size, so I've removed all instances.
DeltaFile
+31-31llvm/test/Transforms/LoopVectorize/X86/masked_load_store.ll
+24-24llvm/test/Transforms/LoopVectorize/X86/drop-poison-generating-flags.ll
+20-20llvm/test/Transforms/LoopVectorize/AArch64/sve-interleaved-masked-accesses.ll
+11-11llvm/test/Transforms/LoopVectorize/ARM/tail-folding-counting-down.ll
+10-10llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+8-8llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-dot-product.ll
+104-10486 files not shown
+279-27992 files

LLVM/project c378b79llvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU promote-alloca-delay-value-replacement.ll

Revert "AMDGPU: Delay value replacement in PromoteAlloca (#186944)" (#188180)

This reverts commit 5624cce586c74ec7cfcbd0243f65cb1870677af7.

This is causing libclc failure. revert to fix it properly.
DeltaFile
+39-62llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+0-30llvm/test/CodeGen/AMDGPU/promote-alloca-delay-value-replacement.ll
+39-922 files

LLVM/project 94f3f05clang-tools-extra/clangd/unittests CMakeLists.txt, clang-tools-extra/include-cleaner/unittests CMakeLists.txt

fix more tarets
DeltaFile
+64-0clang/unittests/CMakeLists.txt
+14-0clang-tools-extra/clangd/unittests/CMakeLists.txt
+11-0clang-tools-extra/unittests/clang-tidy/CMakeLists.txt
+3-3llvm/tools/gold/CMakeLists.txt
+4-0clang-tools-extra/include-cleaner/unittests/CMakeLists.txt
+3-0clang/unittests/Format/CMakeLists.txt
+99-31 files not shown
+101-37 files

LLVM/project a8b669bclang-tools-extra Maintainers.rst

[clangd] Add ArcsinX as a maintainer (#187886)

To address clangd maintance problem, I'm nominating myself as a clangd
maintainer.
I'm currently actively reviewing PRs. I also participated in
clangd-related discourse discussions, subscribed to clangd issues and
PRs. For a while I plan to spend some time for PRs review in clangd.
DeltaFile
+3-0clang-tools-extra/Maintainers.rst
+3-01 files

LLVM/project c4885f0clang-tools-extra/clangd/unittests CMakeLists.txt, clang-tools-extra/include-cleaner/unittests CMakeLists.txt

fix more tarets
DeltaFile
+64-0clang/unittests/CMakeLists.txt
+14-0clang-tools-extra/clangd/unittests/CMakeLists.txt
+11-0clang-tools-extra/unittests/clang-tidy/CMakeLists.txt
+3-3llvm/tools/gold/CMakeLists.txt
+4-0clang-tools-extra/include-cleaner/unittests/CMakeLists.txt
+3-0clang/unittests/Format/CMakeLists.txt
+99-36 files

LLVM/project 4444f51llvm/lib/Target/Hexagon HexagonLoadStoreWidening.cpp, llvm/test/CodeGen/Hexagon store-widen-addasl.mir load-widen-addasl.mir

[Hexagon] Optimize load/store instruction during widening (#186962)

This change enhances the Hexagon Load-Store Widening pass to recognize
and optimize a specific pattern involving the S2_addasl_rrri
instruction. When widening loads/stores, the pass now detects cases
where the base register is defined by an S2_addasl_rrri instruction and
combines the operations into a single load double/store double
instruction with register shift op, eliminating the intermediate address
calculation.

Eg, for load,

If the definition of the base register came from a addasl instruction,
we generate a
memd(Rs + Rt << #imm) instead of memd(Rs + #imm) instruction.

Transform:

%18 = S2_addasl_rrri %8, %17, 3

    [9 lines not shown]
DeltaFile
+89-9llvm/lib/Target/Hexagon/HexagonLoadStoreWidening.cpp
+47-0llvm/test/CodeGen/Hexagon/store-widen-addasl.mir
+35-0llvm/test/CodeGen/Hexagon/load-widen-addasl.mir
+171-93 files

LLVM/project 9228fb5clang/lib/Headers ptrauth.h, compiler-rt/lib/builtins crtbegin.c

[PAC][compiler-rt] Use `__ptrauth` qualifier instead of builtins

Since #100830 has landed, we no longer need to rely on builtins
DeltaFile
+6-22compiler-rt/lib/builtins/crtbegin.c
+8-0clang/lib/Headers/ptrauth.h
+14-222 files

LLVM/project f253dd2clang-tools-extra/clangd/unittests CMakeLists.txt, clang-tools-extra/include-cleaner/unittests CMakeLists.txt

fix more tarets
DeltaFile
+63-0clang/unittests/CMakeLists.txt
+14-0clang-tools-extra/clangd/unittests/CMakeLists.txt
+11-0clang-tools-extra/unittests/clang-tidy/CMakeLists.txt
+3-3llvm/tools/gold/CMakeLists.txt
+4-0clang-tools-extra/include-cleaner/unittests/CMakeLists.txt
+95-35 files

LLVM/project 4dfeaa7llvm/lib/Target/LoongArch LoongArchISelLowering.cpp, llvm/lib/Target/RISCV RISCVISelLowering.cpp

Address lenary's comments
DeltaFile
+3-2llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+2-1llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+5-32 files

LLVM/project c668607llvm/test/CodeGen/RISCV pr187832.ll issue187832.ll

Address topperc's comments
DeltaFile
+48-0llvm/test/CodeGen/RISCV/pr187832.ll
+0-48llvm/test/CodeGen/RISCV/issue187832.ll
+48-482 files