541823 Commits

Author SHA1 Message Date
Aiden Grossman
99cdc26c94
[CI] Cleanup buildkite test report script
This patch removes the generate_test_report_buildkite script entrypoint
as we no longer need it now that buildkite has been sunsetted. Also
remove the calls in the monolithic-* scripts given they are adding
complexity for no value.

Also remove the generate-buildkite-pipeline-premerge script as it is
no longer needed.

Reviewers: tstellar, DavidSpickett, lnihlen, cmtice

Reviewed By: DavidSpickett

Pull Request: https://github.com/llvm/llvm-project/pull/143480
2025-06-22 17:17:12 +00:00
Aiden Grossman
214ca3161b
[CI] Test all projects when CI scripts change
This patch resolves a fixme in the compute_projects script to actually
test all the projects we can when touching something in the .ci
directory. This ensures we test things like compiler-rt before landing
changes.

Reviewers: gburgessiv, lnihlen, cmtice

Reviewed By: cmtice, gburgessiv

Pull Request: https://github.com/llvm/llvm-project/pull/144034
2025-06-22 17:12:16 +00:00
eleviant
80b9fcf8fd
Revert "[lldb] Fix qEcho message handling (#145072)" (#145241)
Temporarily revert commit e066f35c6981c720e3a7e5883efc40c861b3b7ee,
because lldb tests randomly hang after it's been pushed.
2025-06-22 18:59:08 +02:00
Aiden Grossman
ee414e3504
[CI] Refactor out some early exits in compute_projects
I have a habit of using early exits given it is in the LLVM coding
standards, but most of the early exits used within this script were
trivial and actually adding complexity. These are all instances where we
only perform one operation after the early exit, so removing the early
exit means less lines of code and arguably more readable code.

Reviewers: DavidSpickett, tstellar, cmtice, lnihlen

Reviewed By: DavidSpickett

Pull Request: https://github.com/llvm/llvm-project/pull/143478
2025-06-22 15:08:11 +00:00
Iris Shi
f2eb5d416e
[SelectionDAG] Handle fneg/fabs/fcopysign in SimplifyDemandedBits (#139239) 2025-06-22 22:48:59 +08:00
David Green
078475d6c1 [ARM] Add test coverage for #144845 and regenerate tests. NFC 2025-06-22 15:24:39 +01:00
Matt Arsenault
584a2c2e7c
AMDGPU: Avoid report_fatal_error for reporting libcalls (#145134) 2025-06-22 23:10:18 +09:00
Menooker
ee5dcdc275
[mlir] fix assertion failure in remove-dead-values (#144849)
Simple IR patterns will trigger assertion error:

```
  func.func @test_zero_operands(%I: memref<10xindex>, %I2: memref<10xf32>) {
    %v0 = arith.constant 0 : index
    %result = memref.alloca_scope -> index {
      %c = arith.addi %v0, %v0 : index
      memref.store %c, %I[%v0] : memref<10xindex>
      memref.alloca_scope.return %c: index
    }
    func.return
  }
```

with error: `mlir/include/mlir/IR/Operation.h:988:
mlir::detail::OperandStorage& mlir::Operation::getOperandStorage():
Assertion `hasOperandStorage && "expected operation to have operand
storage"' failed.`

This PR will fix this issue.

---------

Co-authored-by: Andrzej Warzyński <andrzej.warzynski@gmail.com>
Co-authored-by: Mehdi Amini <joker.eph@gmail.com>
2025-06-22 23:03:36 +09:00
Matt Arsenault
96493c514e
AMDGPU: Use reportFatalUsageError for regalloc flag error (#145198) 2025-06-22 22:41:05 +09:00
Kazu Hirata
dec93ae454
[mlir] Migrate away from ValueRange(std::nullopt) (NFC) (#145210)
ArrayRef has a constructor that accepts std::nullopt.  This
constructor dates back to the days when we still had llvm::Optional.

Since the use of std::nullopt outside the context of std::optional is
kind of abuse and not intuitive to new comers, I would like to move
away from the constructor and eventually remove it.

One of the common uses of std::nullopt is in one of the constructors
for ValueRange.  This patch takes care of the migration where we need
ValueRange() to facilitate perfect forwarding.  Note that {} would be
ambiguous for perfecting forwarding to work.
2025-06-22 06:30:17 -07:00
Kazu Hirata
2ac293f5ac
[lld] Use llvm::partition_point (NFC) (#145209) 2025-06-22 06:30:10 -07:00
Kazu Hirata
5d7d8d627a
[Instrumentation] Drop "const" from a return type (NFC) (#145208)
We don't need to put a const on a return type.
2025-06-22 06:30:02 -07:00
Florian Hahn
0dc0aeb14f
[LV] Add additional tests for replicating calls returning structs.
Add additional test coverage for replicating calls return structs, in
particular cases where the number of struct elements does not match the
VF.

Extra test coverage for
https://github.com/llvm/llvm-project/pull/142433.
2025-06-22 13:48:25 +01:00
Simon Pilgrim
26390f22b8
[VectorCombine] foldShuffleOfShuffles - fold shuffle(shuffle(x,y),poison) length changing masks (#144690)
The shuffle merging code assumes that the shuffle sources are all the
same type, which fails if we've changed length and don't have 2 inner
shuffles. We already handle length-changing shuffles if we do have 2
inner shuffles.

This patch creates a fake "all poison" shuffle mask and reuses the other
shuffle's sources, which can be safely used with the existing merge
code.

The alternative was a considerable refactor of the merge code to account
for different vector widths......

Fixes #144656
2025-06-22 13:30:45 +01:00
Michael Buch
d2c0451d05 [lldb][DWAFASTParserClang][NFC] Rename GetCXXObjectParameter to GetObjectParameter
Since this is used for Objective-C too.
2025-06-22 11:41:48 +01:00
Patryk Wychowaniec
c7d9eabf4a
[AVR] Don't apply post-indexing on mismatched pointers (#145224)
fixes https://github.com/llvm/llvm-project/issues/143247
2025-06-22 18:18:00 +08:00
Jim Lin
f78819aeef Revert "Revert "[RISCV] Remove B and Zbc extension from Andes series cpus." (#144402)"
Since the fix https://github.com/llvm/llvm-project/pull/144848 for post-commit CI failure
has landed.

This reverts commit f83d09a1f60aee28a8ed9020cd72971ec2885f24.
2025-06-22 17:54:37 +08:00
David Green
8583882bdc [AArch64] Remove unnecessary DL variable. NFC 2025-06-22 10:52:13 +01:00
Mehdi Amini
075cb691a5
[MLIR] Add logging/tracing to DataFlow analysis and RemoveDeadValues (NFC) (#144695)
Debugging issues with this pass is quite difficult at the moment, this
should help.
2025-06-22 11:40:01 +02:00
Evan Liu
6ae5b89553
Make getStridesAndOffset const (#145148)
Make getStridesAndOffset const.
2025-06-22 11:21:47 +02:00
Florian Hahn
58b939abe5
[VPlan] Support matching constants in narrowInterleaveGroups.
Matching constants can trivially be broadcasted, allow them if the same
constant is used for all recipes in a bundle.
2025-06-22 08:45:40 +01:00
Abhishek Kaushik
cbfec48697
Revert "[X86][NFC] Use std::move to avoid copy" (#145215)
Reverts llvm/llvm-project#141455
2025-06-22 12:52:57 +05:30
Iris Shi
f51d8730b3
[InstSimplify] Simplify 'x u>= 1' to true when x is known non-zero (#145204) 2025-06-22 13:32:19 +08:00
Stanislav Mekhanoshin
fa0b84f23c
[AMDGPU] Rename call instructions from b64 to i64 (#145103)
These get renamed in gfx1250 and on from B64 to I64:

  S_CALL_I64
  S_GET_PC_I64
  S_RFE_I64
  S_SET_PC_I64
  S_SWAP_PC_I64
2025-06-21 21:42:09 -07:00
Craig Topper
b7d0c9b9d8
[SelectionDAG][RISCV] Treat zext nneg as sext in PromoteIntOp_ZERO_EXTEND if the promoted input is sign extended. (#145120)
If the zext has the nneg flag and we can prove the promoted input
is sign extended, we can avoid generating an AND that we might not
be able to remove. RISC-V emits a lot of sext_inreg operations during
i32->i64 promotion that makes this likely.

I've restricted this to the case where the promoted type is the same
as the result type so we don't need to create an additional extend.

I've also restricted it to cases where the target has stated a
preference for sext like i32->i64 on RV64. This is largely to avoid
wasting time in computeNumSignBits until we have a test case that
benefits.
2025-06-21 18:56:00 -07:00
Matt Arsenault
f280d3b705
AMDGPU: Avoid report_fatal_error for getRegisterByName subtarget case (#145173) 2025-06-22 08:19:19 +09:00
Arthur Eubanks
5708851283
Revert "[ValueTracking] Improve Bitcast handling to match SDAG" (#145191)
Reverts llvm/llvm-project#125935

Causes miscompiles, see comments in #125935
2025-06-21 16:02:26 -07:00
Douglas Yung
757c80d88a Add REQUIRES: x86 to test added in 141197 to skip when x86 target is not present. 2025-06-21 22:37:02 +00:00
Florian Hahn
c455f4a32d
[LV] Add more tests for narrowing interleave groups with live-ins. 2025-06-21 22:03:19 +01:00
eleviant
e066f35c69
[lldb] Fix qEcho message handling (#145072)
Patch fixes the sync-on-timeout logic in lldb and switches to qEcho
based ping, instead of qC. This fixes vRun message case, when there is
no process yet and qC returns an error.
2025-06-21 22:48:08 +02:00
Erick Velez
056b52df34
[clang-doc] Precommit test for global variables (#145069) 2025-06-21 11:56:35 -07:00
LLVM GN Syncbot
550ed9ef19 [gn build] Port e7dd223ec451 2025-06-21 18:10:42 +00:00
Katherine Whitlock
e7dd223ec4
[clang-tidy] Add new check readability-use-numeric-limits (#127430)
The adds a check that replaces specific numeric literals like `32767`
with the equivalent call to `std::numeric_limits` (such as
`std::numeric_limits<int16_t>::max())`.

Partially addresses #34434, but notably does not handle cases listed in
the title post such as `~0` and `-1`.
2025-06-21 21:10:20 +03:00
Tal Kedar
2ed089fb18
[clang/docs] add a missing brace in ClangFormatStyleOptions.rst (#145145)
... in the example for `WrapNamespaceBodyWithEmptyLines: Never`
2025-06-21 20:00:22 +02:00
Mikhail R. Gadelha
6c8c816b17
[libc] Fix feature check for riscv (#145169)
This PR fixes the feature detection for RISC-V floating-point support in
LLVM's libc implementation.

The `__riscv_flen` macro represents the floating-point register width in
bits (32, 64, or 128). Since Extension D is specifically documented as
implying F, we can use simple >= comparisons to detect them.

For half-precision support, the implementation checks for the Zfhmin
extension as RVA22 and RVA23 profiles only require Zfhmin rather than
the full Zfh extension. Zfh also implies Zfhmin, so checking for Zfhmin
should cover all cases.
2025-06-21 14:42:45 -03:00
Craig Topper
0c47628515 Re-commit "[RISCV] Properly support RISCVISD::LLA in getTargetConstantFromLoad. (#145112)"
With proper co-author.

Original message:

We need to pass the operand of LLA to GetSupportedConstantPool.

This replaces #142292 with test from there added as a pre-commit
for both medlow and pic.

Co-authored-by: Carl Nettelblad carl.nettelblad@rapidity-space.com
2025-06-21 10:18:49 -07:00
Craig Topper
fc36e47a49 Revert "[RISCV] Properly support RISCVISD::LLA in getTargetConstantFromLoad. (#145112)"
I missed the Co-authored-by that I tried to add.

This reverts commit 1da864b574f699d5c9be68dca9b3969ad50f4803.
2025-06-21 10:18:34 -07:00
Craig Topper
1da864b574
[RISCV] Properly support RISCVISD::LLA in getTargetConstantFromLoad. (#145112)
We need to pass the operand of LLA to GetSupportedConstantPool.
    
This replaces #142292 with test from there added as a pre-commit
for both medlow and pic.
2025-06-21 10:17:30 -07:00
Florian Hahn
9f7a155394
[VPlan] Update packScalarIntoVector to take and return wide value (NFC)
Make the function more flexible in preparation for new users.
2025-06-21 18:03:14 +01:00
Abhishek Kaushik
4c1a1009ad
[X86][NFC] Use std::move to avoid copy (#141455) 2025-06-21 22:04:41 +05:30
Kazu Hirata
463ce01310
[CodeGen] Remove extraneous casts to VariableID (NFC) (#145144)
We do not need these casts because values being cast here are already
of type VariableID.
2025-06-21 08:21:04 -07:00
Kazu Hirata
ae372bfca8
[CodeGen] Use range-based for loops (NFC) (#145142) 2025-06-21 08:20:57 -07:00
Kazu Hirata
e6ebf8f99b
[mlir] Migrate away from ArrayRef(std::nullopt) (NFC) (#145140)
ArrayRef has a constructor that accepts std::nullopt.  This
constructor dates back to the days when we still had llvm::Optional.

Since the use of std::nullopt outside the context of std::optional is
kind of abuse and not intuitive to new comers, I would like to move
away from the constructor and eventually remove it.

This patch takes care of the mlir side of the migration, starting with
straightforward places like "return std::nullopt;" and ternally
expressions involving std::nullopt.
2025-06-21 08:20:49 -07:00
Kunqiu Chen
99af99c665
[TSan] Fix p == end == ShadowMem::end in ShadowSet (#144994)
In `ShadowSet`, when `p == end == ShadowMem::end`, it triggered an
assertion fail previously.

Now we do not allow `p == end` anymore in `ShadowSet`.
2025-06-21 23:02:41 +08:00
Matt Arsenault
a961ba88e1
AMDGPU: Use reportFatalUsageError for LDS mixed absolute addresses (#145135) 2025-06-21 23:54:27 +09:00
Florian Hahn
60d1276b0e
[VPlan] Pass operand index to canNarrowLoad. (NFC)
Explicitly pass the operand we are checking to canNarrowLoad. This
simplifies the check if the operands match across recipes and enables
future optimizations.
2025-06-21 15:41:26 +01:00
Hui
831fcb5e91
[libc++] constexpr flat_map (#137453)
Fixes #128673
2025-06-21 13:41:32 +01:00
David Green
77941eba7f
[CostModel] Add a DstTy to getShuffleCost (#141634)
A shuffle will take two input vectors and a mask, to produce a new
vector of size <MaskElts x SrcEltTy>. Historically it has been assumed
that the SrcTy and the DstTy are the same for getShuffleCost, with that
being relaxed in recent years. If the Tp passed to getShuffleCost is the
SrcTy, then the DstTy can be calculated from the Mask elts and the src
elt size, but the Mask is not always provided and the Tp is not reliably
always the SrcTy. This has led to situations notably in the SLP
vectorizer but also in the generic cost routines where assumption about
how vectors will be legalized are built into the generic cost routines -
for example whether they will widen or promote, with the cost modelling
assuming they will widen but the default lowering to promote for integer
vectors.

This patch attempts to start improving that - it originally tried to
alter more of the cost model but that too quickly became too many
changes at once, so this patch just plumbs in a DstTy to getShuffleCost
so that DstTy and SrcTy can be reliably distinguished. The callers of
getShuffleCost have been updated to try and include a DstTy that is more
accurate. Otherwise it tries to be fairly non-functional, keeping the
SrcTy used as the primary type used in shuffle cost routines, only using
DstTy where it was in the past (for InsertSubVector for example).

Some asserts have been added that help to check for consistent values
when a Mask and a DstTy are provided to getShuffleCost. Some of them
took a while to get right, and some non-mask calls might still be
incorrect. Hopefully this will provide a useful base to build more
shuffles that alter size.
2025-06-21 12:29:29 +01:00
yronglin
ea321392eb
[C++][Modules] A module directive may only appear as the first preprocessing tokens in a file (#144233)
This PR is 2nd part of
[P1857R3](https://github.com/llvm/llvm-project/pull/107168)
implementation, and mainly implement the restriction `A module directive
may only appear as the first preprocessing tokens in a file (excluding
the global module fragment.)`:
[cpp.pre](https://eel.is/c++draft/cpp.pre):
```
module-file:
    pp-global-module-fragment[opt] pp-module group[opt] pp-private-module-fragment[opt]
```

We also refine tests use `split-file` instead of conditional macro.

Signed-off-by: yronglin <yronglin777@gmail.com>
2025-06-21 18:58:56 +08:00
Baranov Victor
1b5d6ec685
[clang-tidy] count class member initializers as statements in 'readability-function-size' (#131669)
Improve `readability-function-size` by counting class member
initializers as statements.
Relates to https://github.com/llvm/llvm-project/issues/131126
2025-06-21 13:14:19 +03:00