[qt/clang/llvm-project]: Summary of bulk changes made
KDE Git Services - Bulk Change <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git repository change summary for qt/clang/llvm-project Pushed by mirror-service into branch 'upstream/users/ojhunt/simplify-operator-new-overload-resolution'. Changed from 78a8a5f80a6236cae24913ebf2655ca7c6afa0de to f16941b1d0b21c665d23ffce3c8da64e919df99d Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository. This change contains the following new commits: Git commit 8c6343b18fb6592d2e5ed708cd1bf46773f206a6 by GitHub (on behalf of Bagodiya) on 08/08/2026 at 17:51.. [InstCombine] Fold cttz(mul X, OddC) -> cttz(X) (#214376) InstCombine already turns cttz(X, false) into cttz(X, true) when a dominating condition proves X != 0. Issue #213877 points out this fails once X is multiplied by an odd constant: the reproducer's `mul i64 %x, 3` carries no nsw/nuw, so isNonZeroMul can't prove the product is nonzero and the flag is never set. Multiplying by an odd constant preserves the trailing-zero count, so add cttz(mul X, OddC) -> cttz(X). Rewriting the operand back to X is what unblocks the existing reasoning: the branch form (test0_odd_mul in known-non-zero.ll) is then handled by the known-non-zero path in foldCttzCtlz, and the select form by the existing relaxation in foldSelectCttzCtlz. cttz-only -- the identity does not hold for ctlz. Alive2: https://alive2.llvm.org/ce/z/z8vw4m Counterexample for an even multiplier: https://alive2.llvm.org/ce/z/yAgT8r Fixes #213877 https://invent.kde.org/qt/clang/llvm-project/-/commit/8c6343b18fb6592d2e5ed708cd1bf46773f206a6 Git commit 59c18a5e2e606e5edf56d427a48a02d6869b4142 by GitHub (on behalf of AZero13) on 08/08/2026 at 17:52.. [InstCombine] Simplify fractions when there is no overflow (#210516) Use Greatest Common Factor to avoid making bigger immediates. Alive2 Proof: https://alive2.llvm.org/ce/z/3gEVTV Resolves #210452 https://invent.kde.org/qt/clang/llvm-project/-/commit/59c18a5e2e606e5edf56d427a48a02d6869b4142 Git commit 210c0ba72b0c10c04bcf553eb23cabce038cd253 by GitHub (on behalf of Matt Arsenault) on 08/08/2026 at 17:59.. X86: Simplify the EH_LABEL Expand condition (#213130) Re-express the opt-out handling of EH_LABEL. The special case is 32-bit non-GNU Windows, and the net result is to skip printing unused labels. Try to make this more comprehensible to help figure out where this logic should really be. I want to eliminate use of the TargetOptions::ExceptionModel, which ideally wouldn't be needed in a TargetLowering constructor. Co-authored-by: Claude (Claude-Opus-4.8) <[email protected]> https://invent.kde.org/qt/clang/llvm-project/-/commit/210c0ba72b0c10c04bcf553eb23cabce038cd253 Git commit 51fc70599559b2f04bef0d7adc47ecf16343b44c by GitHub (on behalf of Hadong Lee) on 08/08/2026 at 18:11.. [InstCombine] Fold comparisons of x & -x with 0 and 1 (#213709) This folds equality comparisons of `x & -x` with zero and one: - `(x & -x) == 0` to `x == 0` - `(x & -x) != 0` to `x != 0` - `(x & -x) == 1` to `trunc x to i1` - `(x & -x) != 1` to `!(trunc x to i1)` The fold supports scalar, fixed-vector, and scalable-vector integer types wider than `i1`. The `!= 1` fold is limited to one-use `and` instructions to avoid increasing the instruction count. Alive2: https://alive2.llvm.org/ce/z/Zwy2hW Fixes #213708 https://invent.kde.org/qt/clang/llvm-project/-/commit/51fc70599559b2f04bef0d7adc47ecf16343b44c Git commit fe4a02e9ccc5a0e612eeaca9a384040455504bd0 by GitHub (on behalf of Shilei Tian) on 08/08/2026 at 18:13.. [AMDGPU] Fix a decoder crash in disassembler (#214969) Fixes #214915. https://invent.kde.org/qt/clang/llvm-project/-/commit/fe4a02e9ccc5a0e612eeaca9a384040455504bd0 Git commit df633b22c76997a9b189d02995528610f0858293 by GitHub (on behalf of FathimaHaris) on 08/08/2026 at 18:16.. [InstCombine] Fold icmp on frexp exponent to fcmp on fabs(x) (#210711) Recognize signed icmp predicates comparing extractvalue(frexp(x), 1) against an integer constant and rewrite them as equivalent fcmp comparisons of fabs(x) against the corresponding power-of-two threshold. frexp(x) returns a mantissa in [0.5, 1) and an exponent E such that 2^(E-1) <= | x | < 2^E. When code only checks that exponent against a constant, the comparison can be rewritten directly in terms of | x |, dropping the need for frexp's exponent output: icmp spred i32 (extractvalue (frexp x), 1), C --> fcmp fpred float (fabs x), 2^ExpVal Predicate mapping: - slt --> olt (ExpVal = C-1) - sgt --> oge (ExpVal = C) Alive2 Generic proof: https://alive2.llvm.org/ce/z/aqEu4p Fixes #186554 . **Test updates** This patch also updates frexp-implied-exponent-range-dominating-conditions.ll. The _nofold tests in this file were originally checking that the dominating condition alone could not fold the comparison to a constant. After this patch, the remaining frexp exponent comparison is itself recognized by the new fold, so these tests now simplify to fabs/fcmp. At the -passes=instcombine pass , the transformed IR temporarily contains two fabs calls (one from the dominating-condition fold and one introduced by this transform). A later optimization pass in the full -O3 pipeline removes the duplicate fabs, producing the fully simplified IR. Alive2 proofs: - -passes=instcombine : https://alive2.llvm.org/ce/z/ZLHh8V - Full -O3 pipeline : https://alive2.llvm.org/ce/z/5P3pUC https://invent.kde.org/qt/clang/llvm-project/-/commit/df633b22c76997a9b189d02995528610f0858293 Git commit caf83f904bf468bc534b4ecf7f0fc4bc77713ff1 by GitHub (on behalf of Arseniy Obolenskiy) on 08/08/2026 at 18:37.. [SPIR-V] Fix FaceForward combine erasing unrelated users (#214626) Only erase the matched select and let normal DCE remove producers that actually become dead https://invent.kde.org/qt/clang/llvm-project/-/commit/caf83f904bf468bc534b4ecf7f0fc4bc77713ff1 Git commit 066dfd519323589e89847e65a40d4a9836f61188 by GitHub (on behalf of Jean-Didier PAILLEUX) on 08/08/2026 at 18:56.. [flang][MIF] Update prif_coarray_handle in accordance with PRIF 0.8 #214080 (#214747) In PRIF revision 0.8, the representation of `prif_coarray_handle` was changed. This PR updates this representation for this type and updates the MIFOpConversion pass for the relevant operations. Fixes issue #214080 A minor fix has been made to the deallocation to ensure that, on the Flang side, the variable is properly deallocated, since previously the deallocation was only performed at the `coarray_handle` level. https://invent.kde.org/qt/clang/llvm-project/-/commit/066dfd519323589e89847e65a40d4a9836f61188 Git commit debad8323724adb0682eb3d9cb0940b137b24e8a by GitHub (on behalf of Nico Weber) on 08/08/2026 at 19:13.. [gn] port 0ca4b9dd78f8 (#215008) https://invent.kde.org/qt/clang/llvm-project/-/commit/debad8323724adb0682eb3d9cb0940b137b24e8a Git commit 20c3476c21a7f1c8c074f67cc287c9dc9fc41629 by GitHub (on behalf of Folkert de Vries) on 08/08/2026 at 19:29.. [Sparc][NFC] add sparc64 `va_arg` tests (#214993) https://invent.kde.org/qt/clang/llvm-project/-/commit/20c3476c21a7f1c8c074f67cc287c9dc9fc41629 Git commit bf300bd6d6f321458f2e35dc6fa439eedecaad7d by GitHub (on behalf of Pavel Labath) on 08/08/2026 at 19:33.. [libc] Enable unistd.h on linux/arm and aarch64 (#214429) This enables the unistd.h header and all functional entry points for linux/arm. I've disabled a handful of functions which do not work because of 32-vs-64 bit mismatches (in file offsets and times). In theory these should work in full build mode, but we don't have bot coverage for this config, so I'm not enabling them anywhere. This is also why I'm not enabling full-build-only entry points which are enabled on other architectures. While comparing the unistd entry point lists across architectures, I noticed that linux/aarch64 was missing chown and getgid. I've added those as well. Assisted by Gemini. https://invent.kde.org/qt/clang/llvm-project/-/commit/bf300bd6d6f321458f2e35dc6fa439eedecaad7d Git commit 9c39cd9aedd20e394e29112e6848c57a35f39836 by GitHub (on behalf of Pavel Labath) on 08/08/2026 at 19:35.. [libc] Read multiple interfaces per netlink message in if_nameindex (#213952) This patch changes it to collect all interfaces in the buffer using BlockStore<InterfaceEntry, 16>. I'm storing interface names as a fixed char array (IF_NAMESIZE) in InterfaceEntry so that we're ready for the next step when we reuse the recvfrom buffer across multiple messages. Once all messages in the buffer are parsed, I allocate a single contiguous buffer containing all struct if_nameindex entries and strings. To keep if_nameindex() readable, I've split the implementation into two helper functions: parse_netlink_messages() and build_if_nameindex_list(). https://invent.kde.org/qt/clang/llvm-project/-/commit/9c39cd9aedd20e394e29112e6848c57a35f39836 Git commit a4897aa410ebe7ff4f174c16698ac7b66db4304e by GitHub (on behalf of Min-Yih Hsu) on 08/08/2026 at 19:44.. [SDPatternMatch] Add m_NU/SWAdd and m_NU/SWAddLike (#214876) These are the SDPatternMatch counterpart of `m_NU/SWAdd` and `m_NU/SWAddLike` in IR PatternMatch. https://invent.kde.org/qt/clang/llvm-project/-/commit/a4897aa410ebe7ff4f174c16698ac7b66db4304e Git commit 6824484b6e68ba7f2dff2f63e83f237112f03d9c by GitHub (on behalf of Michael Halkenhäuser) on 08/08/2026 at 19:56.. [Offload][OMPT][NFCI] Call ompt_libomp_connect instead of dlopen libomp (#214556) connectLibrary() reached libomp's ompt_libomp_connect through OmptLibraryConnectorTy, which dlopens "libomp.so" and resolves the symbol at run time. That cannot do anything the linker has not already done: libomptarget links libomp and imports seven __kmpc_* symbols from it, so libomp.so is a DT_NEEDED entry, and libomp defines and exports ompt_libomp_connect unconditionally -- as a stub in kmp_utility.cpp when built without OMPT support. Declare it, call it, and delete Connector.h. AI-assisted. https://invent.kde.org/qt/clang/llvm-project/-/commit/6824484b6e68ba7f2dff2f63e83f237112f03d9c Git commit 12a5b7ba932c542920bac78f18774ba337aa982a by GitHub (on behalf of Alexey Bataev) on 08/08/2026 at 19:57.. [SLP]Fix unscheduled-deps assert for copyable operands in reassociated nodes For a non-commutative user in a reassociated (flattened) node, the copyable operand may be modeled on a flattened operand column rather than at the instruction's operand number, so the direct lookup misses it and the def-use dependency is counted but never released. Scan the flattened operand columns at the user's lane for the copyable data. Reviewers: Pull Request: https://github.com/llvm/llvm-project/pull/215016 https://invent.kde.org/qt/clang/llvm-project/-/commit/12a5b7ba932c542920bac78f18774ba337aa982a Git commit 1e11d911354830a63c32eb986acbce56065bed7c by GitHub (on behalf of Florian Hahn) on 08/08/2026 at 20:09.. [VPlan] Use i64 for constant lane indices in insertelement (NFC) (#214664) Update code to generate insertelement instruction to use i64 as index type, matching the canonical form instcombine produces. This is in line with previous changes making sure LVs output is as canonical as possible. PR: https://github.com/llvm/llvm-project/pull/214664 https://invent.kde.org/qt/clang/llvm-project/-/commit/1e11d911354830a63c32eb986acbce56065bed7c Git commit cb274010df165e9187233b50babc89fff2103ed5 by GitHub (on behalf of Tom Stellard) on 08/08/2026 at 20:38.. workflows/release-binaries: Always dump Wix log on Windows (#212056) Dumping it only on successful builds isn't useful. https://invent.kde.org/qt/clang/llvm-project/-/commit/cb274010df165e9187233b50babc89fff2103ed5 Git commit 2abc0e5685096d507e2967c3d5ad069a824f1a61 by GitHub (on behalf of hulxv) on 08/08/2026 at 20:48.. [compiler-rt][builtins] add libc-backed double/float-to-int builtins (#207543) Add libc-backed double/float to integer conversion builtins Part of #197824 https://invent.kde.org/qt/clang/llvm-project/-/commit/2abc0e5685096d507e2967c3d5ad069a824f1a61 Git commit 031a67fbeb49eaee80d25a8d5038084f62d67746 by GitHub (on behalf of Paul Kirth) on 08/08/2026 at 21:03.. [llvm][LoopVectorize] Avoid nondeterministic iteration (#214886) The Transforms/LoopVectorize/AArch64/cmp_cost.ll test fails under LLVM_RERERSE_ITERATION, because iterating over a SmallPtrSet is nondeterministic. Addresses part of #214872. https://invent.kde.org/qt/clang/llvm-project/-/commit/031a67fbeb49eaee80d25a8d5038084f62d67746 Git commit f9b0ba3fdae3df4e6e1559b243d6bc786bc90807 by GitHub (on behalf of hulxv) on 08/08/2026 at 21:24.. [compiler-rt][builtins] libc-backed int-to-double/float builtins (#209900) Add libc-backed integer to double/float conversion builtins Part of #197824 https://invent.kde.org/qt/clang/llvm-project/-/commit/f9b0ba3fdae3df4e6e1559b243d6bc786bc90807 Git commit bebff2a2e93c8c0db4b4cb94b504166e345d19e3 by GitHub (on behalf of Reid Kleckner) on 08/08/2026 at 21:31.. [docs] Prefer colon fences to delineate blocks containing markup (#214921) Myst has an extension, [colon_fence](https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#syntax-colon-fence), that we enable in our docs. There are many Markdown-aware tools out there that know to interpret triple backtick as a code block fence, so they highlight them as pre-formatted text. Colon fences are an unrecognized Myst extension, and if the Sphinx directive contains a block of markdown formatted text, that's the desired behavior. Therefore, at some point during the migration, I started using them. However, I didn't document this guideline, and I didn't apply it consistently to the early docs. This PR does that: documents the guideline, and applies it to our docs. After this change: ``` ❯ rg '```\{(option|note|todo|admonition|warning)\}' | cut -d / -f 1 | sort | uniq -c 72 clang-tools-extra ``` The generated HTML was byte-identical. I plan to leave clang-tools-extra untouched since there are PRs in flight. LLM-assisted https://invent.kde.org/qt/clang/llvm-project/-/commit/bebff2a2e93c8c0db4b4cb94b504166e345d19e3 Git commit d9b672b02e5d63a91fb2b35d50d4786827091636 by GitHub (on behalf of Kazu Hirata) on 08/08/2026 at 21:45.. [CodeGen] Remove dead declarations (#215013) The corresponding function definitions were removed on Jan 12, 2022 in commit 6a605b97a2006bd391f129a606483656b7c6fb28. https://invent.kde.org/qt/clang/llvm-project/-/commit/d9b672b02e5d63a91fb2b35d50d4786827091636 Git commit 0aeb516dccab806616070123bd504bdd544cc39d by GitHub (on behalf of Yuan Suo) on 08/08/2026 at 21:52.. [LifetimeSafety] Use ImmutableList for buildOriginFlowChain DFS nodes (#208890) This commit mainly address the suggestion in https://github.com/llvm/llvm-project/pull/204592#discussion_r3523582077 to use `ImmutableList` for the DFS nodes in `buildOriginFlowChain`, and also updates the `llvm_unreachable` messages. --------- Signed-off-by: Yuan Suo <[email protected]> Co-authored-by: Utkarsh Saxena <[email protected]> https://invent.kde.org/qt/clang/llvm-project/-/commit/0aeb516dccab806616070123bd504bdd544cc39d Git commit bb3419bc0de6f04753984330e27b47b894b081e4 by GitHub (on behalf of Zorojuro) on 08/08/2026 at 22:19.. [libc] Fix Atan2f128 and add tests for all versions (#215023) It fixes the THREE_PI_OVER_4 value in atan2f128 and adds a small smoke test against the failure. The result or comparison value is directly taken from the failure while comparing with core math : ```CPP FAIL x=inf y=-inf ref=0x1.2d97c7f3321d234f272993d1414ap+1 z=0x1.2d97c7f3321d234f272993d1414ap-1 ``` Additionally it adds some more smoke tests for all atan2 versions. https://invent.kde.org/qt/clang/llvm-project/-/commit/bb3419bc0de6f04753984330e27b47b894b081e4 Git commit f16941b1d0b21c665d23ffce3c8da64e919df99d by Oliver Hunt on 08/08/2026 at 22:43.. [clang] Simplify the overload resolution logic for operator new and new[] This PR replaces the current spec-equivalent argument list mutation with direct iteration of the correctly ordered set of argument lists for a given allocation. This adds a bit of architectural work around the argument list construction but the overall effect is substantially simplified search of the overload candidates. * We now simply enumerate correctly ordered candidates for the implicit arguments. This means no more re-entrant modification of the argument list to handle addition and removal of type-identity or alignment parameters. * We no longer mutate the primary LookupResult when attempting the MSVC array fallback. This also lays the groundwork for correct diagnostics of such cases. For now we have a minor improvement of correctly reporting the operator we were trying to resolve originally, and tell the user that we have attempted the MSVC fallback if applicable. LLM usage: Depressingly claude actually did something right: - Identified align_val_t being cached alongside size_t was likely unsound, which was easy enough to create a test for. - It also noted that tryBuildStdTypeIdentity could be reentrant, and was able to construct a test case when I could not. That is now test #5 in type-aware-new-invalid-type-identity.cpp. An invalid type_identity defined as: ```cpp template <class T> struct type_identity { using type = decltype(new T); }; ``` triggers re-entrant evaluation of getTypeIdentityArgument invalidating the insertion slot. https://invent.kde.org/qt/clang/llvm-project/-/commit/f16941b1d0b21c665d23ffce3c8da64e919df99d