546419 Commits

Author SHA1 Message Date
Pierre van Houtryve
2ad4e93ded
[AMDGPU][gfx1250] Use SCOPE_SE for stores that may hit scratch (#150586) 2025-07-28 11:40:56 +02:00
Luke Lau
d4f9c11e06 [RISCV][LV] Use predicate-else-scalar-epilogue flag in tail folding tests. NFC
Align the tests closer with what we eventually intend to enable by
default on RISC-V by using
-prefer-predicate-over-epilogue=predicate-else-scalar-epilogue, instead
of dropping vectorization entirely with predicate-dont-vectorize.

Also adjust the non-EVL run lines so that they use
-prefer-predicate-over-epilogue=scalar-epilogue instead of
-force-tail-folding-style=none, so we're only using testing one type of
flag instead of a combination of two.
2025-07-28 17:04:00 +08:00
Yi-Chi Lee
fdd7f9c61b
[mlir][tosa] Allow scalar int8 tensors to be unranked (#150731)
This PR fixes #150519
2025-07-28 10:03:35 +01:00
lonely eagle
2adbf9e92b
[mlir][memref] Support test-compose-subview dynamic size (#146881)
Supports the case where the sizes of the subview op is dynamic.When
there are more for loops in the tile algorithm, multiple subviews are
performed and test-compose-subview does not work when the size operand
of the subview ops is dynamic value.
2025-07-28 16:58:45 +08:00
Oleksandr "Alex" Zinenko
d532d58974
[mlir] Nominate MLIR Egress category maintainers (#149487)
This is a nomination for the maintainers of the egress category within
MLIR as proposed in
https://discourse.llvm.org/t/mlir-project-maintainers/87189. As agreed
in the Project Council meeting on July 17, we are proceeding with
category nominations without waiting for lead maintainers to be
nominated.
2025-07-28 10:41:52 +02:00
Florian Hahn
cad5328b00
[X86] Add late tail duplication tests with computed gotos.
Add a new test for post-regalloc tail duplication with computed gotos to
complement llvm/test/CodeGen/X86/tail-dup-computed-goto.mir.
2025-07-28 09:37:16 +01:00
Nikita Popov
525090e83c
Revert "[MIPS]Fix QNaNs in the MIPS legacy NaN encodings" (#150773)
Reverts llvm/llvm-project#139829.

We can't just randomly change the value of constants during lowering.

Fixes https://github.com/llvm/llvm-project/issues/149295.
2025-07-28 10:36:40 +02:00
Matt Arsenault
44ff1ed16e
AMDGPU: Move getMaxNumVectorRegs into GCNSubtarget (NFC) (#150889)
Addresses a TODO
2025-07-28 17:25:20 +09:00
Haohai Wen
41f333250b
[LLD][COFF] Discard .llvmbc and .llvmcmd sections (#150897)
Those sections are generated by -fembed-bitcode and do not need to be
kept in executable files.
2025-07-28 16:17:26 +08:00
Matt Arsenault
72b77c193f
AMDGPU: Avoid contraction in wwm allocation failure message (#150888) 2025-07-28 17:11:28 +09:00
Luke Lau
ddb12c10a9 [RISCV][LV] Remove redundant -force-tail-folding-style from tests. NFC
This isn't needed after we set the tail folding style to data-with-evl
via TTI in #148686.  Also rename the tests to reflect the fact they're
no longer forcing the tail folding style.
2025-07-28 16:11:01 +08:00
Oleksandr "Alex" Zinenko
ac4c13d0d8
[mlir] Nominate Tensor Compiler maintainers (#149488)
This is a nomination for the maintainers of the tensor compiler category
within MLIR as proposed in
https://discourse.llvm.org/t/mlir-project-maintainers/87189. As agreed
in the Project Council meeting on July 17, we are proceeding with
category nominations without waiting for lead maintainers to be
nominated.
2025-07-28 10:01:29 +02:00
Andrzej Warzyński
f529c0b56f
[mlir][linalg][nfc] Clean-up leftover code post #149156 (#150602)
In https://github.com/llvm/llvm-project/pull/149156, I ensured that we
no longer generate spurious `tensor.empty` ops when vectorizing
`linalg.unpack`.

This follow-up removes leftover code that is now redundant but was
missed in the original PR.
2025-07-28 09:00:19 +01:00
Oleksandr "Alex" Zinenko
a87fb3b60f
[mlir] Nominate MLIR Core category maintainers (#149485)
This is a nomination for the maintainers of the core category within
MLIR as proposed in
https://discourse.llvm.org/t/mlir-project-maintainers/87189. As agreed
in the Project Council meeting on July 17, we are proceeding with
category nominations without waiting for lead maintainers to be
nominated.
2025-07-28 09:49:35 +02:00
Nikita Popov
fe0dbe0f29
[CodeGen] More consistently expand float ops by default (#150597)
These float operations were expanded for scalar f32/f64/f128, but not
for f16 and more problematically, not for vectors. A small subset of
them was separately set to expand for vectors.

Change these to always expand by default, and adjust targets to mark
these as legal where necessary instead.

This is a much safer default, and avoids unnecessary legalization
failures because a target failed to manually mark them as expand.

Fixes https://github.com/llvm/llvm-project/issues/110753.
Fixes https://github.com/llvm/llvm-project/issues/121390.
2025-07-28 09:46:00 +02:00
Owen Pan
3d99446809
[clang-format] Fix a bug in DerivePointerAlignment: true (#150744)
This effectively reverts a4d4859dc70c046ad928805ddeaf8fa101793394 which
didn't fix the problem that `int*,` was not counted as "Left" alignment.

Fixes #150327
2025-07-28 00:44:12 -07:00
Marco Maia
4072a6b85b
Reland "[clangd] Add tweak to override pure virtuals" (#150788)
This relands commit
7355ea3f6b.

The original commit was reverted in
bfd73a5161
because it was breaking the buildbot.

The issue has now been resolved by
38f82534bb.

Original PR: https://github.com/llvm/llvm-project/pull/139348
Original commit message:
<blockquote>

closes https://github.com/clangd/clangd/issues/1037 
closes https://github.com/clangd/clangd/issues/2240

Example:

```c++
class Base {
public:
  virtual void publicMethod() = 0;

protected:
  virtual auto privateMethod() const -> int = 0;
};

// Before:
//                        // cursor here
class Derived : public Base{}^ ;

// After:
class Derived : public Base {
public:
  void publicMethod() override {
    // TODO: Implement this pure virtual method.
    static_assert(false, "Method `publicMethod` is not implemented.");
  }

protected:
  auto privateMethod() const -> int override {
    // TODO: Implement this pure virtual method.
    static_assert(false, "Method `privateMethod` is not implemented.");
  }
};
```


https://github.com/user-attachments/assets/79de40d9-1004-4c2e-8f5c-be1fb074c6de

</blockquote>
2025-07-28 09:31:12 +02:00
David Green
376326c660 [AArch64] Update some tests to use a more common check prefix. NFC
I'm just trying to more consistently use CHECK-SD and CHECK-GI.
2025-07-28 08:26:48 +01:00
Haohai Wen
07d396b6f5
[COFF] Set .llvmbc and .llvmcmd to metadata section (#150879)
Those are metadata sections for ELF but was not properly set for COFF.
2025-07-28 15:25:13 +08:00
Madhur Amilkanthwar
90de4a4ac9
[LoopFusion] Fix sink instructions (#147501)
If we have instructions in second loop's preheader which can be sunk, we
should also be adjusting PHI nodes to receive values from the fused loop's latch block.

Fixes #128600
2025-07-28 12:08:43 +05:30
Vikram Hegde
495774d6d5
Revert "[CodeGen][NPM] Stitch up loop passes in codegen pipeline" (#150883)
Reverts llvm/llvm-project#148114

will update with fixed PR.
2025-07-28 11:28:00 +05:30
Vikram Hegde
d35bf478a8
[CodeGen][NPM] Stitch up loop passes in codegen pipeline (#148114)
same as https://github.com/llvm/llvm-project/pull/133050

Co-authored-by : Oke, Akshat
<[Akshat.Oke@amd.com](mailto:Akshat.Oke@amd.com)>
2025-07-28 11:13:44 +05:30
Danny Mösch
0afb30311d
[clang-tidy] Add handling of type aliases in use-designated-initializers check (#150842)
Resolves #150782.
2025-07-28 07:37:16 +02:00
Jim Lin
2e71bf0133 [RISCV] Split the pre-defined macro tests for xthead* extensions to riscv-target-features-thead.c. NFC. 2025-07-28 13:08:07 +08:00
Jim Lin
ee3cf1252a [RISCV] Add pre-defined macro test for XCVmem. NFC. 2025-07-28 13:08:07 +08:00
Jim Lin
8c8b3cd28b [RISCV] Split the pre-defined macro tests for xcv* extensions to riscv-target-features-cv.c. NFC. 2025-07-28 13:08:07 +08:00
Jim Lin
024262421d [RISCV] Split the pre-defined macro tests for SiFive extensions to riscv-target-features-sifive.c. NFC. 2025-07-28 13:08:07 +08:00
Luke Lau
a100f63672 [RISCV] Add FP cost model tests for no zfhmin/zfbfmin. NFC
Vector costs without zvfhmin/zvfbfmin and zfhmin/zfbfmin are somehow
cheaper than with zvfhmin/zvfbfmin at smaller vector sizes, despite the
fact that the former are scalarized to libcalls. This adds a RUN line to
showcase this, splitting out the bfloat tests into their own functions
so we don't have duplicate lines for the regular float/double costs.
2025-07-28 11:27:30 +08:00
Luke Lau
e259ba8bec [RISCV] Modernize FP cost model tests. NFC
* Replace undef -> poison
* Remove overloaded type in intrinsic signature
2025-07-28 10:59:39 +08:00
Chuanqi Xu
1b4db78d2e [C++20] [Modules] Implement diagnose for exposured partially
Tracked at https://github.com/llvm/llvm-project/issues/112294

This patch implements from [basic.link]p14 to [basic.link]p18 partially.

The explicitly missing parts are:
- Anything related to specializations.
- Decide if a pointer is associated with a TU-local value at compile
  time.
- [basic.link]p15.1.2 to decide if a type is TU-local.
- Diagnose if TU-local functions from other TU are collected to the
  overload set. See [basic.link]p19, the call to 'h(N::A{});' in
  translation unit #2

There should be other implicitly missing parts as the wording uses
"names" briefly several times. But to implement this precisely, we have
to visit the whole AST, including Decls, Expression and Types, which may
be harder to implement and be more time-consuming for compilation time.
So I choose to implement the common parts.

It won't be too bad to miss some cases since we DIDN'T do any such
checks in the past 3 years. Any new check is an improvement. Given
modules have been basically available since clang15 without such checks,
it will be user unfriendly if we give a hard error now. And there are
a lot of cases which violating the rule actually just fine. So I decide
to emit it as warnings instead of hard errors.
2025-07-28 09:58:38 +08:00
Haowei
eb04b699e9
[libc] Add misssing inttypes dependencies (#150861)
This is a follow up of 9e7999147de757107482d8a2cedab4155a0b6635. It
attempts to fix the CI flakes we saw on fuchsia-linux-x64 builder.
2025-07-27 18:57:04 -07:00
ZhaoQi
80e0d41677
[LoongArch] Custom legalizing build_vector with same constant elements (#150584) 2025-07-28 09:50:35 +08:00
Jim Lin
45104662c0
[RISCV] Add negative pre-defined macro test for XSfmm* extension. NFC. (#150596) 2025-07-28 09:31:37 +08:00
yingopq
778fb76e63
[Mips] Fix wrong ELF FP ABI info when inline asm was empty (#146457)
When Mips process emitStartOfAsmFile and updateABIInfo, it did not know
the real value of IsSoftFloat and STI.useSoftFloat(). And when inline
asm instruction was empty, Mips did not process asm parser, so it would
not do TS.updateABIInfo(STI) again and at this time the value of
IsSoftFloat is correct.

Fix #135283.
2025-07-28 09:07:51 +08:00
Matt Arsenault
22c9236f50
IRSymtab: Use StringSet instead of DenseMap for preserved symbols (#149836)
Microbenchmarking shows this is faster
2025-07-28 09:51:47 +09:00
Teresa Johnson
314e22bcab
Revert "[MemProf] Ensure all callsite clones are assigned a function clone" (#150856)
Reverts llvm/llvm-project#150735 due to bot failures that I need to
investigate
2025-07-27 15:55:22 -07:00
Mahesh-Attarde
bca80a00e7
[X86][GlobalISel] Add test for IS_FP_CLASS (#148816)
Test for PR https://github.com/llvm/llvm-project/pull/148801
2025-07-28 00:39:23 +02:00
Mehdi Amini
1c3d6b3ec0
Implement a custom stream for LDBG macro to handle newlines (#150750)
This prints the prefix on every new line, allowing for an output that
looks like:
```
[dead-code-analysis] DeadCodeAnalysis.cpp:288 Visiting operation: func.func private @private_1() -> (i32, i32) {
[dead-code-analysis] DeadCodeAnalysis.cpp:288   %c0_i32 = arith.constant 0 : i32
[dead-code-analysis] DeadCodeAnalysis.cpp:288   %0 = arith.addi %c0_i32, %c0_i32 {tag = "one"} : i32
[dead-code-analysis] DeadCodeAnalysis.cpp:288   return %c0_i32, %0 : i32, i32
[dead-code-analysis] DeadCodeAnalysis.cpp:288 }
[dead-code-analysis] DeadCodeAnalysis.cpp:313 Visiting callable operation: func.func private @private_1() -> (i32, i32) {
[dead-code-analysis] DeadCodeAnalysis.cpp:313   %c0_i32 = arith.constant 0 : i32
[dead-code-analysis] DeadCodeAnalysis.cpp:313   %0 = arith.addi %c0_i32, %c0_i32 {tag = "one"} : i32
[dead-code-analysis] DeadCodeAnalysis.cpp:313   return %c0_i32, %0 : i32, i32
[dead-code-analysis] DeadCodeAnalysis.cpp:313 }
```
2025-07-28 00:08:44 +02:00
Mehdi Amini
9e5f9ff82f [MLIR] Fix release build: reference to NDEBUG guarded function (NFC)
With LDBG(), the code isn't guarded in release mode, even if the optimizer
will remove it because there is a `if (false)` statement. We need the
function declaration to be there at minima.
2025-07-27 13:24:54 -07:00
Matthias Springer
f4c05be544
[mlir][toy] Update dialect conversion example (#150826)
The Toy tutorial used outdated API. Update the example to:

* Use the `OpAdaptor` in all places.
* Do not mix `RewritePattern` and `ConversionPattern`. This cannot
always be done safely and should not be advertised in the example code.
2025-07-27 21:57:43 +02:00
Teresa Johnson
0f2484a740
[MemProf] Ensure all callsite clones are assigned a function clone (#150735)
Fix a bug in function assignment where we were not assigning all
callsite clones to a function clone. This led to incorrect call updates
because multiple callsite clones could look like they were assigned to
the same function clone.

Add in a stat and debug message to help identify and debug cases where
this is still happening.
2025-07-27 11:48:30 -07:00
Mehdi Amini
03dc2a41f3
[MLIR] Update MLIR tutorial to use LDBG() macro (#150763) 2025-07-27 20:21:18 +02:00
Mehdi Amini
865dd278a9
[MLIR] Remove overly verbose Debug for TypeID checks (NFC) (#150751)
These are spammy and mostly uninteresting during debugging.
2025-07-27 20:21:03 +02:00
Mehdi Amini
5983d7db7d
Migrate more of DataFlow framework to LDBG (NFC) (#150752) 2025-07-27 20:20:54 +02:00
Mehdi Amini
c28dfa1341
[MLIR] Update Inliner.cpp to use LDBG() for logging (NFC) (#150762) 2025-07-27 20:20:47 +02:00
Mehdi Amini
789fcef805
[MLIR] Migrate some "transform dialect" source to use the standard LDBG macro (NFC) (#150695) 2025-07-27 20:19:23 +02:00
Florian Hahn
f8b1c7333f
[VPlan] Add getContext helper to VPlan (NFC). 2025-07-27 18:53:53 +01:00
Kazu Hirata
83cb8b7bef
[llvm] Use a range-based for loop instead of {std,llvm}::for_each (NFC) (#150841)
LLVM Coding Standards discourages {std,llvm}::for_each unless we
already have a callable.
2025-07-27 10:43:52 -07:00
Kazu Hirata
5deb442885
[llvm] Proofread YamlIO.rst (#150840) 2025-07-27 10:43:45 -07:00
Kazu Hirata
adbf59dafa
[AsmPrinter] Remove an unnecessary cast (NFC) (#150839)
getLabelAfterInsn() already returns MCSymbol *.
2025-07-27 10:43:37 -07:00