LLVM/project 5de013dllvm/test/CodeGen/X86 pr192034.ll

[X86] Add test coverage for #192034 (#192686)
DeltaFile
+35-0llvm/test/CodeGen/X86/pr192034.ll
+35-01 files

LLVM/project 424140allvm/lib/Target/AArch64 AArch64InstrFormats.td AArch64InstrInfo.td, llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

[AArch64][llvm] Some instructions should be `HINT` aliases (NFC)

Implement the following instructions as a `HINT` alias instead of a
dedicated instruction in separate classes:
  * `stshh`
  * `stcph`
  * `shuh`
  * `tsb`

Updated all their helper methods too, and updated the `stshh` pseudo
expansion for the intrinsic to emit `HINT #0x30 | policy`.

Code in AArch64AsmPrinter::emitInstruction identified an initial BTI using a
broad bitmask on the HINT immediate, which also matched shuh/stcph (50..52)
This could move the patchable entry label after a non-BTI instruction.
Replaced it with an exact BTI check using the BTI HINT range (32..63) and
AArch64BTIHint::lookupBTIByEncoding(Imm ^ 32).

A following change will remove duplicated code and simplify.

    [2 lines not shown]
DeltaFile
+115-0llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+41-39llvm/lib/Target/AArch64/AArch64InstrFormats.td
+22-3llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
+5-14llvm/lib/Target/AArch64/AArch64InstrInfo.td
+5-10llvm/lib/Target/AArch64/AArch64SystemOperands.td
+4-2llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
+192-682 files not shown
+199-698 files

LLVM/project 3183e57llvm/test/CodeGen/X86 masked_gather_scatter.ll

