117375 Commits

Author SHA1 Message Date
Andy Kaylor
c5466c64d4
[CIR] Add CIR vtable attribute (#154415)
This adds the #cir.vtable attribute definition and verification.
Generation of the vtable will be implemented in a later change.
2025-08-21 09:52:14 -07:00
7mile
761125f267
[CIR][Dialect] Add SourceLangAttr (#152511)
This patch upstreams `SourceLangAttr` and its CodeGen logic in the CGM,
which encodes the source language in CIR.
2025-08-21 09:51:37 -07:00
Shafik Yaghmour
436f391d1d
[Clang][Codegen][NFC] Apply rule of three to some classes (#154671)
Static analysis flagged these classes as having implemented the
destructor but not applying rule of three. This could lead to accidental
misuse and so it makes sense to apply it.
2025-08-21 09:36:25 -07:00
Andres-Salamanca
fc62990657
[CIR] Upstream GotoSolver pass (#154596)
This PR upstreams the GotoSolver pass.  
It works by walking the function and matching each label to a goto. If a
label is not matched to a goto, it is removed and not lowered.
2025-08-21 11:02:29 -05:00
Timm Baeder
3923adfa3f
[clang][bytecode] Guard strcmp against differing element types (#154777)
This can happen when casts are involved.

Fixes #154006
2025-08-21 18:02:08 +02:00
Steven Perron
a53e73e6ef
[SPIRV][HLSL] Add DXC compatibility option for extension (#151554)
The default behaviour in DXC is to allow all extesions the compiler
knows about. We did the same in clang: all extensions that clang knows
about. However, this causes the shader to use different extensions
because the two compilers have different sets of extensions.

To avoid using a new extension when moving from DXC to Clang, we add the
special DXC suboptions to `-fspv-extension`. If `-fspv-extension=DXC` is
used, then the available extensions will be those available in DXC.

---------

Co-authored-by: Chris B <beanz@abolishcrlf.org>
2025-08-21 14:43:29 +00:00
Timm Baeder
3f97736181
[clang][bytecode] Implement ia32_select* builtins (#154758) 2025-08-21 16:34:57 +02:00
Aaron Ballman
17eb05ddd3
Revert "[C++] Expose nullptr_t from stddef.h in C++ mode" (#154767)
Reverts llvm/llvm-project#154599

It seems to be causing staging failures:
    https://lab.llvm.org/staging/#/builders/192/builds/1329
    https://lab.llvm.org/staging/#/builders/192/builds/1330
2025-08-21 10:05:41 -04:00
Aaron Ballman
7d167f4564
[C++] Expose nullptr_t from stddef.h in C++ mode (#154599)
The C++ standard requires stddef.h to declare all of its contents in the
global namespace. We were only doing it when trying to be compatible
with Microsoft extensions. Now we expose in C++11 or later, in addition
to exposing it in Microsoft extensions mode.

Fixes #154577
2025-08-21 09:11:41 -04:00
Timm Baeder
f09ac1bf86
[clang][bytecode] Fix an out-of-bounds access with ia32_pmul* (#154750)
... builtins. We used to access the I'th index of the output vector, but
that doesn't work since the output vector is only half the size of the
input vector.
2025-08-21 15:09:08 +02:00
Aaron Ballman
a33e505c1a
[C99] Update documentation for scope of variables in loops; NFC (#154744)
I tracked down the document which changed the way variables are handled
in for loops for C99, it was the same document that allowed mixing code
and declarations but the editor's report made it seem like the features
came from different papers.

This is an extension we backported to C89 but it's sufficiently distinct
in the tracking page so I've added it explicitly to the backported
features documentation.
2025-08-21 12:46:57 +00:00
Timm Baeder
2ea5ec78db
[clang][bytecode] Fix a crash in Destroy op (#154695)
The local we're destroying might've been created for an expression, in
which case asDecl() on the DeclDesc returns nullptr.

Fixes #152958
2025-08-21 13:23:57 +02:00
Timm Baeder
c9bb3bdbca
[clang][bytecode] Fix a crash with typeid pointers (#154692)
That code is from a time when typeid pointers didn't exist. We can get
there for non-block, non-integral pointers, but we can't meaningfully
handle that case. Just return false.

Fixes #153712
2025-08-21 13:13:02 +02:00
Timm Baeder
21bd3a7fa8
[clang][bytecode] Check for unknown size array pointers in InitField* (#154689)
This can happen when the base pointer is an unknown size array, where
!isOnePastEnd(), but isPastEnd().

Fixes #153990
2025-08-21 13:01:45 +02:00
macurtis-amd
0c480dd4b6
[clang][CodeGen] cast addr space of ReturnValue if needed (#154380)
Fixes a bug on AMDGPU targets where a pointer was stored as address
space 5, but then loaded as address space 0.

Issue found as part of [Kokkos](https://github.com/kokkos/kokkos)
testing, specifically `hip.atomics` (see
[core/unit_test/TestAtomics.hpp](https://github.com/kokkos/kokkos/blob/develop/core/unit_test/TestAtomics.hpp)).

Issue was introduced by commit
[39ec9de7c230](https://github.com/llvm/llvm-project/commit/39ec9de7c230)
- [clang][CodeGen] sret args should always point to the alloca AS, so
use that (https://github.com/llvm/llvm-project/pull/114062).
2025-08-21 04:38:55 -05:00
Simon Pilgrim
4da69721f9 [X86] test_mm512_mask_fmadd_ps - add missing select checks 2025-08-21 10:27:06 +01:00
Ilya Biryukov
26d4e56be8 [Clang] Fix dedup-types-builtin.cpp test when -std=c++20
It was previously failing because of a warning marking a C++20 feature
as an extension.

This is a follow-up to 85043c1c146fd5658ad4c5b5138e58994333e645 that
introduced the test.
2025-08-21 11:05:02 +02:00
Michael Buch
f2aedc21f9
[clang][DebugInfo][test] Move debug-info tests from CodeGenCXX to DebugInfo directory (#154538)
This patch works towards consolidating all Clang debug-info into the
`clang/test/DebugInfo` directory
(https://discourse.llvm.org/t/clang-test-location-of-clang-debug-info-tests/87958).

Here we move only the `clang/test/CodeGenCXX` tests. I created a `CXX`
subdirectory for now because many of the tests I checked actually did
seem C++-specific. There is probably overlap between the `Generic` and
`CXX` subdirectory, but I haven't gone through and audited them all.

The list of files i came up with is:
1. searched for anything with `*debug-info*` in the filename
2. searched for occurrences of `debug-info-kind` in the tests

There's a couple of tests in `clang/test/CodeGenCXX` that still set
`-debug-info-kind`. They probably don't need to do that, but I'm not
changing that as part of this PR.
2025-08-21 09:26:08 +01:00
Simon Pilgrim
e4b110ab9f
[Headers][X86] Allow FMA3/FMA4 vector intrinsics to be used in constexpr (#154558)
Now that #152455 is done, we can make all the vector fma intrinsics that wrap __builtin_elementwise_fma to be constexpr

Fixes #154555
2025-08-21 09:09:40 +01:00
Mythreya Kuricheti
0977a6d9e7
[clang][CodeComplete] Consider qualifiers of explicit object parameters in overload suggestions (#154041)
Fixes https://github.com/llvm/llvm-project/issues/109608
2025-08-21 02:32:41 -04:00
Timm Baeder
e0acf6592b
[clang][bytecode] Call CheckFinalLoad in all language modes (#154496)
Fixes #153997
2025-08-21 08:24:09 +02:00
Carlos Galvez
3baddbbb0a
Do not trigger -Wmissing-noreturn on lambdas prior to C++23 (#154545)
Fixes #154493

Co-authored-by: Carlos Gálvez <carlos.galvez@zenseact.com>
2025-08-21 07:30:57 +02:00
Sirui Mu
91569fa030
[CIR][NFC] Use Op::create to create CIR operations in CIRGenBuilder (#154540) 2025-08-21 09:46:45 +08:00
Craig Topper
8cb6bfe05a [RISCV] Reduce ManualCodeGen for RVV intrinsics with rounding mode. NFC
Operate directly on the existing Ops vector instead of copying to
a new vector. This is similar to what the autogenerated codegen
does for other intrinsics.
2025-08-20 17:53:46 -07:00
Craig Topper
ac8f0bb070 [RISCV] Reduce ManualCodeGen for segment load/store intrinsics. NFC
Operate directly on the existing Ops vector instead of copying to
a new vector. This is similar to what the autogenerated codegen
does for other intrinsics.

This reduced the clang binary size by ~96kb on my local Release+Asserts
build.
2025-08-20 15:02:24 -07:00
Alan Zhao
904b4f5a27
[clang][timers][modules] Fix a timer being started when it's running (#154231)
`ASTReader::FinishedDeserializing()` calls
`adjustDeductedFunctionResultType(...)` [0], which in turn calls
`FunctionDecl::getMostRecentDecl()`[1]. In modules builds,
`getMostRecentDecl()` may reach out to the `ASTReader` and start
deserializing again. Starting deserialization starts `ReadTimer`;
however, `FinishedDeserializing()` doesn't call `stopTimer()` until
after it's call to `adjustDeductedFunctionResultType(...)` [2]. As a
result, we hit an assert checking that we don't start an already started
timer [3]. To fix this, we simply don't start the timer if it's already
running.

Unfortunately I don't have a test case for this yet as modules builds
are notoriously difficult to reduce.

[0]:
4d2288d318/clang/lib/Serialization/ASTReader.cpp (L11053)
[1]:
4d2288d318/clang/lib/AST/ASTContext.cpp (L3804)
[2]:
4d2288d318/clang/lib/Serialization/ASTReader.cpp (L11065-L11066)
[3]:
4d2288d318/llvm/lib/Support/Timer.cpp (L150)
2025-08-20 21:53:43 +00:00
Andy Kaylor
59b33242af
[CIR][NFC] Fix warning in MemOrder lowering (#154609)
This fixes a warning about having a default case in a fully covered enum
switch statement.
2025-08-20 14:30:22 -07:00
Isaac Nudelman
c6fa115b2d
[clang][analyzer] Relax assertion for non-default address spaces in the cstring checker (#153498)
Prevent an assertion failure in the cstring checker when library
functions like memcpy are defined with non-default address spaces.

Adds a test for this case.
2025-08-20 16:07:54 -05:00
Shafik Yaghmour
2a66ce5edb
[Clang][NFC] Clarify some SourceManager related code (#153527)
Static analysis flagged the columns - 1 code, it was correct but the
assumption was not obvious. I document the assumption w/ assertions.

While digging through related code I found getColumnNumber that looks
wrong at first inspection and adding parentheses makes it clearer.
2025-08-20 13:57:37 -07:00
Matheus Izvekov
e1dbe093c4
[clang] build UnresolvedUsingType for constructor initializers (#154592)
When building the base type for constructor initializer, the case of an
UnresolvedUsingType was not being handled.

For the non-dependent case, we are also skipping adding the UsingType,
but this is just missing information in the AST. A FIXME for this is
added.

This fixes a regression introduced in #147835, which was never released,
so there are no release notes.

Fixes #154436
2025-08-20 16:24:41 -03:00
Tom Honermann
8ed9c6101f
[NFC] Remove unneeded forward declaration of diagnoseUncapturableValueReferenceOrBinding() (#154591)
The only (remaining) use of this forward declaration was removed in
commit 127bf44385424891eb04cff8e52d3f157fc2cb7c.
2025-08-20 14:57:53 -04:00
Joseph Huber
9888f0c3c4
[Clang] Add builtins for masked vector loads / stores (#154464)
Summary:
Clang has support for boolean vectors, these builtins expose the LLVM
instruction of the same name. This differs from a manual load and select
by potentially suppressing traps from deactivated lanes.

Fixes: https://github.com/llvm/llvm-project/issues/107753
2025-08-20 13:33:32 -05:00
Joseph Huber
2f6b747997
[Clang] Add queryable feature 'ext_vector_type_boolean' for SIMD masks (#154227)
Summary:
We added boolean vectors in clang 15 and wish to extend them further in
clang-22. However, there's no way to query for their support as they are
separate to the normal extended vector type. This adds a feature so we
can check for it as a feature directly.
2025-08-20 13:33:02 -05:00
Alexandre Ganea
410a1341b5 [clang][bytecode] Silence unused variable warning 2025-08-20 14:10:05 -04:00
Yitzhak Mandelbaum
2be52f309e
[clang][dataflow] Fix uninitialized memory bug. (#154575)
Commit #3ecfc03 introduced a bug involving an uninitialized field in
`exportLogicalContext`. This patch initializes the field properly.
2025-08-20 13:36:42 -04:00
Kazu Hirata
65de318d18 [Sema] Fix a warning
This patch fixes:

  clang/lib/Sema/SemaTemplateVariadic.cpp:1069:22: error: variable
  'TST' set but not used [-Werror,-Wunused-but-set-variable]
2025-08-20 09:56:27 -07:00
David Tenty
63195d3d7a
[NFC][CMake] quote ${CMAKE_SYSTEM_NAME} consistently (#154537)
A CMake change included in CMake 4.0 makes `AIX` into a variable
(similar to `APPLE`, etc.)
ff03db6657

However, `${CMAKE_SYSTEM_NAME}` unfortunately also expands exactly to
`AIX` and `if` auto-expands variable names in CMake. That means you get
a double expansion if you write:

`if (${CMAKE_SYSTEM_NAME}  MATCHES "AIX")`
which becomes:
`if (AIX  MATCHES "AIX")`
which is as if you wrote:
`if (ON MATCHES "AIX")`

You can prevent this by quoting the expansion of "${CMAKE_SYSTEM_NAME}",
due to policy
[CMP0054](https://cmake.org/cmake/help/latest/policy/CMP0054.html#policy:CMP0054)
which is on by default in 4.0+. Most of the LLVM CMake already does
this, but this PR fixes the remaining cases where we do not.
2025-08-20 12:45:41 -04:00
schittir
fdfcebb38d
[clang][SYCL] Add sycl_external attribute and restrict emitting device code (#140282)
This patch is part of the upstreaming effort for supporting SYCL
language front end.
It makes the following changes:
1. Adds sycl_external attribute for functions with external linkage,
which is intended for use to implement the SYCL_EXTERNAL macro as
specified by the SYCL 2020 specification
2. Adds checks to avoid emitting device code when sycl_external and
sycl_kernel_entry_point attributes are not enabled
3. Fixes test failures caused by the above changes

This patch is missing diagnostics for the following diagnostics listed
in the SYCL 2020 specification's section 5.10.1, which will be addressed
in a subsequent PR:
Functions that are declared using SYCL_EXTERNAL have the following
additional restrictions beyond those imposed on other device functions:
1. If the SYCL backend does not support the generic address space then
the function cannot use raw pointers as parameter or return types.
Explicit pointer classes must be used instead;
2. The function cannot call group::parallel_for_work_item;
3. The function cannot be called from a parallel_for_work_group scope.

In addition to that, the subsequent PR will also implement diagnostics
for inline functions including virtual functions defined as inline.

---------

Co-authored-by: Mariya Podchishchaeva <mariya.podchishchaeva@intel.com>
2025-08-20 12:37:37 -04:00
Ilya Biryukov
85043c1c14
[Clang] Add a builtin that deduplicate types into a pack (#106730)
The new builtin `__builtin_dedup_pack` removes duplicates from list of
types.

The added builtin is special in that they produce an unexpanded pack
in the spirit of P3115R0 proposal.

Produced packs can be used directly in template argument lists and get
immediately expanded as soon as results of the computation are
available.

It allows to easily combine them, e.g.:

```cpp
template <class ...T>
struct Normalize {
  // Note: sort is not included in this PR, it illustrates the idea.
  using result = std::tuple<
    __builtin_sort_pack<
      __builtin_dedup_pack<int, double, T...>...
    >...>;
}
;
```

Limitations:
- only supported in template arguments and bases,
- can only be used inside the templates, even if non-dependent,
- the builtins cannot be assigned to template template parameters.

The actual implementation proceeds as follows:
- When the compiler encounters a `__builtin_dedup_pack` or other
type-producing
  builtin with dependent arguments, it creates a dependent
  `TemplateSpecializationType`.
- During substitution, if the template arguments are non-dependent, we
  will produce: a new type `SubstBuiltinTemplatePackType`, which stores
  an argument pack that needs to be substituted. This type is similar to
  the existing `SubstTemplateParmPack` in that it carries the argument
  pack that needs to be expanded further. The relevant code is shared.
- On top of that, Clang also wraps the resulting type into
  `TemplateSpecializationType`, but this time only as a sugar.
- To actually expand those packs, we collect the produced
  `SubstBuiltinTemplatePackType` inside `CollectUnexpandedPacks`.
  Because we know the size of the produces packs only after the initial
  substitution, places that do the actual expansion will need to have a
  second run over the substituted type to finalize the expansions (in
  this patch we only support this for template arguments, see
  `ExpandTemplateArgument`).

If the expansion are requested in the places we do not currently
support, we will produce an error.

More follow-up work will be needed to fully shape this:
- adding the builtin that sorts types,
- remove the restrictions for expansions,
- implementing P3115R0 (scheduled for C++29, see
  https://github.com/cplusplus/papers/issues/2300).
2025-08-20 18:11:36 +02:00
Kazu Hirata
f487c0e63c [AST] Fix warnings
This patch fixes:

  clang/lib/AST/ByteCode/InterpBuiltin.cpp:1827:21: error: unused
  variable 'ASTCtx' [-Werror,-Wunused-variable]

  clang/lib/AST/ByteCode/InterpBuiltin.cpp:2724:18: error: unused
  variable 'Arg2Type' [-Werror,-Wunused-variable]

  clang/lib/AST/ByteCode/InterpBuiltin.cpp:2725:18: error: unused
  variable 'Arg3Type' [-Werror,-Wunused-variable]

  clang/lib/AST/ByteCode/InterpBuiltin.cpp:2748:18: error: unused
  variable 'ElemT' [-Werror,-Wunused-variable]
2025-08-20 08:58:59 -07:00
Yanzuo Liu
a6da68ed36
[Clang][ASTMatchers] Make hasConditionVariableStatement support for loop, while loop and switch statements (#154298)
Co-authored-by: Aaron Ballman <aaron@aaronballman.com>
2025-08-20 23:57:30 +08:00
Samira Bakon
ffe21f1cd7
[clang][dataflow] Transfer more cast expressions. (#153066)
Transfer all casts by kind as we currently do implicit casts. This
obviates the need for specific handling of static casts.

Also transfer CK_BaseToDerived and CK_DerivedToBase and add tests for
these and missing tests for already-handled cast types.

Ensure that CK_BaseToDerived casts result in modeling of the fields of the derived class.
2025-08-20 11:40:06 -04:00
erichkeane
30fcf69845 [OpenACC] Fixup rules for reduction clause variable refererence type
The standard is ambiguous, but we can only support
arrays/array-sections/etc of the composite type, so make sure we enforce
the rule that way. This will better support  how we need to do lowering.
2025-08-20 07:55:16 -07:00
halbi2
2f237670b1
[Clang] [Sema] Enable nodiscard warnings for function pointers (#154250)
A call through a function pointer has no associated FunctionDecl, but it
still might have a nodiscard return type. Ensure there is a codepath to
emit the nodiscard warning in this case.

Fixes #142453
2025-08-20 14:14:35 +00:00
Anutosh Bhat
ea634fef56
[clang-repl] Fix InstantiateTemplate & Value test while building against emscripten (#154513)
Building with assertions flag (-sAssertions=2) gives me these 

```
[ RUN ] InterpreterTest.InstantiateTemplate Aborted(Assertion failed: undefined symbol '__clang_Interpreter_SetValueWithAlloc'. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment) Error in loading dynamic library incr_module_3.wasm: RuntimeError: Aborted(Assertion failed: undefined symbol '__clang_Interpreter_SetValueWithAlloc'. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment) Could not load dynamic lib: incr_module_3.wasm RuntimeError: Aborted(Assertion failed: undefined symbol '__clang_Interpreter_SetValueWithAlloc'. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment)
[ RUN ] InterpreterTest.InstantiateTemplate Aborted(Assertion failed: undefined symbol '__clang_Interpreter_SetValueNoAlloc'. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment) Error in loading dynamic library incr_module_3.wasm: RuntimeError: Aborted(Assertion failed: undefined symbol '__clang_Interpreter_SetValueNoAlloc'. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment) Could not load dynamic lib: incr_module_3.wasm RuntimeError: Aborted(Assertion failed: undefined symbol '__clang_Interpreter_SetValueNoAlloc'. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment)
[ RUN ] InterpreterTest.InstantiateTemplate Aborted(Assertion failed: undefined symbol '_ZnwmPv26__clang_Interpreter_NewTag'. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment) Error in loading dynamic library incr_module_23.wasm: RuntimeError: Aborted(Assertion failed: undefined symbol '_ZnwmPv26__clang_Interpreter_NewTag'. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment) Could not load dynamic lib: incr_module_23.wasm RuntimeError: Aborted(Assertion failed: undefined symbol '_ZnwmPv26__clang_Interpreter_NewTag'. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment)
[ RUN ] InterpreterTest.Value Aborted(Assertion failed: undefined symbol '_Z9getGlobalv'. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment) Error in loading dynamic library incr_module_36.wasm: RuntimeError: Aborted(Assertion failed: undefined symbol '_Z9getGlobalv'. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment) Could not load dynamic lib: incr_module_36.wasm
[ RUN ] InterpreterTest.Value Aborted(Assertion failed: undefined symbol '_Z9getGlobalv'. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment) Error in loading dynamic library incr_module_36.wasm: RuntimeError: Aborted(Assertion failed: undefined symbol '_Z9setGlobali'. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment) Could not load dynamic lib: incr_module_36.wasm
```

**So we have some symbols missing here that are needed by the side
modules being created here.**

First 2 are needed by both tests 
Last 3 are needed for these lines accordingly in the Value test.


dc23869f98/clang/unittests/Interpreter/InterpreterTest.cpp (L355)

dc23869f98/clang/unittests/Interpreter/InterpreterTest.cpp (L364)

dc23869f98/clang/unittests/Interpreter/InterpreterTest.cpp (L365)

Everything should work as expected after this 
```
[----------] 9 tests from InterpreterTest
[ RUN      ] InterpreterTest.Sanity
[       OK ] InterpreterTest.Sanity (18 ms)
[ RUN      ] InterpreterTest.IncrementalInputTopLevelDecls
[       OK ] InterpreterTest.IncrementalInputTopLevelDecls (45 ms)
[ RUN      ] InterpreterTest.Errors
[       OK ] InterpreterTest.Errors (29 ms)
[ RUN      ] InterpreterTest.DeclsAndStatements
[       OK ] InterpreterTest.DeclsAndStatements (34 ms)
[ RUN      ] InterpreterTest.UndoCommand
/Users/anutosh491/work/llvm-project/clang/unittests/Interpreter/InterpreterTest.cpp:156: Skipped
Test fails for Emscipten builds

[  SKIPPED ] InterpreterTest.UndoCommand (0 ms)
[ RUN      ] InterpreterTest.FindMangledNameSymbol
[       OK ] InterpreterTest.FindMangledNameSymbol (85 ms)
[ RUN      ] InterpreterTest.InstantiateTemplate
[       OK ] InterpreterTest.InstantiateTemplate (127 ms)
[ RUN      ] InterpreterTest.Value
[       OK ] InterpreterTest.Value (608 ms)
[ RUN      ] InterpreterTest.TranslationUnit_CanonicalDecl
[       OK ] InterpreterTest.TranslationUnit_CanonicalDecl (64 ms)
[----------] 9 tests from InterpreterTest (1014 ms total)
```

This is similar to how we need to take care of some symbols while
building side modules during running cppinterop's test suite !
2025-08-20 14:14:19 +00:00
Chaitanya Koparkar
f649605bcf
[clang] Enable constexpr handling for __builtin_elementwise_fma (#152919)
Fixes https://github.com/llvm/llvm-project/issues/152455.
2025-08-20 14:51:40 +01:00
Sirui Mu
318b0dda7c
[CIR] Add atomic load and store operations (#153814)
This patch adds support for atomic loads and stores. Specifically, it
adds support for the following intrinsic calls:

- `__atomic_load` and `__atomic_store`;
- `__c11_atomic_load` and `__c11_atomic_store`.
2025-08-20 21:49:04 +08:00
Qihan Cai
5f0515debd
[RISCV] Support Remaining P Extension Instructions for RV32/64 (#150379)
This patch implements pages 15-17 from
jhauser.us/RISCV/ext-P/RVP-instrEncodings-015.pdf

Documentation:
jhauser.us/RISCV/ext-P/RVP-baseInstrs-014.pdf
jhauser.us/RISCV/ext-P/RVP-instrEncodings-015.pdf
2025-08-20 22:54:07 +10:00
Joseph Huber
5a929a4249
[Clang] Support using boolean vectors in ternary operators (#154145)
Summary:
It's extremely common to conditionally blend two vectors. Previously
this was done with mask registers, which is what the normal ternary code
generation does when used on a vector. However, since Clang 15 we have
supported boolean vector types in the compiler. These are useful in
general for checking the mask registers, but are currently limited
because they do not map to an LLVM-IR select instruction.

This patch simply relaxes these checks, which are technically forbidden
by
the OpenCL standard. However, general vector support should be able to
handle these. We already support this for Arm SVE types, so this should
be make more consistent with the clang vector type.
2025-08-20 07:49:26 -05:00
Morris Hafner
b01f05977c
[CIR] Add support for string literal lvalues in ConstantLValueEmitter (#154514) 2025-08-20 13:30:21 +02:00