551632 Commits

Author SHA1 Message Date
jeanPerier
355dbbc37c
[flang][FIR] enable fir.box_addr codegen inside fir.global (#157120)
FIR lowering of the fir.box type inside fir.global is special (it is an
actual descriptor struct value instead of being a descriptor in memory)
and causes builtin.unrealized_conversion_cast to be inserted under the
hood by MLIR dialect conversion framework after each operation producing
a fir.box is translated. These builtin.unrealized_conversion_cast must
be removed before the code generation of operation of using the fir.box
in order to get the right "by value" code generation required in global
initial value definitions.
2025-09-08 10:15:22 +02:00
Hans Wennborg
05e31438ac Revert "[compiler-rt] Remove %T from shared object substitutions (#155302)"
This broke a bunch of Mac lit tests, see comment on the PR.

This reverts commit bbd48fbb2fadebd8597e9cce6e318e9d07809783.
2025-09-08 10:00:13 +02:00
Nikolas Klauser
1d131ffff8
[libc++] Optimize most of the __tree search algorithms (#155245)
This patch introduces a new comparator, namely `__lazy_synth_three_way`,
which tries to provide an efficient three way comparator for known types
and falls back to using the provided comparator if it doesn't know how
to do that. Currently, an efficient three way comparison is only
provided when using one of the `less` comparions object from the
standard library and `std::string`. This will be extended in future
patches.

```
------------------------------------------------------------------------------------------------------------------------------
Benchmark                                                                                                  old             new
------------------------------------------------------------------------------------------------------------------------------
std::map<std::string, int>::ctor(const&)/0                                                             12.6 ns         12.6 ns
std::map<std::string, int>::ctor(const&)/32                                                             858 ns          837 ns
std::map<std::string, int>::ctor(const&)/1024                                                         46700 ns        46739 ns
std::map<std::string, int>::ctor(const&)/8192                                                        458100 ns       449806 ns
std::map<std::string, int>::ctor(iterator, iterator) (unsorted sequence)/0                             12.8 ns         12.7 ns
std::map<std::string, int>::ctor(iterator, iterator) (unsorted sequence)/32                            1286 ns         1266 ns
std::map<std::string, int>::ctor(iterator, iterator) (unsorted sequence)/1024                         93812 ns        84686 ns
std::map<std::string, int>::ctor(iterator, iterator) (unsorted sequence)/8192                       1480346 ns      1385924 ns
std::map<std::string, int>::ctor(iterator, iterator) (sorted sequence)/0                               12.9 ns         12.8 ns
std::map<std::string, int>::ctor(iterator, iterator) (sorted sequence)/32                              1044 ns         1055 ns
std::map<std::string, int>::ctor(iterator, iterator) (sorted sequence)/1024                           63071 ns        62861 ns
std::map<std::string, int>::ctor(iterator, iterator) (sorted sequence)/8192                          595046 ns       590223 ns
std::map<std::string, int>::operator=(const&) (into cleared Container)/0                               13.6 ns         13.6 ns
std::map<std::string, int>::operator=(const&) (into cleared Container)/32                               880 ns          911 ns
std::map<std::string, int>::operator=(const&) (into cleared Container)/1024                           48627 ns        47808 ns
std::map<std::string, int>::operator=(const&) (into cleared Container)/8192                          458552 ns       454497 ns
std::map<std::string, int>::operator=(const&) (into partially populated Container)/0                   13.8 ns         13.6 ns
std::map<std::string, int>::operator=(const&) (into partially populated Container)/32                   864 ns          851 ns
std::map<std::string, int>::operator=(const&) (into partially populated Container)/1024               49483 ns        49555 ns
std::map<std::string, int>::operator=(const&) (into partially populated Container)/8192              456977 ns       457894 ns
std::map<std::string, int>::operator=(const&) (into populated Container)/0                             1.31 ns         1.31 ns
std::map<std::string, int>::operator=(const&) (into populated Container)/32                             425 ns          415 ns
std::map<std::string, int>::operator=(const&) (into populated Container)/1024                         14248 ns        14225 ns
std::map<std::string, int>::operator=(const&) (into populated Container)/8192                        136684 ns       133696 ns
std::map<std::string, int>::insert(value) (already present)/0                                          21.5 ns         16.2 ns
std::map<std::string, int>::insert(value) (already present)/32                                         22.7 ns         25.1 ns
std::map<std::string, int>::insert(value) (already present)/1024                                       54.5 ns         29.1 ns
std::map<std::string, int>::insert(value) (already present)/8192                                       78.4 ns         30.4 ns
std::map<std::string, int>::insert(value) (new value)/0                                                40.9 ns         39.0 ns
std::map<std::string, int>::insert(value) (new value)/32                                               58.3 ns         47.2 ns
std::map<std::string, int>::insert(value) (new value)/1024                                              120 ns         71.3 ns
std::map<std::string, int>::insert(value) (new value)/8192                                              157 ns          129 ns
std::map<std::string, int>::insert(hint, value) (good hint)/0                                          40.3 ns         40.7 ns
std::map<std::string, int>::insert(hint, value) (good hint)/32                                         48.0 ns         30.0 ns
std::map<std::string, int>::insert(hint, value) (good hint)/1024                                        107 ns         63.2 ns
std::map<std::string, int>::insert(hint, value) (good hint)/8192                                        132 ns          107 ns
std::map<std::string, int>::insert(hint, value) (bad hint)/0                                           27.0 ns         40.9 ns
std::map<std::string, int>::insert(hint, value) (bad hint)/32                                          68.3 ns         58.4 ns
std::map<std::string, int>::insert(hint, value) (bad hint)/1024                                         125 ns         82.0 ns
std::map<std::string, int>::insert(hint, value) (bad hint)/8192                                         155 ns          150 ns
std::map<std::string, int>::insert(iterator, iterator) (all new keys)/0                                 404 ns          405 ns
std::map<std::string, int>::insert(iterator, iterator) (all new keys)/32                               2004 ns         1805 ns
std::map<std::string, int>::insert(iterator, iterator) (all new keys)/1024                           102820 ns        76102 ns
std::map<std::string, int>::insert(iterator, iterator) (all new keys)/8192                          1144590 ns       949266 ns
std::map<std::string, int>::insert(iterator, iterator) (half new keys)/0                                408 ns          404 ns
std::map<std::string, int>::insert(iterator, iterator) (half new keys)/32                              1592 ns         1377 ns
std::map<std::string, int>::insert(iterator, iterator) (half new keys)/1024                           74847 ns        53921 ns
std::map<std::string, int>::insert(iterator, iterator) (half new keys)/8192                          828505 ns       698716 ns
std::map<std::string, int>::insert(iterator, iterator) (product_iterator from same type)/0              407 ns          407 ns
std::map<std::string, int>::insert(iterator, iterator) (product_iterator from same type)/32            1584 ns         1557 ns
std::map<std::string, int>::insert(iterator, iterator) (product_iterator from same type)/1024         47157 ns        47443 ns
std::map<std::string, int>::insert(iterator, iterator) (product_iterator from same type)/8192        623887 ns       628385 ns
std::map<std::string, int>::insert(iterator, iterator) (product_iterator from zip_view)/0               405 ns          403 ns
std::map<std::string, int>::insert(iterator, iterator) (product_iterator from zip_view)/32             1478 ns         1510 ns
std::map<std::string, int>::insert(iterator, iterator) (product_iterator from zip_view)/1024          47852 ns        47835 ns
std::map<std::string, int>::insert(iterator, iterator) (product_iterator from zip_view)/8192         605311 ns       606951 ns
std::map<std::string, int>::erase(key) (existent)/0                                                     129 ns         94.0 ns
std::map<std::string, int>::erase(key) (existent)/32                                                    110 ns          106 ns
std::map<std::string, int>::erase(key) (existent)/1024                                                  121 ns          128 ns
std::map<std::string, int>::erase(key) (existent)/8192                                                  165 ns         66.9 ns
std::map<std::string, int>::erase(key) (non-existent)/0                                               0.269 ns        0.257 ns
std::map<std::string, int>::erase(key) (non-existent)/32                                               21.9 ns         11.3 ns
std::map<std::string, int>::erase(key) (non-existent)/1024                                             53.5 ns         25.4 ns
std::map<std::string, int>::erase(key) (non-existent)/8192                                             67.3 ns         31.9 ns
std::map<std::string, int>::erase(iterator)/0                                                          46.3 ns         46.7 ns
std::map<std::string, int>::erase(iterator)/32                                                         44.4 ns         41.8 ns
std::map<std::string, int>::erase(iterator)/1024                                                       43.7 ns         46.4 ns
std::map<std::string, int>::erase(iterator)/8192                                                       45.2 ns         44.1 ns
std::map<std::string, int>::erase(iterator, iterator) (erase half the container)/0                      407 ns          407 ns
std::map<std::string, int>::erase(iterator, iterator) (erase half the container)/32                     876 ns          906 ns
std::map<std::string, int>::erase(iterator, iterator) (erase half the container)/1024                 20880 ns        20444 ns
std::map<std::string, int>::erase(iterator, iterator) (erase half the container)/8192                252881 ns       241583 ns
std::map<std::string, int>::clear()/0                                                                   407 ns          408 ns
std::map<std::string, int>::clear()/32                                                                 1252 ns         1323 ns
std::map<std::string, int>::clear()/1024                                                              38488 ns        38017 ns
std::map<std::string, int>::clear()/8192                                                             416492 ns       428534 ns
std::map<std::string, int>::find(key) (existent)/0                                                    0.008 ns        0.008 ns
std::map<std::string, int>::find(key) (existent)/32                                                    33.9 ns         15.3 ns
std::map<std::string, int>::find(key) (existent)/1024                                                  43.0 ns         25.5 ns
std::map<std::string, int>::find(key) (existent)/8192                                                  44.6 ns         29.3 ns
std::map<std::string, int>::find(key) (non-existent)/0                                                0.259 ns        0.257 ns
std::map<std::string, int>::find(key) (non-existent)/32                                                22.6 ns         11.4 ns
std::map<std::string, int>::find(key) (non-existent)/1024                                              48.6 ns         25.1 ns
std::map<std::string, int>::find(key) (non-existent)/8192                                              64.1 ns         31.1 ns
std::map<std::string, int>::count(key) (existent)/0                                                   0.008 ns        0.008 ns
std::map<std::string, int>::count(key) (existent)/32                                                   32.2 ns         17.3 ns
std::map<std::string, int>::count(key) (existent)/1024                                                 42.4 ns         25.3 ns
std::map<std::string, int>::count(key) (existent)/8192                                                 44.4 ns         31.6 ns
std::map<std::string, int>::count(key) (non-existent)/0                                               0.260 ns        0.259 ns
std::map<std::string, int>::count(key) (non-existent)/32                                               22.9 ns         11.3 ns
std::map<std::string, int>::count(key) (non-existent)/1024                                             49.8 ns         25.5 ns
std::map<std::string, int>::count(key) (non-existent)/8192                                             66.3 ns         31.9 ns
std::map<std::string, int>::contains(key) (existent)/0                                                0.008 ns        0.008 ns
std::map<std::string, int>::contains(key) (existent)/32                                                31.4 ns         18.0 ns
std::map<std::string, int>::contains(key) (existent)/1024                                              44.3 ns         26.5 ns
std::map<std::string, int>::contains(key) (existent)/8192                                              47.4 ns         30.2 ns
std::map<std::string, int>::contains(key) (non-existent)/0                                            0.452 ns        0.441 ns
std::map<std::string, int>::contains(key) (non-existent)/32                                            23.1 ns         11.5 ns
std::map<std::string, int>::contains(key) (non-existent)/1024                                          46.2 ns         26.3 ns
std::map<std::string, int>::contains(key) (non-existent)/8192                                          63.4 ns         31.4 ns
std::map<std::string, int>::lower_bound(key) (existent)/0                                             0.008 ns        0.008 ns
std::map<std::string, int>::lower_bound(key) (existent)/32                                             17.2 ns         19.0 ns
std::map<std::string, int>::lower_bound(key) (existent)/1024                                           27.1 ns         26.2 ns
std::map<std::string, int>::lower_bound(key) (existent)/8192                                           34.0 ns         36.0 ns
std::map<std::string, int>::lower_bound(key) (non-existent)/0                                         0.259 ns        0.257 ns
std::map<std::string, int>::lower_bound(key) (non-existent)/32                                         11.6 ns         11.5 ns
std::map<std::string, int>::lower_bound(key) (non-existent)/1024                                       24.8 ns         25.6 ns
std::map<std::string, int>::lower_bound(key) (non-existent)/8192                                       31.7 ns         31.6 ns
std::map<std::string, int>::upper_bound(key) (existent)/0                                             0.008 ns        0.008 ns
std::map<std::string, int>::upper_bound(key) (existent)/32                                             18.8 ns         19.7 ns
std::map<std::string, int>::upper_bound(key) (existent)/1024                                           25.3 ns         27.7 ns
std::map<std::string, int>::upper_bound(key) (existent)/8192                                           30.2 ns         29.9 ns
std::map<std::string, int>::upper_bound(key) (non-existent)/0                                         0.260 ns        0.259 ns
std::map<std::string, int>::upper_bound(key) (non-existent)/32                                         11.3 ns         12.0 ns
std::map<std::string, int>::upper_bound(key) (non-existent)/1024                                       25.6 ns         25.9 ns
std::map<std::string, int>::upper_bound(key) (non-existent)/8192                                       33.1 ns         34.2 ns
std::map<std::string, int>::equal_range(key) (existent)/0                                             0.008 ns        0.008 ns
std::map<std::string, int>::equal_range(key) (existent)/32                                             33.5 ns         15.8 ns
std::map<std::string, int>::equal_range(key) (existent)/1024                                           43.0 ns         25.1 ns
std::map<std::string, int>::equal_range(key) (existent)/8192                                           54.1 ns         30.7 ns
std::map<std::string, int>::equal_range(key) (non-existent)/0                                         0.265 ns        0.259 ns
std::map<std::string, int>::equal_range(key) (non-existent)/32                                         22.1 ns         12.1 ns
std::map<std::string, int>::equal_range(key) (non-existent)/1024                                       44.8 ns         24.4 ns
std::map<std::string, int>::equal_range(key) (non-existent)/8192                                       62.2 ns         40.1 ns
```

Fixes #66577
2025-09-08 09:56:14 +02:00
Nikita Popov
6a571a1fb3
[DataLayout] Remove i1 alignment entry (#156657)
I don't think we need to explicitly specify i1 alignment, as this is
going to fall back to i8 alignment.

This may change behavior if a data layout explicitly sets i8 alignment
without also setting i1 layout, but I'd expect this to be a bug fix in
that case.
2025-09-08 09:51:16 +02:00
Jesse Huang
193df2a12b
[RISCV][NFC] Fix typo in RISCVIndirectBranchTracking.cpp (#157221) 2025-09-08 15:02:48 +08:00
Hongyu Chen
3bdd39715a
[VectorCombine] Relax vector type constraint on bitop(bitcast, bitcast) (#157245)
Inspired by https://github.com/llvm/llvm-project/issues/157131.
This patch allows `bitop(bitcast, bitcast) -> bitcast(bitop)` for scalar
integer types.
2025-09-08 06:58:09 +00:00
David Green
2308d7bd77
[AArch64][GlobalISel] Fix passing <3 x ptr> via the stack. (#157247)
A <3 x ptr> will become a <1 x ptr> after being split, which needs to be
represented as a s64 in a LLT.
2025-09-08 07:57:46 +01:00
Timm Baeder
8ba0d0f72f
[clang][bytcode][NFC] Use UnsignedOrNone for global ids (#157328) 2025-09-08 08:56:46 +02:00
Vitaly Buka
93c2eecda5
IRMover: Switch to SmallPtrSet (#157226)
Follow up to #157218.
But I can't measure a difference on
my example.
2025-09-07 22:32:37 -07:00
Nicolas van Kempen
c5ed3c6073
[clang-tidy] Minor documentation wording for performance-noexcept-move-constructor (#157384)
Fix #157343.
2025-09-08 04:56:10 +00:00
Hongyu Chen
db2fc84f93
[VectorCombine] Relax vector type constraint on bitop(bitcast, constant) (#157246)
Fixes https://github.com/llvm/llvm-project/issues/157131.
This patch allows bitop(bitcast, constant) -> bitcast(bitop) for scalar
integer types.
2025-09-08 12:35:19 +08:00
Matt Arsenault
67823469bd
MC: Add Triple overloads for more MC constructors (#157321)
Avoids more Triple->string->Triple round trip. This
is a continuation of f137c3d592e96330e450a8fd63ef7e8877fc1908
2025-09-08 03:41:22 +00:00
Matt Arsenault
727e9f5ea5
CodeGen: Pass SubtargetInfo to TargetGenInstrInfo constructors (#157337)
This will make it possible for tablegen to make subtarget
dependent decisions without adding new arguments to every
target.

---------

Co-authored-by: Sergei Barannikov <barannikov88@gmail.com>
2025-09-08 12:12:19 +09:00
Maksim Levental
27af6bc240 [MLIR] fix LLVM::InsertValueOp::create 2025-09-07 22:23:12 -04:00
Yanzuo Liu
2ec6b3bced
[Clang-Tidy] Handle nested-name-specifier in "llvm-prefer-isa-or-dyn-cast-in-conditionals" (#155982)
Use `declRefExpr` matcher to match callee so that we can get the
`SourceRange` of the identifier of the callee for replacement.

Drive-by changes:

- Use `hasConditionVariableStatement` matcher to handle `if` statements
with init-statement.
- Support `for` loops.

Fixes #154790
2025-09-08 10:19:52 +08:00
Jakub Kuderski
2ed3f49c49
[mlir] Use free op create functions. NFC. (#157374)
The builder create methods are deprecated:
https://mlir.llvm.org/deprecation/. See
https://discourse.llvm.org/t/psa-opty-create-now-with-100-more-tab-complete/87339.
2025-09-07 22:13:20 -04:00
Vitaly Buka
dcd0ee0872
[NFC][LowerTypeTests] Make buildBitSet is now a static function (#157375) 2025-09-08 01:22:08 +00:00
Jakub Kuderski
2b3d3fce73
[mlir][gpu] Revert gpu.subgroup_broadcast with any_lane (#157373)
This partially reverts https://github.com/llvm/llvm-project/pull/152808.

Post-commit comments revealed that the `any_lane` variant hasn't been
fully agreed upon at the time of landing.
2025-09-08 00:43:57 +00:00
Alexey Bataev
fd93dc5ac5 [SLP]Correctly schedule standalone schedule data, which is part of tree entry
If a standalone schedule data relates to a vectorized instruction, still
need to schedule it as a part of pseudo-bundle to correctly handle
dependencies between its child nodes.
2025-09-07 17:08:37 -07:00
Philip Reames
c2c7b7efab [RISCV] Add coverage for the tryFoldSelectIntoOp combine with constants
An upcoming change will relax the requirement that the operands be
non-constant.
2025-09-07 17:01:26 -07:00
Mehdi Amini
1d848cfe1a [MLIR] Apply clang-tidy fixes for misc-use-internal-linkage in OpenMPToLLVMIRTranslation.cpp (NFC) 2025-09-07 14:55:38 -07:00
Chris B
799d3466fa
[NFC] Change const char* to StringRef (#154179)
This API takes a const char* with a default nullptr value and immdiately
passes it down to an API taking a StringRef. All of the places this is
called from are either using compile time string literals, the default
argument, or string objects that have known length. Discarding the
length known from a calling API to just have to strlen it to call the
next layer down that requires a StringRef is a bit silly, so this change
updates CodeGenModule::GetAddrOfConstantCString to use StringRef instead
of const char* for the GlobalName parameter.

It might be worth also replacing the first parameter with an llvm ADT
type that avoids allocation, but that change would have wider impact so
we should consider it separately.
2025-09-07 16:05:37 -05:00
Alexey Bataev
c4d927ce09 Revert "[SLP]Correctly schedule standalone schedule data, which is part of tree entry"
This reverts commit 57cae2b6a275a8eb3bc8935973263ed84535fb81 to fix
a buildbot https://lab.llvm.org/buildbot/#/builders/169/builds/14776
2025-09-07 13:27:12 -07:00
St. Muench
6fc32e9306
[clang-tidy] do not diagnose array types within implicit instantiations of a template (#132924)
So far, the clang-tidy check `modernize-avoid-c-arrays` also diagnosed
array types for type template parameters even though no actual array
type got written there but it got deduced to one. In such case, there is
nothing a developer can do at that location to fix the diagnostic. Since
in this case, the location where the template got actually instantiated
would have to be adjusted. And this is in most cases some totally
distant code where implementers of a template do not have access to.
Also adding suppressions to the declaration of the template is not an
option since that would clutter the code unnecessarily and is in many
cases also simply not possible (e.g. for users of a template). Hence, we
propose to not diagnose any occurrence of an array type in an implicit
instantiation of a template but rather at the point where template
arguments involve array types.
2025-09-07 22:54:37 +03:00
Sergei Barannikov
ac60477295
[Mips] Decode the operand of JrcRx16 (#157357)
This change will allow to remove `-ignore-non-decodable-operands`
TableGen option.

The J(AL)R(C) instructions still have incorrect encodings, but it seems
there is only one mips16 test that only checks that `nop` can be
assembled.
2025-09-07 18:53:05 +00:00
Mircea Trofin
96c1201504
[nfc][ir2vec] Remove Valid field (#157132)
It is tied to the vocab having had been set. Checking that vector's
`emtpy` is sufficient. Less state to track (for a maintainer)
2025-09-07 11:26:23 -07:00
Mehdi Amini
96195e7d44 [MLIR] Apply clang-tidy fixes for performance-unnecessary-value-param in Transport.cpp (NFC) 2025-09-07 10:55:50 -07:00
Mehdi Amini
8feb754510 [MLIR] Apply clang-tidy fixes for misc-use-internal-linkage in NVVMDialect.cpp (NFC) 2025-09-07 10:55:50 -07:00
Mehdi Amini
1b6d404ed1 [MLIR] Apply clang-tidy fixes for llvm-else-after-return in ScalableValueBoundsConstraintSet.cpp (NFC) 2025-09-07 10:55:50 -07:00
Alexey Bataev
57cae2b6a2 [SLP]Correctly schedule standalone schedule data, which is part of tree entry
If a standalone schedule data relates to a vectorized instruction, still
need to schedule it as a part of pseudo-bundle to correctly handle
dependencies between its child nodes.
2025-09-07 10:54:40 -07:00
Kazu Hirata
b9e546d24b
[Support] Simplify Object::operator== (NFC) (#157311)
This patch simplifies Object::operator== with DenseMap::operator==.
2025-09-07 10:46:02 -07:00
Aiden Grossman
859dc6b0c0
[lit] Move pipefail test into lit tests
These removes another test that otherwise needs a shell. This does
remove test coverage for pipefail in the external shell, but the
external shell should be disabled by default pretty soon. This also adds
test coverage for the internal shell which did not exist before.

Reviewers: jh7370, ilovepi, petrhosek

Reviewed By: ilovepi, petrhosek

Pull Request: https://github.com/llvm/llvm-project/pull/157223
2025-09-07 10:43:59 -07:00
Kazu Hirata
fc01a55755
[Support] Refactor IsResizableBase with "constexpr if" (NFC) (#157326)
We have two implementations of IsResizableBase that are selected with
a boolean template parameter.  This patch consolidates them into one
with "constexpr if".  The "constexpr if" condition uses
llvm::is_detected to check the availability of resize().
2025-09-07 10:39:53 -07:00
Kazu Hirata
7ef9530213
[ADT] Simplify StringSet::contains (NFC) (#157325)
We can use Base::contains.
2025-09-07 10:39:46 -07:00
Kazu Hirata
13647d82eb
[ADT] Refactor DenseSet::insert (NFC) (#157324)
DenseMap::try_emplace can default-construct DenseSetEmptyKey, so we
don't need to pass Empty on our own.
2025-09-07 10:39:38 -07:00
Kazu Hirata
574ff7fdff
[ADT] Clean up fwd_or_bidi_tag with std::conditional_t (NFC) (#157310)
fwd_or_bidi_tag selects one of two implementations of
fwd_or_bidi_tag_impl depending on the condition.  We can replace it
with std::conditional_t, eliminating the need for helper structs
fwd_or_bidi_tag_impl.

This patch also converts the fwd_or_bidi_tag struct into an alias
template, making "using filter_iterator" a little more readable.
2025-09-07 10:39:31 -07:00
Kazu Hirata
456e49e805
[ADT] Use "constexpr if" in get_hashable_data (NFC) (#157309)
This patch combines two implementations of get_hashable_data into one
with "constexpr if".  I'm retaining the original return type of the
second variant, size_t, with static_cast<size_t>.  Moving away from
template metaprogramming should improve readability.
2025-09-07 10:39:23 -07:00
Florian Hahn
b50ad945dd
[InstSimplify] Simplify extractvalue (umul_with_overflow(x, 1)). (#157307)
Look through extractvalue to simplify umul_with_overflow where one of
the operands is 1.

This removes some redundant instructions when expanding SCEVs, which in
turn makes the runtime check cost estimate more accurate, reducing the
minimum iterations for which vectorization is profitable.

PR: https://github.com/llvm/llvm-project/pull/157307
2025-09-07 18:32:40 +01:00
Timm Baeder
e9499e82ed
[clang][bytecode][NFC] Remove some unnecessary if statements (#157329)
We already checked that `IsStatic` is true above.
2025-09-07 18:55:48 +02:00
AZero13
7bc342ef9d
[AArch64] Use DAG.getNegative instead of getNegatedInteger (NFC) (#157342) 2025-09-07 17:41:19 +01:00
Sergei Barannikov
e41da79198
[CodeGen] Make TargetRegisterInfo destructor public (NFC) (#157341)
All in-tree targets store target-specific TRI in target-specific
Subtarget/InstrInfo class by value, but some downstream targets may
prefer to store it as `std::unique_ptr<const TargetRegisterInfo>` (to
avoid inclusion of MyTargetRegisterInfo.h in MySubtarget.h).

Making the destructor public makes this possible, and also follows
general C++ guidelines (the destructor should be either public virtual
or protected non-virtual).

All other related classes already have their destructors public.
2025-09-07 18:57:38 +03:00
Abhinav Kumar
645dd324d1
[clang-repl] Sink RemoteJITUtils into Interpreter class. NFC (#155140)
This is a refactoring PR. It sinks RemoteJITUtils into Interpreter and IncrementalExecutor classes.

---------

Co-authored-by: kr-2003 <kumar.kr.abhinav@gmail.com>
2025-09-07 18:35:29 +03:00
Matt Arsenault
3216bf1b96
CodeGen: Make TargetInstrInfo constructor protected (#157336) 2025-09-08 00:26:52 +09:00
Florian Hahn
2654690006
[LV] Add additional test with SCEV predicate.
The SCEV predicate in the existing tests for optimizing for size is
known to be false. Add additional test with a predicate that cannot be
proven true/false.

Also generate checks with latest version of script.
2025-09-07 16:14:52 +01:00
Michał Górny
7a88ddd3b1
Revert "[Offload] Run unit tests as a part of check-offload" (#157346)
Reverts llvm/llvm-project#156675 due to regressions in standalone build
and test errors without all plugins enabled (#157345).
2025-09-07 15:12:15 +00:00
Sergei Barannikov
fa59e61e65
[CSKY] Decode CARRY / GPRSP operands not encoded into instruction (NFCI) (#157338)
The generated decoder can now decode these operands. All we need to do
is to add `bits<0>` for these operands to instruction records and
provide operand decoders.

While here, reformat adjacent lines.
2025-09-07 13:47:23 +00:00
camc
59d69bfc20
[clang] Detect int-to-float narrowing when the back-conversion is unspecified (#157174)
Resolves #157067 

APFloat::convertToInteger returns opInvalidOp when the conversion has
unspecified value. The int-to-float narrowing detection logic doesn't
check for this when comparing the converted-back integer with the
original integer.

PR adds a check for this, and test cases.
2025-09-07 20:59:58 +08:00
David Green
6d6122eaff [AArch64][GlobalISel] Add regbank information to other sha1 intrinsics. 2025-09-07 13:50:25 +01:00
Florian Hahn
ee29611427
[LV] Remove ILV::LoopVectorPreHeader (NFC).
Remove LoopVectorPreheader member variable from ILV as it is only used
by epilogue skeleton creation.
2025-09-07 13:48:00 +01:00
David Green
d4450bb8ec [AArch64][GlobalISel] Move special selection for aarch64_crypto_sha1h.
This appears to just need to select FPR registers.
2025-09-07 13:45:00 +01:00