LLVM/project d3925e6compiler-rt/cmake/Modules CompilerRTUtils.cmake, libcxx/utils/ci run-buildbot

CompilerRT: Normalize COMPILER_RT_DEFAULT_TARGET_TRIPLE (#89234)

If LLVM is configured with -DLLVM_DEFAULT_TARGET_TRIPLE, or compiler_rt
is configured with -DCOMPILER_RT_DEFAULT_TARGET_TRIPLE, while the
argument is not normalized, such as Debian-style vendor-less triple,
clang will try to find libclang_rt in lib/<normalized_triple>, while
libclang_rt is placed into lib/<triple_arg>.

Let's also place libclang_rt into lib/<normalized_triple>.
`libcxx/utils/ci/run-buildbot` is also updated to use
`armv7m-none-unknown-eabi` as normalized triple instead of
current `armv7m-none-eabi`.

ChangeLog of this PR:
This patch has been applied and revert twice:
1. The first try is https://github.com/llvm/llvm-project/pull/88407, and
then it is found that it causes some CI failures.
    https://lab.llvm.org/buildbot/#/builders/98/builds/36366
It is then resolved by another commit:

    [22 lines not shown]
DeltaFile
+6-0compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+1-1libcxx/utils/ci/run-buildbot
+7-12 files

LLVM/project de3e4a9llvm/test/CodeGen/X86 keylocker-intrinsics-fast-isel.ll, llvm/test/MC/Disassembler/X86/apx sha.txt keylocker.txt

[X86][APX] Remove KEYLOCKER and SHA promotions from EVEX MAP4. (#89173)

APX spec: https://cdrdv2.intel.com/v1/dl/getContent/784266
Change happended in version 4.0.
Removed instructions' Opcodes:
AESDEC128KL
AESDEC256KL
AESDECWIDE128KL
AESDECWIDE256KL
AESENC128KL
AESENC256KL
AESENCWIDE128KL
AESENCWIDE256KL
ENCODEKEY128
ENCODEKEY256
SHA1MSG1
SHA1MSG2
SHA1NEXTE
SHA1RNDS4

    [2 lines not shown]
DeltaFile
+0-146llvm/test/CodeGen/X86/keylocker-intrinsics-fast-isel.ll
+0-127llvm/test/MC/X86/apx/sha-att.s
+0-124llvm/test/MC/Disassembler/X86/apx/sha.txt
+0-123llvm/test/MC/X86/apx/sha-intel.s
+0-105llvm/test/MC/X86/apx/keylocker-att.s
+0-102llvm/test/MC/Disassembler/X86/apx/keylocker.txt
+0-7279 files not shown
+35-1,01415 files

LLVM/project 08a787cllvm/test/Transforms/InstCombine update-bpi.ll

[InstCombine] Add test to track BPI when condition was inverted (#86469)

InstCombine may invert branch condition and profile metadata. Branch
probability analysis should be updated in this case.
DeltaFile
+36-0llvm/test/Transforms/InstCombine/update-bpi.ll
+36-01 files

LLVM/project aac4d03clang/lib/Sema SemaModule.cpp, clang/test/Modules pr85122.cppm

[C++20] [Modules] Mark exported all declarations as used

Close https://github.com/llvm/llvm-project/issues/85122

As the title suggested, it looks pretty sensible.
DeltaFile
+6-0clang/test/Modules/pr85122.cppm
+4-0clang/lib/Sema/SemaModule.cpp
+10-02 files

LLVM/project 3090efcflang/lib/Semantics check-declarations.cpp, flang/test/Semantics cuf12.cuf cuf03.cuf

[flang][cuda] Relax semantic for device variable in block construct (#89330)

DeltaFile
+8-0flang/test/Semantics/cuf12.cuf
+3-2flang/lib/Semantics/check-declarations.cpp
+5-0flang/test/Semantics/cuf03.cuf
+16-23 files

LLVM/project 6a104e5clang/lib/Sema SemaOpenMP.cpp, clang/test/OpenMP nesting_of_regions.cpp target_teams_generic_loop_codegen_as_parallel_for.cpp

update

Created using spr 1.3.4
DeltaFile
+0-19,580clang/test/OpenMP/nesting_of_regions.cpp
+19,567-0clang/test/OpenMP/Inputs/nesting_of_regions.cpp
+5,663-7,499llvm/test/CodeGen/WebAssembly/simd-arith.ll
+2,586-2,584libcxx/utils/data/unicode/EastAsianWidth.txt
+2,617-1,858clang/lib/Sema/SemaOpenMP.cpp
+3,998-0clang/test/OpenMP/target_teams_generic_loop_codegen_as_parallel_for.cpp
+34,431-31,5214,929 files not shown
+280,199-154,2394,935 files

LLVM/project 692ec9eclang/lib/Sema SemaOpenMP.cpp, clang/test/OpenMP nesting_of_regions.cpp target_teams_generic_loop_codegen_as_parallel_for.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.4

[skip ci]
DeltaFile
+0-19,580clang/test/OpenMP/nesting_of_regions.cpp
+19,567-0clang/test/OpenMP/Inputs/nesting_of_regions.cpp
+5,663-7,499llvm/test/CodeGen/WebAssembly/simd-arith.ll
+2,586-2,584libcxx/utils/data/unicode/EastAsianWidth.txt
+2,617-1,858clang/lib/Sema/SemaOpenMP.cpp
+3,998-0clang/test/OpenMP/target_teams_generic_loop_codegen_as_parallel_for.cpp
+34,431-31,5214,929 files not shown
+280,199-154,2394,935 files

LLVM/project 396cdabllvm/include/llvm/IR PatternMatch.h, llvm/test/Transforms/InstCombine select-with-bitwise-ops.ll signed-truncation-check.ll

[PatternMatch] Allow poison in api_pred_ty matchers (#89188)

This allows vector splats containing poison for matchers using
api_pred_ty, making the behavior consistent with cst_pred_ty. In other
words, previously `m_NonNegative()` allowed splats with poison, while
`m_NonNegative(C)` did not. Now both allow them.

The affected matchers are m_MaxSignedValue, m_Negative, m_NonNegative,
m_StrictlyPositive, m_NonPositive, m_Power2, m_Power2OrZero,
m_NegatedPower2, m_NegatedPower2OrZero, m_LowBitMask and
m_LowBitMaskOrZero when passing in APInt.

I briefly went through the uses of these matchers and didn't spot any
places where allowing poison would be obviously wrong (I initially
thought foldSelectICmpAndBinOp is problematic, but because it does not
reuse the original constants, it's fine).

A problem here is that, despite these matchers appearing in a decent
number of places, we have very little pre-existing test coverage for
these folds with poison vectors, so we don't benefit from alive2
verification.
DeltaFile
+42-0llvm/test/Transforms/InstCombine/select-with-bitwise-ops.ll
+12-30llvm/test/Transforms/InstCombine/signed-truncation-check.ll
+2-1llvm/include/llvm/IR/PatternMatch.h
+56-313 files

LLVM/project 949e66bclang/lib/CodeGen CoverageMappingGen.cpp

[Coverage][NFC] Avoid visiting non-unique `OpaqueValueExpr` (#88910)

Only unique `OpaqueValueExpr`s should be handled in the mapping builder,
as
[discussed](https://github.com/llvm/llvm-project/pull/85837#discussion_r1542056451)
in #85837. However, `getCond()` returns non-unique `OpaqueValueExpr` for
`BinaryConditionalOperator` (because it is also used as the "true"
branch expression). Use `getCommon()` instead so as to bypass the
`OpaqueValueExpr`.
DeltaFile
+5-5clang/lib/CodeGen/CoverageMappingGen.cpp
+5-51 files

LLVM/project 89f8ba2llvm/lib/AsmParser LLParser.cpp, llvm/lib/IR Function.cpp

[AsmParser] Support calling intrinsics without mangling suffix (#89172)

This adds proper support for calling intrinsics without mangling suffix
when parsing textual IR. This already worked (mostly by accident) when
only a single mangling suffix was in use.

This patch extends support to the case where the intrinsic is used with
multiple signatures, and as such multiple different intrinsic
declarations have to be inserted. The final IR will have intrinsics with
mangling suffix as usual.

Motivated by the discussion at:
https://discourse.llvm.org/t/recent-improvements-to-the-ir-parser/77366
DeltaFile
+52-33llvm/lib/AsmParser/LLParser.cpp
+16-10llvm/test/Assembler/implicit-intrinsic-declaration.ll
+9-6llvm/lib/IR/Function.cpp
+11-0llvm/test/Assembler/implicit-intrinsic-declaration-invalid2.ll
+9-0llvm/test/Assembler/implicit-intrinsic-declaration-invalid3.ll
+4-5llvm/test/Assembler/implicit-intrinsic-declaration-invalid.ll
+101-541 files not shown
+107-557 files

LLVM/project eb7ad88llvm/lib/Transforms/InstCombine InstCombineCompares.cpp InstCombineAndOrXor.cpp, llvm/test/Transforms/InstCombine fmul.ll binop-itofp.ll

[InstCombine] Remove some uses with replaceUndefsWith() (#89190)

Now that we don't accept undef splat in PatternMatch, we can remove some
uses of replaceUndefsWith(). I believe in all these cases only poison
splats are possible now, in which case no replacement is necessary.
DeltaFile
+0-19llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+8-8llvm/test/Transforms/InstCombine/fmul.ll
+2-12llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+4-4llvm/test/Transforms/InstCombine/binop-itofp.ll
+2-2llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-slt-to-icmp-sgt.ll
+2-2llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-ugt-to-icmp-ugt.ll
+18-475 files not shown
+26-5811 files

LLVM/project 3f2371eclang/include/clang/Driver Options.td, clang/test/Driver cl-pch.cpp cl-outputs.c

[clang-cl] [Driver] Fix clang-cl driver supported colon options (#88216)

Tested locally against msvc 1939.
MSVC supports the colon form of various options that take a path even
though that isn't documented for all options on MSDN.
I added the colon form for all supported msvc options that clang-cl does
not intentionally ignore due to being unsupported.

I also fixed the existing colon options by ensure we use
`JoinedOrSeparate`. `/F[x]` argument must used within the same command
line argument. However, `/F[x]:` arguments are allowed to span a command
line argument. The following is valid `/F[x]: path` which is 2 separate
command line arguments.
You can see this documented here,
https://learn.microsoft.com/en-us/cpp/build/reference/fo-object-file-name?view=msvc-170,
where it says `/Fo:[ ]"pathname"`.
This behaviour works for all colon options that take a path and I tested
it locally against msvc 1939 for all the option changes in this PR.
DeltaFile
+4-2clang/include/clang/Driver/Options.td
+6-0clang/test/Driver/cl-pch.cpp
+4-0clang/test/Driver/cl-outputs.c
+14-23 files

LLVM/project 2b2c4a8lld/test/ELF debug-names-bad.s

[ELF,test] Make debug-names-bad.s Linux only because of GNU sed extension
DeltaFile
+1-1lld/test/ELF/debug-names-bad.s
+1-11 files

LLVM/project 55d4a89libc/src/__support/FPUtil FEnvImpl.h, libc/src/__support/FPUtil/riscv FEnvImpl.h

[libc] fix FEnvImpl not using the proxy header (#89303)

In the recent fenv.h header cleanup, two FEnvImpl.h files were missed,
causing build issues. This patch fixes that.
DeltaFile
+2-1libc/src/__support/FPUtil/FEnvImpl.h
+0-1libc/src/__support/FPUtil/riscv/FEnvImpl.h
+2-22 files

LLVM/project 6b38936lldb/source/Plugins/SymbolFile/DWARF SymbolFileDWARFDebugMap.cpp

Check for null oso SymbolFile in SymbolFileDwarfDebugMap::ResolveSymbolContext (#89324)

The couple other places that use the oso module's SymbolFile, they check
that it's non-null, so this is just an oversight in
ResolveSymbolContext.

I didn't add a test for this (but did add a log message for the error
case) because I can't see how this would actually happen. The .o file
had to have valid enough DWARF that the linker's parser could handle it
or it would not be in the debug map. If you delete the .o file, we just
leave that entry out of the debug map. If you strip it or otherwise mess
with it, we'll notice the changed mod time and refuse to read it...

This was based on a report from the field, and we don't have access to
the project. But if the logging tells me how this happened I can come
back and add a test with that example.
DeltaFile
+11-3lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+11-31 files

LLVM/project ab0b865llvm/test/CodeGen/AArch64 hwasan-check-memaccess-fixedshadow.ll

[hwasan] Add testcase for check-memaccess when using a fixed shadow (#89328)

The test case is based on hwasan-check-memaccess.ll (albeit updated
using update_llc_test_checks) with --hwasan-mapping-offset=...

--hwasan-mapping-offset=... actually doesn't affect the LLVM IR at the
moment; future work will introduce memaccess fixed shadow intrinsics.
(https://github.com/llvm/llvm-project/pull/89319)
DeltaFile
+165-0llvm/test/CodeGen/AArch64/hwasan-check-memaccess-fixedshadow.ll
+165-01 files

LLVM/project 8c212a3mlir/test lit.cfg.py

[mlir][python] allow passing in PYTHONPATH to lit tests (#89296)

DeltaFile
+1-0mlir/test/lit.cfg.py
+1-01 files

LLVM/project 501200ebolt/lib/Rewrite RewriteInstance.cpp, bolt/test/X86 fragment-lite.s

Fix issues, tests pass

Created using spr 1.3.4
DeltaFile
+8-6bolt/test/X86/fragment-lite.s
+10-3bolt/lib/Rewrite/RewriteInstance.cpp
+18-92 files

LLVM/project 23d88a8llvm/include/llvm/BinaryFormat ELF.h, llvm/lib/BinaryFormat ELF.cpp

adds conversion functions for EI_OSABI in elf (#89280)

These are needed to populate elf headers in core files. This is part of
implementing process save-core in lldb
DeltaFile
+80-0llvm/lib/BinaryFormat/ELF.cpp
+6-0llvm/include/llvm/BinaryFormat/ELF.h
+86-02 files

LLVM/project 8fb7ddfmlir/lib/Conversion/TosaToLinalg CMakeLists.txt

[Tosa] TosaToLinalg: link in Index dialect (#89318)

This is needed now that this depends on it:
ee0284ec1027b2917afac3da5322553d0f85a759

Co-authored-by: Will Dietz <w at wdtz.org>
DeltaFile
+3-2mlir/lib/Conversion/TosaToLinalg/CMakeLists.txt
+3-21 files

LLVM/project 7154a39lldb/include/lldb/Core Disassembler.h, lldb/source/Core Disassembler.cpp

[lldb][nfc] Remove unused member Disassembler::m_base_addr (#89289)

This member variable is completely unused. I also don't think it makes a
ton of sense since (1) The "base address" can be obtained from the first
Instruction in its InstructionList, and (2) InstructionLists may not be
a series of contiguous instructions (even though they are most of the
time).
DeltaFile
+1-2lldb/source/Core/Disassembler.cpp
+0-1lldb/include/lldb/Core/Disassembler.h
+1-32 files

LLVM/project 0c41eeamlir/include/mlir/Conversion/ArithCommon AttrToLLVMConverter.h, mlir/include/mlir/Conversion/LLVMCommon VectorPattern.h

[mlir][llvm] Port `overflowFlags` to a native operation property (#89312)

This PR changes the LLVM dialect's IntegerOverflowFlags to be stored on
operations as native properties.
DeltaFile
+72-4mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
+29-47mlir/include/mlir/Dialect/LLVMIR/LLVMInterfaces.td
+13-13mlir/lib/Conversion/LLVMCommon/VectorPattern.cpp
+11-11mlir/include/mlir/Conversion/ArithCommon/AttrToLLVMConverter.h
+13-6mlir/lib/Conversion/LLVMCommon/Pattern.cpp
+10-6mlir/include/mlir/Conversion/LLVMCommon/VectorPattern.h
+148-875 files not shown
+165-10911 files

LLVM/project 2132ebfmlir/include/mlir/IR Properties.td

[mlir] Add def to `Properties.td` to help with enum properties (#89311)

This is useful for defining operation properties that are enums.
DeltaFile
+13-0mlir/include/mlir/IR/Properties.td
+13-01 files

LLVM/project 883043dllvm/lib/Frontend/OpenMP OMP.cpp, llvm/unittests/Frontend OpenMPComposeTest.cpp

Address issue with "end directives"
DeltaFile
+36-2llvm/utils/TableGen/DirectiveEmitter.cpp
+2-2llvm/lib/Frontend/OpenMP/OMP.cpp
+2-0llvm/unittests/Frontend/OpenMPComposeTest.cpp
+40-43 files

LLVM/project 10c7381lld/ELF Driver.cpp Options.td, lld/test/ELF reproduce.s

[𝘀𝗽𝗿] initial version

Created using spr 1.3.5-bogner
DeltaFile
+63-0lld/test/ELF/linkerscript/default-script.s
+13-3lld/ELF/Driver.cpp
+3-1lld/test/ELF/reproduce.s
+3-0lld/ELF/Options.td
+1-0lld/ELF/DriverUtils.cpp
+83-45 files

LLVM/project 39bfdb7llvm/test/Transforms/GlobalOpt cleanup-pointer-root-users-gep-constexpr.ll

[GlobalOpt] Precommit tests for PR84694 (#87443)

PR link: https://github.com/llvm/llvm-project/pull/84694
DeltaFile
+88-0llvm/test/Transforms/GlobalOpt/cleanup-pointer-root-users-gep-constexpr.ll
+88-01 files

LLVM/project a2face4llvm/include/llvm/TargetParser Triple.h, llvm/lib/TargetParser Triple.cpp

[DXIL] Add DXIL SubArch to correspond to version number (#89125)

This change is in line with similar notation in SPIRV. 

Decoupling version numbering of DXIL and of Shader Model is intended to
enable accurate specification of DXIL features that can be targeted by
different Shader Model versions.
DeltaFile
+83-0llvm/unittests/TargetParser/TripleTest.cpp
+16-1llvm/lib/TargetParser/Triple.cpp
+11-0llvm/include/llvm/TargetParser/Triple.h
+110-13 files

LLVM/project ee7ed21clang/lib/Driver SanitizerArgs.cpp, clang/test/CodeGen sanitize-type-attr.cpp

!fixup: add test
DeltaFile
+74-0clang/test/CodeGen/sanitize-type-attr.cpp
+4-4clang/lib/Driver/SanitizerArgs.cpp
+78-42 files

LLVM/project 96912aeclang/lib/CodeGen SanitizerMetadata.cpp SanitizerMetadata.h, clang/lib/Driver SanitizerArgs.cpp

[TySan] A Type Sanitizer (Clang)
DeltaFile
+34-10clang/lib/CodeGen/SanitizerMetadata.cpp
+23-0clang/test/Driver/sanitizer-ld.c
+10-5clang/lib/Driver/SanitizerArgs.cpp
+7-6clang/lib/CodeGen/SanitizerMetadata.h
+7-5clang/lib/CodeGen/CodeGenModule.cpp
+4-2clang/lib/CodeGen/CodeGenTBAA.cpp
+85-2810 files not shown
+116-3016 files

LLVM/project 0dcabbautils/bazel/llvm-project-overlay/mlir BUILD.bazel

[mlir][bazel] fix llvm:support dependency error for CAPIGPU
DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-01 files