[X86] masked_gather_scatter.ll - regenerate with VPADD asm comments (#192685)
DeltaFile
+8-8llvm/test/CodeGen/X86/masked_gather_scatter.ll
+8-81 files

LLVM/project a8a1bc4llvm/lib/Target/AArch64 AArch64InstrFormats.td AArch64InstrInfo.td, llvm/lib/Target/AArch64/Disassembler AArch64Disassembler.cpp

[AArch64][llvm] Tighten SYSP; don't disassemble invalid encodings

Tighten SYSP aliases, so that invalid encodings are disassembled
to `<unknown>`. This is because:

```
  Cn is a 4-bit unsigned immediate, in the range 8 to 9
  Cm is a 4-bit unsigned immediate, in the range 0 to 7
  op1 is a 3-bit unsigned immediate, in the range 0 to 6
  op2 is a 3-bit unsigned immediate, in the range 0 to 7
```

Ensure we check this when disassembling, and also constrain
tablegen for compile-time errors of invalid encodings.

Also adjust the testcases in `armv9-sysp-diagnostics.s` and
`llvm/test/MC/AArch64/armv9a-sysp.s` as they were invalid,
and added a few invalid (outside of range) SYSP-alikes to
test that `<unknown>` is printed
DeltaFile
+111-111llvm/test/MC/AArch64/armv9a-sysp.s
+25-1llvm/lib/Target/AArch64/AArch64InstrFormats.td
+25-0llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
+20-0llvm/test/MC/AArch64/armv9-sysp-invalid.s
+7-8llvm/test/MC/AArch64/armv9-sysp-diagnostics.s
+7-3llvm/lib/Target/AArch64/AArch64InstrInfo.td
+195-1233 files not shown
+207-1279 files

LLVM/project f1a872fllvm/lib/Target/AArch64/MCTargetDesc AArch64InstPrinter.cpp

fixup! Address PR comment about shortened `sysp` with xzr/xzr
DeltaFile
+17-16llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
+17-161 files

LLVM/project 9b1deefllvm/lib/Target/AArch64 AArch64InstrInfo.td, llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

fixup! Remove SYSPxt_XZR and update code to reflect this
DeltaFile
+27-34llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+41-14llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
+8-26llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
+2-30llvm/lib/Target/AArch64/AArch64InstrInfo.td
+0-20llvm/test/MC/AArch64/armv9-sysp-invalid.s
+13-3llvm/test/MC/AArch64/armv9-sysp-diagnostics.s
+91-1274 files not shown
+105-13710 files

LLVM/project 0e914fdllvm/lib/Target/AArch64 AArch64RegisterInfo.td, llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

fixup! Implement Marian's suggestion to implement as XSeqPairsClass + [XZR, XZR]
DeltaFile
+54-82llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+35-73llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
+12-9llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
+8-1llvm/lib/Target/AArch64/AArch64RegisterInfo.td
+0-7llvm/test/MC/AArch64/armv9a-sysp.s
+1-3llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.h
+110-1756 files

LLVM/project 8539d3allvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp, llvm/test/MC/AArch64 armv9-sysp-diagnostics.s

fixup! Improve error parsing
DeltaFile
+46-25llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+12-12llvm/test/MC/AArch64/armv9-sysp-diagnostics.s
+58-372 files

LLVM/project b9cbc9ellvm/lib/Target/AArch64 AArch64InstrFormats.td, llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

fixup! Address PR comments
DeltaFile
+5-9llvm/lib/Target/AArch64/AArch64InstrFormats.td
+2-3llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+1-2llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
+1-1llvm/test/MC/AArch64/armv9-sysp-diagnostics.s
+9-154 files

LLVM/project 58512bbllvm/lib/Target/AArch64 AArch64InstrFormats.td, llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

fixup! Templatise bounds checking and improve tests
DeltaFile
+15-4llvm/test/MC/AArch64/armv9-sysp-diagnostics.s
+18-0llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+12-5llvm/lib/Target/AArch64/AArch64InstrFormats.td
+0-8llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
+45-174 files

LLVM/project 73f6f1fllvm/lib/Target/AArch64 AArch64InstrFormats.td AArch64InstrInfo.td

fixup! Address Marian's PR comments: use imm0_6 predicate
DeltaFile
+9-1llvm/lib/Target/AArch64/AArch64InstrFormats.td
+2-2llvm/lib/Target/AArch64/AArch64InstrInfo.td
+11-32 files

LLVM/project 7bd71b4llvm/lib/Target/AArch64 AArch64InstrFormats.td

fixup! Fixes after rebasing following Marian's change
DeltaFile
+3-3llvm/lib/Target/AArch64/AArch64InstrFormats.td
+3-31 files

LLVM/project d532646llvm/lib/Target/AArch64/MCTargetDesc AArch64InstPrinter.cpp, llvm/test/MC/AArch64 armv9a-sysp.s

fixup! Add no-alias tests
DeltaFile
+4-3llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
+7-0llvm/test/MC/AArch64/armv9a-sysp.s
+11-32 files

LLVM/project fce4a1eclang/docs/CIR CleanupAndEHDesign.rst CleanupAndEHDesign.md

[CIR][docs] Migrate existing Markdown documents to reStructuredText format (#192066)

This patch migrates the existing ClangIR documents that are written in
Markdown format to reStructuredText format to align CIR's documents with
clang's documentation policy.

Closes #191850 .
DeltaFile
+1,631-0clang/docs/CIR/CleanupAndEHDesign.rst
+0-1,587clang/docs/CIR/CleanupAndEHDesign.md
+589-0clang/docs/CIR/ABILowering.rst
+0-556clang/docs/CIR/ABILowering.md
+2,220-2,1434 files

LLVM/project 8656768clang/test/Driver hexagon-toolchain-picolibc.c

[Hexagon] Relax toolchain check to accept ld in driver test (#192596)

Fixes failures in
https://lab.llvm.org/buildbot/#/builders/145/builds/13829
https://lab.llvm.org/buildbot/#/builders/124/builds/2152

Signed-off-by: Kushal Pal <kushpal at qti.qualcomm.com>
DeltaFile
+2-2clang/test/Driver/hexagon-toolchain-picolibc.c
+2-21 files

LLVM/project 2c9a1a7clang/lib/Driver SanitizerArgs.cpp, clang/test/Driver fsanitize-realtime.c

[clang][rtsan] Disallow type and realtime sanitizer combo (#192681)

Both of these sanitizer runtimes define similar interceptors, so they
may not be used together
DeltaFile
+5-0clang/test/Driver/fsanitize-realtime.c
+2-1clang/lib/Driver/SanitizerArgs.cpp
+7-12 files

LLVM/project 6e94ad0flang/lib/Evaluate fold-implementation.h, flang/test/Evaluate rewrite09.f90 rewrite01.f90

[flang] Fold x + 0, 0 + x and x - 0 for INTEGER and UNSIGNED (#192479)

This fixes https://github.com/llvm/llvm-project/issues/191928.
DeltaFile
+49-0flang/test/Evaluate/rewrite09.f90
+30-0flang/lib/Evaluate/fold-implementation.h
+4-12flang/test/Lower/HLFIR/array-ctor-as-inlined-temp.f90
+1-3flang/test/Lower/HLFIR/array-ctor-as-runtime-temp.f90
+1-3flang/test/Lower/HLFIR/array-ctor-as-elemental.f90
+1-1flang/test/Evaluate/rewrite01.f90
+86-196 files

LLVM/project d9b43e2libc/src/__support wctype_impl.h wctype_utils.h, libc/src/wctype CMakeLists.txt iswctype.cpp

[libc] Reorganize iswctype to avoid GPU/libc++ error (#192659)

After #191178 there were build errors when building the libc++
hand-in-hand pieces due to header layering.

Written with the assistance of Gemini
DeltaFile
+105-0libc/src/__support/wctype_impl.h
+0-82libc/src/__support/wctype_utils.h
+13-0libc/src/__support/CMakeLists.txt
+4-2libc/src/wctype/CMakeLists.txt
+2-3libc/src/wctype/iswctype.cpp
+2-3libc/src/wctype/wctype.cpp
+126-906 files

LLVM/project fd647callvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 f16f32dot-fixed-length-fdot.ll

[AArch64] Fix codegen for FEAT_F16F32DOT with SVE2/SME. (#192668)

When compiling with +sve2/+sme, don't override to use Custom lowering
for PARTIAL_REDUCE_FMLA when it previously determined the operation was
legal due to +f16f32dot/+fp16fml.
DeltaFile
+10-5llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+14-0llvm/test/CodeGen/AArch64/f16f32dot-fixed-length-fdot.ll
+24-52 files

LLVM/project 6911299libc/include limits.yaml, libc/include/llvm-libc-macros limits-macros.h

[libc] Various limits adds and fixes (#192672)

Implemented and corrected POSIX limits:

* Corrected _POSIX_NAME_MAX and _POSIX_PATH_MAX definitions.
* Added PATH_MAX for Linux.
* Added _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
PTHREAD_DESTRUCTOR_ITERATIONS.
* Updated limits.yaml to include these macros.
DeltaFile
+18-0libc/include/llvm-libc-macros/limits-macros.h
+10-0libc/include/limits.yaml
+28-02 files

LLVM/project a342f77libc/include/llvm-libc-types/x86_64 mcontext_t.h ucontext_t.h

[libc] Fix ucontext_t and mcontext_t for C compliance (#192648)

* x86_64/ucontext_t.h: Removed alignas to fix C compilation error.

* x86_64/mcontext_t.h: Updated include guard to prevent collision.
DeltaFile
+3-3libc/include/llvm-libc-types/x86_64/mcontext_t.h
+2-2libc/include/llvm-libc-types/x86_64/ucontext_t.h
+5-52 files

LLVM/project e772e04llvm/utils/lit/lit TestTimes.py Test.py, llvm/utils/lit/tests malformed-test-times.py

fixup! Address PR comments
DeltaFile
+16-3llvm/utils/lit/lit/TestTimes.py
+9-9llvm/utils/lit/tests/malformed-test-times.py
+2-2llvm/utils/lit/lit/Test.py
+1-1llvm/utils/lit/lit/discovery.py
+28-154 files

LLVM/project 49a7f37llvm/lib/CAS MappedFileRegionArena.cpp, llvm/test/tools/llvm-cas mapping-size-too-small.test

[CAS] Fix assertion failure when opening CAS with smaller mapping size (#192565)

When opening an existing large CAS using a smaller requested mapping
size, the file size can be smaller than capacity while holding only a
shared lock. Replace the assertion with a graceful lock upgrade to
exclusive before resizing the file.
DeltaFile
+22-0llvm/test/tools/llvm-cas/mapping-size-too-small.test
+7-1llvm/lib/CAS/MappedFileRegionArena.cpp
+29-12 files

LLVM/project 7ce8282libcxx/src ios.cpp

[libc++] Fix realloc bug in ios.cpp (#177526)

When realloc fails in the function register_callback in `ios.cpp`, the
memory will be leaked, then `__fn_` is assigned as `nullptr`,
dereferencing `__fn_` causes UB. The fix is quite simple which aligns to
`iword & pword` for `realloc`, i.e. return directly if `realloc` fails.

Regarding testing for this bug fix, because `realloc` is a C function
that we can't replace, there is no way to exercise that path easily.
DeltaFile
+6-2libcxx/src/ios.cpp
+6-21 files

LLVM/project b7e915cflang/lib/Lower ConvertExprToHLFIR.cpp, flang/test/Lower/HLFIR conditional-expr.f90

[flang] Conditional expressions lowering: use fir.if SSA results for trivial scalar types (#192338)

For trivial scalar types (INTEGER, REAL, COMPLEX, LOGICAL, UNSIGNED),
generate `fir.if` with SSA results instead of allocating a temporary and
using `hlfir.assign`. This avoids the alloca/declare/assign/load pattern
for types that can be passed directly as SSA values.

Non-trivial scalar types (derived types, characters) continue to use the
existing temporary-based paths.

The LIT test expectations have been updated accordingly, and a test case
was added.
DeltaFile
+70-54flang/test/Lower/HLFIR/conditional-expr.f90
+47-3flang/lib/Lower/ConvertExprToHLFIR.cpp
+117-572 files

LLVM/project ea2f508mlir/test/Dialect/Tosa tosa-validation-version-1p0-invalid.mlir

[mlir][tosa] Fix validation test (#192679)

Fixes a validation test after a merge race condition with
https://github.com/llvm/llvm-project/pull/192122 and
https://github.com/llvm/llvm-project/pull/192272.
DeltaFile
+1-1mlir/test/Dialect/Tosa/tosa-validation-version-1p0-invalid.mlir
+1-11 files

LLVM/project 56bb0a4llvm/test/CodeGen/SPIRV lit.local.cfg

[SPIR-V] Use ToolSubst for spirv-tools lit substitutions (#192462)

Bare-string substitutions match as substrings and the replacement path
contains the tool name, causing corrupted RUN lines

The issue is reproducible, for example, when path to llvm has tool name
substring at any point
DeltaFile
+4-4llvm/test/CodeGen/SPIRV/lit.local.cfg
+4-41 files

LLVM/project f51159dllvm/lib/Target/SPIRV SPIRVInstructionSelector.cpp SPIRVTypeInst.cpp, llvm/test/CodeGen/SPIRV/transcoding store-atomic.ll load-atomic.ll

[SPIRV] Lower load/store atomic to OpAtomicLoad/OpAtomicStore
DeltaFile
+96-7llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+19-26llvm/test/CodeGen/SPIRV/transcoding/store-atomic.ll
+19-25llvm/test/CodeGen/SPIRV/transcoding/load-atomic.ll
+41-0llvm/test/CodeGen/SPIRV/transcoding/atomic-load-store-unsupported.ll
+18-0llvm/lib/Target/SPIRV/SPIRVTypeInst.cpp
+4-4llvm/lib/Target/SPIRV/SPIRVISelLowering.cpp
+197-623 files not shown
+211-669 files

LLVM/project 0993b11clang/include/clang/AST ASTContext.h, clang/lib/AST ASTContext.cpp

[clang] Clear ASTContext::TUDecl in 'cleanup' for easier debugging (#191697)

While the ASTContext has more things inside, I think we should at least
clear the TUDecl so that when traversing the (dangling) AST would
immediately step on the null-dereference instead of chasing dangling
pointers and crash later.

I was bitten by this in #191058.

This commit should be NFC - assuming that people didn't traverse already
dangling ASTs.
DeltaFile
+2-0clang/include/clang/AST/ASTContext.h
+1-0clang/lib/AST/ASTContext.cpp
+3-02 files

LLVM/project 03d3d6butils/bazel/llvm-project-overlay/libc BUILD.bazel

[Bazel] Fixes 735b152 (#192673)

This fixes 735b15239c493fce6a5033776470892f30d7e00e.

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+2-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+2-01 files