560930 Commits

Author SHA1 Message Date
David Green
e16cc8ed46
[AArch64] Guard for 128bit vectors in mull combine. (#169839)
The test case generates a extract_subvector(index) leading into a mul.
Make sure we don't try and treat the scalable vector extract as a 128bit
vector in the mull combine.

Fixes #168912
2025-11-28 12:06:17 +00:00
Paul Walker
b5a3b8b704
[LLVM][SVE] Remove aarch64.sve.rev intrinsic, using vector.reverse instead. (#169654) 2025-11-28 11:59:34 +00:00
Volodymyr Turanskyy
a6643f27ec
[libc++] Add support for picolibc and newlib in RUNTIMES_USE_LIBC (#147956)
This replaces detection of picolibc in libc++ (by checking for and
including picolibc.h) with using RUNTIMES_USE_LIBC build time option
intriduced in https://github.com/llvm/llvm-project/pull/134893
RUNTIMES_USE_LIBC is extended to accept picolibc and newlib.

Detection of picolibc via the header is kept as a deprecated feature to
avoid breaking builds.

libc++ is updated to use dedicated LIBCXX_LIBC_NEWLIB macro to check for
newlib specific conditions instead of less informative _NEWLIB_VERSION

---------

Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
2025-11-28 11:50:06 +00:00
Mehdi Amini
ae58ae1ca7 [MLIR] Apply clang-tidy fixes for misc-use-internal-linkage in CudaRuntimeWrappers.cpp (NFC) 2025-11-28 03:46:38 -08:00
Charles Zablit
fb3bf5b590
[NFC][lldb][windows] fully qualify references to MemoryRegionInfo (#169845) 2025-11-28 11:40:40 +00:00
David Green
0085ecaa5e
[AArch64] Add costs for ROTR and ROTL. (#169335)
A funnel shift with the first two operands is a rotate. AArch64 has
scalar instructions for ror so can handle a ROTR by a constant or
variant amount cheaply. A ROTL is a ROTR by the opposite amount, which
for constants is cheap and for variable shifts requires an extra neg.
2025-11-28 11:22:42 +00:00
Sebastian Pop
53ece548f8
[DA] Simplify runtime predicate collection (#157523)
Removes DependenceInfo::getRuntimeAssumptions(), DependenceInfo::Assumptions,
and the print of "Runtime Assumptions:". The runtime assumptions are still
properly attached to each Dependence result and printed as part of the
per-dependence output.
2025-11-28 06:19:55 -05:00
Antonio Frighetto
2f56977aea
[IndVarSimplify] Add regression test for recently-added refactor (NFC)
Add a test case for commit f54c6b4306a3f92c08aeb8a9fa222b88985cb9ef, which was previously failing after
refactor in b27af83120b32a4b8312ddf1e6317271122769e4.
2025-11-28 11:59:46 +01:00
A. Jiang
7415a7fc11
[libc++][NFC] Simplify SFINAE detections in weak_result_type.h (#169870)
For `__has_result_type`, it can be replaced with a variable template
`__has_result_type_v`. Note that the pre-existing extraneous `*` used in
detection is buggy, but it's a functional change to fix it.

`false_type` and `true_type` are no longer directly used, so direct
inclusion of `<__type_traits/integral_constant.h>` is removed.

For `__derives_from_{unary,binary}_function`, it's unnecessary to invent
a `__two` type for each specialization. So `void` is used instead. Also,
`nullptr` is now used instead of `0`.
2025-11-28 18:55:13 +08:00
Nikolas Klauser
1ab64e4d5f
[libc++][NFC] Simplify string.bench.cpp a bit (#169791)
This removes some dead code and simplifies an expression.
2025-11-28 11:41:45 +01:00
mitchell
4fd472c5c0
[clang-tidy][NFC] Fix option highlighting and list style in documentation (#169874)
The related discussion can be found at:
https://github.com/llvm/llvm-project/pull/168324#discussion_r2569455701
2025-11-28 18:41:20 +08:00
Carlos Galvez
e81d9dfba1
[clang-tidy][doc] Fix broken CppCoreGuidelines links (#169886)
They recently changed all their anchors to start with lowercase:
https://github.com/isocpp/CppCoreGuidelines/pull/2304

So now our links are broken :) This patch fixes them.

Co-authored-by: Carlos Gálvez <carlos.galvez@zenseact.com>
2025-11-28 11:39:58 +01:00
Simon Pilgrim
6c0d5aad7f
[X86] ExprConstant - correctly detect __builtin_ia32_ucmpw* builtins as unsigned comparisons (#169891)
Fixes typo from #164026
2025-11-28 10:36:58 +00:00
Matthias Springer
310211cce5
[mlir][UB] Add ub.unreachable operation (#169872)
Add `ub.unreachable` operation and lowerings to LLVM/SPIRV.

---------

Co-authored-by: Mehdi Amini <joker.eph@gmail.com>
2025-11-28 10:35:18 +00:00
Florian Hahn
b76089c7f3
[VPlan] Skip uses-scalars restriction if one of ops needs broadcast. (#168246)
Update the logic in narrowToSingleScalar to allow narrowing even if not
all users use scalars, if at least one of the operands already needs
broadcasting.

In that case, there won't be any additional broadcasts introduced. This
should allow removing the special handling for stores, which can
introduce additional broadcasts currently.

Fixes https://github.com/llvm/llvm-project/issues/169668.

PR: https://github.com/llvm/llvm-project/pull/168246
2025-11-28 10:26:27 +00:00
Benjamin Maxwell
135ddf1e8e
[AArch64][SVE] Add basic support for @llvm.masked.compressstore (#168350)
This patch adds SVE support for the `masked.compressstore` intrinsic via
the existing `VECTOR_COMPRESS` lowering and compressing the store mask
via `VECREDUCE_ADD`.

Currently, only `nxv4[i32|f32]` and `nxv2[i64|f64]` are directly
supported, with other types promoted to these, where possible.

This is done in preparation for LV support of this intrinsic, which is
currently being worked on in #140723.
2025-11-28 10:17:36 +00:00
Antonio Frighetto
f54c6b4306
[IndVarSimplify] Bail out if not a branch in maybeFloatingPointRecurrence
clang-riscv-gauntlet buildbot was previously failing. Conservatively
bail out if not handling a branch when looking for floating-point
recurrences, we may wish to support select and branch in the future.

Fixes: https://lab.llvm.org/buildbot/#/builders/210/builds/5908.
2025-11-28 11:07:38 +01:00
Kirill Vedernikov
a7c85052eb
[MLIR] Supported sparse MMA intrinsics in the MLIR->NVVM IR->NVPTX flow (#168686)
This change adds sparse MMA intrinsics to the MLIR -> NVVM IR -> NVPTX
flow. NVVM and NVPTX implementation is based on PTX ISA 9.0.
2025-11-28 15:33:32 +05:30
Miguel Saldivar
8bfca268ba
[flang] Support FLUSH as an intrinsic subroutine (#165942)
Previously `FLUSH` was only recognized in statement form (e.g.
`flush(unit)`); a
subroutine invocation `call flush(unit)` was treated as a generic user
call with
no special semantics. This change teaches lowering/semantics to handle
`CALL FLUSH` equivalently.

Fixes #119418
2025-11-28 09:40:27 +00:00
lbonn
3ebe99f4c2
[libcxx] Unwrap iterators in __find_segment (#161274)
The segmented iterator optimized implementation of find now unwraps
iterators when processing each segments.

As a result, it is able to take better advantage to some find
specializations: calling memchr/wmemchr for vector<vector<{char,int}>>

```
Benchmark                                                         Baseline    Candidate    Difference    % Difference
--------------------------------------------------------------  ----------  -----------  ------------  --------------
rng::find(join_view(deque<deque<int>>))_(process_all)/1024           71.13        61.19         -9.94          -13.97
rng::find(join_view(deque<deque<int>>))_(process_all)/32768        2359.19      2237.02       -122.17           -5.18
rng::find(join_view(deque<deque<int>>))_(process_all)/50             16.88        17.59          0.71            4.20
rng::find(join_view(deque<deque<int>>))_(process_all)/8              15.59        16.10          0.51            3.27
rng::find(join_view(deque<deque<int>>))_(process_all)/8192          647.01       532.75       -114.26          -17.66
rng::find(join_view(list<vector<int>>))_(process_all)/1024          689.76       680.74         -9.02           -1.31
rng::find(join_view(list<vector<int>>))_(process_all)/32768       22284.95     21500.26       -784.69           -3.52
rng::find(join_view(list<vector<int>>))_(process_all)/50             32.77        32.12         -0.65           -1.98
rng::find(join_view(list<vector<int>>))_(process_all)/8               6.11         5.92         -0.19           -3.11
rng::find(join_view(list<vector<int>>))_(process_all)/8192         5527.88      5373.43       -154.45           -2.79
rng::find(join_view(vector<list<int>>))_(process_all)/1024         1305.59      1264.04        -41.55           -3.18
rng::find(join_view(vector<list<int>>))_(process_all)/32768       42840.88     43322.64        481.76            1.12
rng::find(join_view(vector<list<int>>))_(process_all)/50             57.52        62.35          4.82            8.38
rng::find(join_view(vector<list<int>>))_(process_all)/8               6.06         5.98         -0.07           -1.18
rng::find(join_view(vector<list<int>>))_(process_all)/8192        20700.53     21431.66        731.12            3.53
rng::find(join_view(vector<vector<char>>))_(process_all)/1024       310.64        18.34       -292.30          -94.09
rng::find(join_view(vector<vector<char>>))_(process_all)/32768     9424.96       531.99      -8892.97          -94.36
rng::find(join_view(vector<vector<char>>))_(process_all)/50          18.58         3.25        -15.32          -82.49
rng::find(join_view(vector<vector<char>>))_(process_all)/8            4.81         2.98         -1.84          -38.13
rng::find(join_view(vector<vector<char>>))_(process_all)/8192      2437.50       126.88      -2310.62          -94.79
rng::find(join_view(vector<vector<int>>))_(process_all)/1024        297.10        41.70       -255.39          -85.96
rng::find(join_view(vector<vector<int>>))_(process_all)/32768      9662.42      1822.05      -7840.36          -81.14
rng::find(join_view(vector<vector<int>>))_(process_all)/50           22.29         5.10        -17.19          -77.11
rng::find(join_view(vector<vector<int>>))_(process_all)/8             3.73         3.13         -0.60          -16.05
rng::find(join_view(vector<vector<int>>))_(process_all)/8192       2399.68       356.10      -2043.58          -85.16
```
2025-11-28 10:13:21 +01:00
Gergely Bálint
9bffb10e8b
Revert "[BOLT][BTI] Skip inlining BasicBlocks containing indirect tailcalls" (#169881)
Reverts llvm/llvm-project#168403

The attached lit test is failing in some build configurations.
2025-11-28 10:10:53 +01:00
Nikolas Klauser
26b82e5b82
Revert "[libc++] Fix the locale base API on Linux with musl" (#169884)
The patch has been committed without approval from the libc++ review
group and is implementing the locale base API in a way it wasn't
intended to be implemented. The commit also contains a no-reply github
E-Mail, which is in conflict with the LLVM developer policy.

Reverts llvm/llvm-project#167980
2025-11-28 09:55:28 +01:00
Antonio Frighetto
b27af83120
[IndVarSimplify] Refactor handleFloatingPointIV, modernize pass (NFC)
`handleFloatingPointIV` is now abstracted out into different routines,
particularly:
- `maybeFloatingPointRecurrence` which establishes whether we handle a
  floating-point iv recurrence;
- `tryConvertToIntegerIV` which attempts to convert the fp start, step
  and exit values into integer ones;
- `canonicalizeToIntegerIV` which rewrites the recurrence.

Minor opportunity to modernize the code where possible.
2025-11-28 09:47:10 +01:00
Jack Styles
e5d229dc61
[Flang][OpenMP] Update OpenMPSupport docs (#169833)
After the merging of #152736, there are a number of OpenMP Features that
are now fully supported. Missing from the initial patch was changing the
status of this from `P` to `Y` to indicate they are now fully supported.
The notes around not supporting `dist_schedule` were removed in the
initial patch.
2025-11-28 08:46:25 +00:00
Ryan Cowan
cc9d3f29ec
[AArch64][GlobalISel] Improve lowering of vector fp16 fptrunc (#163398)
This commit improves the lowering of vectors of fp16 when truncating and
(previously) extending. Truncating has to be handled in a specific way
to avoid double rounding.
2025-11-28 08:32:25 +00:00
Prasoon Mishra
1cea4a0841
[AMDGPU][NPM] Fix CFG invalidation detection in insertSimulatedTrap (#169290)
When SIMULATED_TRAP is at the end of a block with no successors,
insertSimulatedTrap incorrectly returns the original MBB despite adding
HaltLoopBB to the CFG.

EmitInstrWithCustomInserter detects CFG changes by comparing the
returned MBB with the original. When they match, it assumes no
modification occurred and skips MachineLoopInfo invalidation. This
causes stale loop information in subsequent passes, particularly when
using the NPM which relies on accurate invalidation signals.

Fix: Return HaltLoopBB to properly signal the CFG modification.
2025-11-28 13:45:46 +05:30
Zhaoxin Yang
bd0769ef86
[LoongArch] Make rotl/rotr custom for lsx/lasx (#161154) 2025-11-28 15:28:19 +08:00
Carson Radtke
1e7efca659
[clang] fix crash when template with constructor attribute is instantiated without a priority (#169282)
fixes: https://github.com/llvm/llvm-project/issues/169072

The current implementation expects the priority argument to be provided
to `[[gnu::constructor(<priority>)]]`, but the argument is really
optional. This was causing a segfault when instantiating the
function-template because we were trying to fold an `Expr*` that was a
nullptr.

This change skips the evaluation of the priority argument when it is
missing; this will instantiate a function declaration with the default
priority (65535).
2025-11-28 15:26:43 +08:00
Mahesh-Attarde
1100917aed
[AMX][NFC] Organize tilerow (#168193)
Organizing tilerow for an extension.

---------

Co-authored-by: mattarde <mattarde@intel.com>
2025-11-28 15:02:47 +08:00
Sergei Barannikov
f342d793e2
[ARM] Auto-decode pred operands of Thumb instructions (#156540)
Most predicable Thumb instructions do not encode the predicate operand,
but rather take it from an enclosing IT block.
Add `bits<0> p` to the encoding of these instructions to make the
predicate operand decodable by the generated code.

The previous approach was to analyze an instruction after it has been
decoded and add missing predicate operand if necessary. The
post-decoding pass is still required to check predicate applicability
and advance IT block state, but it no longer modifies a decoded
instruction.

Some of the custom decoder methods have become redundant and can be
removed in the future, delegating the decoding task to TableGen-erated
decoder.

Pull Request: https://github.com/llvm/llvm-project/pull/156540
2025-11-28 06:08:38 +00:00
Shih-Po Hung
b9bdec3021
[TTI][Vectorize] Migrate masked/gather-scatter/strided/expand-compress costing (NFCI) (#165532)
In #160470, there is a discussion about the possibility to explored a
general approach for handling memory intrinsics.

API changes:
- Remove getMaskedMemoryOpCost, getGatherScatterOpCost,
getExpandCompressMemoryOpCost, getStridedMemoryOpCost from
Analysis/TargetTransformInfo.
- Add getMemIntrinsicInstrCost.

In BasicTTIImpl, map intrinsic IDs to existing target implementation
until the legacy TTI hooks are retired.
- masked_load/store → getMaskedMemoryOpCost
- masked_/vp_gather/scatter → getGatherScatterOpCost
- masked_expandload/compressstore → getExpandCompressMemoryOpCost
- experimental_vp_strided_{load,store} → getStridedMemoryOpCost
TODO: add support for vp_load_ff.

No functional change intended; costs continue to route to the same
target-specific hooks.
2025-11-28 05:14:37 +00:00
Shih-Po Hung
f40c694713
[TTI] Use MemIntrinsicCostAttributes for getExpandCompressMemoryOpCost (#168677)
- Following #168029. This is a step toward a unified interface for
masked/gather-scatter/strided/expand-compress cost modeling.
- Replace the ad-hoc parameter list with a single attributes object.

API change:
```
- InstructionCost getExpandCompressMemoryOpCost(Opcode, DataTy,
-                                               VariableMask, Alignment,
-                                               CostKind, Inst);

+ InstructionCost getExpandCompressMemoryOpCost(MemIntrinsicCostAttributes,
+                                               CostKind);
```

Notes:
- NFCI intended: callers populate MemIntrinsicCostAttributes with same
information as before.
2025-11-28 04:19:23 +00:00
Owen Anderson
0c6d7a4018
[LLD] Add support for statically resolved vendor-specific RISCV relocations. (#169273)
This is achieved by using some of the bits of RelType to tag vendor namespaces. This change also adds a relocation iterator for RISCV that folds vendor namespaces into the RelType of the following relocation.

This patch is extracted from the implementation of RISCV vendor-specific relocations in the CHERIoT LLVM downstream: 3d6d6f7d94
2025-11-27 21:34:07 -06:00
Matthias Springer
b14291238a
[mlir][arith] Fix arith.cmpf lowering with unsupported FP types (#166684)
The `arith.cmpf` lowering pattern used to generate invalid IR when an
unsupported floating-point type was used.
2025-11-28 03:01:14 +00:00
Zaky Hermawan
6f7ea34933
[QualGroup][docs] Update meeting schedule and link for slides (#169458)
Summary
======
This PR update the schedule for online sync-up and update link for past
meeting slides.

Changes
======
* Remove the wednesday schedule, since we did not have the meeting for
Americas-friendly timezones.
* Use a single folder for past meeting slides instead of individual
links.

Related Links
=========
* [Meeting materials for Qualification Working
Group](https://llvm.org/docs/QualGroup.html#meeting-materials)
* [Online
Sync-Ups](https://llvm.org/docs/GettingInvolved.html#online-sync-ups)

---------

Signed-off-by: ZakyHermawan <zaky.hermawan9615@gmail.com>
2025-11-28 10:54:51 +09:00
Mr. Walls
aa2a7f4eb1
[libc++] Fix the locale base API on Linux with musl (#167980)
This pull request addresses an issue encountered when building
**libcxx** with certain configurations (`-D_LIBCPP_HAS_MUSL_LIBC` &
`-D__linux__`) that lack the `_GNU_SOURCE` definition. Specifically,
this issue arises if the system **musl libc** is built with
`_BSD_SOURCE` instead of `_GNU_SOURCE`. The resultant configuration
leads to problems with the "Strtonum functions" in the file
[libcxx/include/__locale_dir/support/linux.h](https://github.com/llvm/llvm-project/tree/master/libcxx/include/__locale_dir/support/linux.h),
affecting the following functions:

- `__strtof`
- `__strtod`
- `__strtold`

**Error messages displayed include**:
```console
error: no member named 'strtof_l' in the global namespace
```
```console
error: no member named 'strtod_l' in the global namespace
```
```console
error: no member named 'strtold_l' in the global namespace
```

For more insight, relevant code can be accessed
[here](79cd1b7a25/libcxx/include/__locale_dir/support/linux.h (L85-L95)).
2025-11-28 09:14:05 +08:00
actink
583fba3524
[InstCombine] fold icmp of select with invertible shl (#147182)
Proof: https://alive2.llvm.org/ce/z/a5fzlJ
Closes https://github.com/llvm/llvm-project/issues/146642

---------

Co-authored-by: Yingwei Zheng <dtcxzyw@qq.com>
2025-11-28 08:54:47 +08:00
Deric C.
06c8ee61ab
[NFC] [DirectX] Make DirectX codegen test CBufferAccess/gep-ce-two-uses.ll more strict (#169855)
Continuation of PR #169848 to address PR comments.

This PR makes the test more strict by adding CHECKs to ensure the loads
are indeed using the same or different GEPs.
2025-11-27 13:58:47 -08:00
Florian Hahn
8459508227
[VPlan] Handle scalar VPWidenPointerInd in convertToConcreteRecipes. (#169338)
In some case, VPWidenPointerInductions become only used by scalars after
legalizeAndOptimizationInducftions was already run, for example due to
some VPlan optimizations.

Move the code to scalarize VPWidenPointerInductions to a helper and use
it if needed.

This fixes a crash after #148274 in the added test case.

Fixes https://github.com/llvm/llvm-project/issues/169780
2025-11-27 21:52:15 +00:00
owenca
07d14cb6d3
[clang-format][NFC] Remove the parameter of parseRequires...() (#169773) 2025-11-27 13:51:27 -08:00
Florian Hahn
8f36135aea
[VPlan] Add m_Intrinsic matcher that takes a variable intrinsic ID (NFC)
Add a variant of m_Intrinsic that matches a variable runtime ID.
2025-11-27 21:23:29 +00:00
Amr Hesham
2e655c23de
[CIR] Upstream TryCallOp (#165303)
Upstream TryCall Op as a prerequisite for Try Catch work

Issue https://github.com/llvm/llvm-project/issues/154992
2025-11-27 22:07:39 +01:00
Alexey Moksyakov
ad605bdad7
[bolt][aarch64] Change indirect call instrumentation snippet
Indirect call instrumentation snippet uses x16 register in exit
handler to go to destination target

    __bolt_instr_ind_call_handler_func:
            msr  nzcv, x1
            ldp  x0, x1, [sp], llvm#16
            ldr  x16, [sp], llvm#16
            ldp  x0, x1, [sp], llvm#16
            br   x16	<-----

This patch adds the instrumentation snippet by calling instrumentation
runtime library through indirect call instruction and adding the wrapper
to store/load target value and the register for original indirect instruction.

Example:
            mov x16, foo

    infirectCall:
            adrp x8, Label
            add  x8, x8, #:lo12:Label
            blr x8

Before:

    Instrumented indirect call:
            stp     x0, x1, [sp, #-16]!
            mov     x0, x8
            movk    x1, #0x0, lsl llvm#48
            movk    x1, #0x0, lsl llvm#32
            movk    x1, #0x0, lsl llvm#16
            movk    x1, #0x0
            stp     x0, x1, [sp, #-16]!
            adrp    x0, __bolt_instr_ind_call_handler_func
            add     x0, x0, #:lo12:__bolt_instr_ind_call_handler_func
            blr     x0

    __bolt_instr_ind_call_handler:  (exit snippet)
            msr     nzcv, x1
            ldp     x0, x1, [sp], llvm#16
            ldr     x16, [sp], llvm#16
            ldp     x0, x1, [sp], llvm#16
            br      x16    <- overwrites the original value in X16

    __bolt_instr_ind_call_handler_func:  (entry snippet)
            stp     x0, x1, [sp, #-16]!
            mrs     x1, nzcv
            adrp    x0, __bolt_instr_ind_call_handler
            add     x0, x0, x0, #:lo12:__bolt_instr_ind_call_handler
            ldr     x0, [x0]
            cmp     x0, #0x0
            b.eq    __bolt_instr_ind_call_handler
            str     x30, [sp, #-16]!
            blr     x0     <--- runtime lib store/load all regs
            ldr     x30, [sp], llvm#16
            b       __bolt_instr_ind_call_handler

_________________________________________________________________________

After:

            mov     x16, foo
    infirectCall:
            adrp    x8, Label
            add     x8, x8, #:lo12:Label
            blr     x8

    Instrumented indirect call:
            stp     x0, x1, [sp, #-16]!
            mov     x0, x8
            movk    x1, #0x0, lsl llvm#48
            movk    x1, #0x0, lsl llvm#32
            movk    x1, #0x0, lsl llvm#16
            movk    x1, #0x0
            stp     x0, x30, [sp, #-16]!
            adrp    x8, __bolt_instr_ind_call_handler_func
            add     x8, x8, #:lo12:__bolt_instr_ind_call_handler_func
            blr     x8       <--- call trampoline instr lib
            ldp     x0, x30, [sp], llvm#16
            mov     x8, x0   <---- restore original target
            ldp     x0, x1, [sp], llvm#16
            blr     x8       <--- original indirect call instruction

    // don't touch regs besides x0, x1
    __bolt_instr_ind_call_handler:  (exit snippet)
            ret     <---- return to original function with indirect call

    __bolt_instr_ind_call_handler_func: (entry snippet)
            adrp    x0, __bolt_instr_ind_call_handler
            add     x0, x0, #:lo12:__bolt_instr_ind_call_handler
            ldr     x0, [x0]
            cmp     x0, #0x0
            b.eq    __bolt_instr_ind_call_handler
            str     x30, [sp, #-16]!
            blr     x0     <--- runtime lib store/load all regs
            ldr     x30, [sp], llvm#16
            b       __bolt_instr_ind_call_handler
2025-11-27 23:48:10 +03:00
Lei Huang
d39f5243f8
[PowerPC] Implement paddis (#161572) 2025-11-27 15:22:00 -05:00
Deric C.
a1f30c24ea
[NFC] [DirectX] Update DirectX codegen test CBufferAccess/gep-ce-two-uses.ll due to changes to ReplaceConstant (#169848)
Fixes an LLVM DirectX codegen test after it broke due to #169141

The CBuffer loads and GEPs are no longer duplicated when there are two
or more accesses within the same basic block.
This PR removes the duplicate check for CBuffer load and GEP from the
original test function `@f` and adds a new test function `@g` which
places duplicate CBuffer loads into separate basic blocks.
2025-11-27 12:02:15 -08:00
Lukas Döllerer
965c3d760d
[lld][WebAssembly] Fix SEGFAULT when importing wrapped symbol (#169656)
When wrapping a symbol `foo` via `-wrap=foo`, we create the symbol
`__wrap_foo` that replaces all mentions of `foo`. This feature was
implemented for wasm-ld in commit a5ca34e.

So far, no valid signature has been attached to the undefined symbol,
leading to a nullptr dereference in the logic for creating the import
section. This change adds the correct signature to the wrapped symbol,
enabling the generation of an import for it.
2025-11-27 19:21:09 +00:00
Benjamin Maxwell
ee45ba2ff4
[AArch64] Use SVE for fixed-length bf16 operations with +sve-b16b16 (#169329)
This can avoid the promotion bf16 -> f32 -> bf16 round trip (or costly
expansions).
2025-11-27 19:18:00 +00:00
clf
1b7ae0b673
[AArch64] Use umin for x != 0 when +cssc is enabled (#169159)
Closes https://github.com/llvm/llvm-project/issues/161584
2025-11-27 19:17:00 +00:00
Alex Bradbury
fd19a20a1a
Revert "[ShrinkWrap] Modify shrink wrapping to accommodate functions terminated by no-return blocks" (#169852)
Reverts llvm/llvm-project#167548

As commented at
https://github.com/llvm/llvm-project/pull/167548#issuecomment-3587008602
this is causing miscompiles in two-stage RISC-V Clang/LLVM builds that
result in test failures on the builders.
2025-11-27 19:12:56 +00:00
Ingo Müller
03c8624292
[clang:ast] Avoid warning for unused var without assertions. (NFC) (#169822)
This PR avoids a compiler warning, which turns into an error with
`-Werror`, for a variable introduced in #169276 and only used in an
assertion (which is, thus, unused if compiled without assertions).

Signed-off-by: Ingo Müller <ingomueller@google.com>
Co-authored-by: Simon Pilgrim <llvm-dev@redking.me.uk>
2025-11-27 20:01:05 +01:00