[libc] Force to inline syscall_impl on x86_64 (#178153)
With currently only LIBC_INLINE, we just hint the compiler to inline the
function which however in practice is not always the case.
This is in preparation for adding SHSTK support which requires the
system call enabling it to be inlined into do_start().
[libc++] Switch to the new docker image in the CI (#185843)
This also simplifies the workflow file a bit and removes a redundant
`generic-cxx26` configuration in stage 3.
InstCombine: Support basic phis in SimplifyDemandedFPClass (#184124)
Some complex function edge case epilogs are only handled under
some control flow paths (e.g. lgamma and erfcinv).
[InstCombine] Fix profile metadata propagation in InstCombine select folding (#179743)
Propagate profile metadata when canonicalizing SPF and drop it when
folding select instructions with logical AND/OR conditions. This fixes
profile verification failures in Transforms/InstCombine/select-and-or.ll.
1. Select Pattern Factor (SPF) Canonicalization
When canonicalizing SPF patterns (like umax/umin), InstCombine
transforms sequences like select i1 %cond,(select i1 %cmp, %x, %y), %z
into intrinsic calls wrapped in a new select. The new outer select
directly replaces the original select instruction, and its condition
(%cond) remains structurally identical. Because the condition and its
evaluated true/false semantics are unchanged, it is ok to copy the
original !prof branch weight metadata to the newly created select.
2. Logical Boolean Folds (foldSelectOfBools)
For logical boolean folds (e.g., transforming select (~a | c), a, b into
select a, (select c, true, b), false), InstCombine restructures complex
[3 lines not shown]
[TableGen] Let -register-info-debug dump the Artificial flag (#185899)
Dump the Artificial flag for RegisterClasses, SubRegIndices and
Registers. To avoid clutter it is only dumped when the flag is set (has
value 1).
[mlir][affine] Bail out when store permutation map has broadcast dimensions (#184618)
When the vectorized loop is an outer loop and the store index uses an
inner loop's IV (which is invariant w.r.t. the outer loop),
makePermutationMap
produces a broadcast map (e.g. (d0) -> (0)). A vector.transfer_write
with
broadcast dimensions is invalid, causing a verifier error.
Fix: check for AffineConstantExpr results in the store permutation map
and
bail out of vectorization, preserving the scalar loop nest.
Fixes #131135
Assisted-by: Claude Code
[DataLayout] Add a specifier for element-aligned vectors (#180617)
This adds the "ve" specifier to Data Layout, which says that vectors are
element-aligned by default for a target.
Note that we also remove the default vector specs for 64 and 128 bit
vectors - these match the natural alignment of those vectors, so they
didn't actually have any functional effect.
[bazel][mlir] Remove non-existent file mlir/run_lit.sh (#185729)
This file does not exist. Surprisingly, it's not a fatal error to have
it in the list, as long as you don't explicitly reference it.
[DirectX] Split long vectors in DXILResourceAccess (#184732)
If a vector has more than 4 elements, the `resource.load` and
`resource.store`
intrinsics aren't able to handle it. Split these into multiple calls.
Fixes #167542
[Metal][HLSL] Add support for dumping reflection (#185444)
The Metal Shader converter can output shader reflection information into
a JSON file. This connects the -Fre flag (DXC's flag for reflection) to
the Metal Shader Converter tool step to produce the JSON file. As a
temporary state the -Fre flag will error when used without the -metal
flag.
This is required to address
https://github.com/llvm/offload-test-suite/issues/452
Re-land #181258
[Dexter] Add missing calls to SBDebugger::{Initialize,Terminate} (#185535)
When using LLDB, the first and last call should be
SBDebugger::Initialize and SBDebugger::Terminate respectively.
While we're resilient against mistakes, I'm adding an assert (#185162)
to debug builds to catch those mistakes in-tree as they have the
potential to leak resources. The assert was tripped by Dexter.
This PR adds the missing calls to SBDebugger::{Initialize,Terminate},
and while I was at it, I also added a missing call to
SBDebugger::Destroy. With that, the Dexter tests pass locally with the
assert enabled.
[Clang-doc] Display enum comments in HTML (#183085)
Currently comments of enum variables are not displayed in HTML.
Add support to display the comments.
[AArch64][GlobalISel] Fix matchUseVectorTruncate to check element order before folding (#185834)
matchUseVectorTruncate incorrectly folded a
G_UNMERGE_VALUES + G_TRUNC + G_BUILD_VECTOR sequence into a single
vector G_TRUNC even when the BUILD_VECTOR operand order did not match
the UNMERGE_VALUES result order. This silently dropped element
reordering, producing a miscompile.
Add an element-ordering check: BUILD_VECTOR position I must use
UNMERGE_VALUES result I, otherwise the fold is rejected.
InstCombine: Support basic phis in SimplifyDemandedFPClass
Some complex function edge case epilogs are only handled under
some control flow paths (e.g. lgamma and erfcinv).
[Hexagon] Disable implicit system include paths (#185456)
Hexagon toolchains are almost always cross-compiling and using system
include paths is virtually always an error. In general, adding implicit
paths is confusing as they are not shown in the `-###` output. The
comment in `InitHeaderSearch::AddDefaultIncludePaths()` suggests that
"this code path is going away" and the proper place for path selection
is in the driver. The current logic for adding implicit paths in the
preprocessor is on the opt-out basis, but it looks like almost all
majors OSes are explictly excluded.
Disable implicit system include paths for Hexagon targets.
Disable implicit system include paths for Hexagon targets.
[mlir][spirv] Add first 7 elementwise unary ops in TOSA Ext Inst Set (#185885)
This patch introduces the following elementwise unary operators:
spirv.Tosa.Abs
spirv.Tosa.BitwiseNot
spirv.Tosa.Ceil
spirv.Tosa.Clz
spirv.Tosa.Cos
spirv.Tosa.Exp
spirv.Tosa.Floor
Also dialect and serialization round-trip tests have been added.
Signed-off-by: Davide Grohmann <davide.grohmann at arm.com>
[libc] Implement iswgraph entrypoint (#185339)
part of https://github.com/llvm/llvm-project/issues/185136;
This PR adds public entrypoints for the wide character classification
function iswgraph in LLVM libc, using the same pattern as the existing
iswalpha entrypoint.
using bellow cmd to test:
```shell
ninja libc.test.src.wctype.iswgraph_test.__unit__
```
[MIR] Support symbolic inline asm operands
Support parsing and printing inline assembly operands in MIR
using the symbolic form instead of numeric register class IDs,
thus removing the need to update tests when the numbers change.
The numeric form remains supported.
Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
[clang][lit] Fix spirv-tools-err.c when LIT_USE_INTERNAL_SHELL=0 (#185876)
Only the internal shell parser is able to process an operator in the
middle of a command. For the other shells, the operator must appear in
the beginning of the line.
[SPIRV] fix `alloca` -> `OpVariable` lowering (#164175)
fixes #163777
Test was written with help from Copilot
---------
Co-authored-by: Juan Manuel Martinez Caamaño <jmartinezcaamao at gmail.com>
[libc] Fix detection of cfloat128 (#185486)
Building compiler-rt with aarch64-buildroot-linux-gnu-gcc 15.2 causes a
build error:
```
compiler-rt-22.1.0/cmake/Modules/../../libc/src/__support/CPP/type_traits/is_complex.h:44:31:
error: 'cfloat128' was not declared in this scope; did you mean 'float128'? [-Wtemplate-body]
```
According to
https://gcc.gnu.org/onlinedocs/gcc-15.2.0/gcc/Floating-Types.html
__float128 is not available on aarch64.
Analyzing the gcc defines for aarch64 seems to prove it:
```
$ aarch64-buildroot-linux-gnu-gcc -v
Target: aarch64-buildroot-linux-gnu
gcc version 15.2.0 (Buildroot 2026.02-114-gdadec9da56)
$ echo | aarch64-buildroot-linux-gnu-gcc -dM -E - | grep __GCC_IEC_559_COMPLEX
[26 lines not shown]