Repository navigation
Fix missing bytesize check for safe find vectorization with LLVM - #6298
Merged
Stephan T. Lavavej (StephanTLavavej) merged 12 commits intoOct 18, 2026
Conversation
… LLVM Signed-off-by: Martijn Govers <[email protected]>
Signed-off-by: Martijn Govers <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
find vectorization with LLVMfind vectorization with LLVM
This comment was marked as resolved.
This comment was marked as resolved.
Contributor
Author
|
@microsoft-github-policy-service agree company="Alliander" |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Jonas Heinle (Kataglyphis)
added a commit
to Kataglyphis/ANTfrastructure
that referenced
this pull request
Sep 26, 2026
…the owner's Every open BACKLOG.md item was worked on 2026-09-26. Image fixes ship with the next publish (CON11 :latest, CON12 :winamd64); each was proven against the published image in a throwaway container or a buildkit probe. Both chains rebuild from base at that publish anyway (versions.env changed since each published image), so none of this adds a re-key. Hub scripts, effective now: - CON33: Copy-MediaRuntimeBundle probes GSTREAMER_BIN, the image's C:\runtime\bin; AccelerANTgine run 36044940426 had staged only ORT. - CON32: the Rust driver checks for cargo fmt/clippy instead of running rustup component add. Linux image (ships with CON11): - CON14: the android-sdk-shared cache id never named the two API 37 pins, so every build after 2bb0410 restored a 2026-08-22 SDK tree. The id names every pin (tests/test-android-sdk-cache-key.sh); a restored tree is checked against sdkmanager's package.xml records, completed and refreshed; the smoke checks every platform. - CON15/CON16/CON17: clang's own LLVM tools on PATH (clang-format and llvm-config stay 21 on purpose); <native-triple>-clang{,++}.cfg select ${GCC_PREFIX}; compiler-rt builds libFuzzer. validate-compilers.sh smoke checks all three. The package stage's new functions live in 06-packaging/package-image-wiring.sh (setup-package-image.sh hit 800 lines). - CON18: VIRTUAL_ENV/UV_PYTHON emptied in Dockerfile.torch, unset by the entrypoint. - CON19/CON20: lavapipe, perf (linux-perf), gperftools, jq, Xvfb. - CON21: amd64 drops the unused distro GTK 4 + GStreamer 1.28 runtime. - CON23: libcamera-env.sh lets a caller's paths win; the entrypoint keeps GCC 16.2's runtime ahead of a caller's LD_LIBRARY_PATH. - CON36 (found on the way): build-gcc.sh ran only ${TARGET_TRIPLET}-strip, which cannot read a plain cross compiler's x86-64 executables; with the build machine's strip too, /opt/gcc-16.2.0 goes from 4.9 to 1.4 GB. Windows image (ships with CON12): - CON9/CON10: the patched LLVM builds clang_rt.profile (profile_rocm off) and clang-tools-extra; libFuzzer's switch is spelled right; the stage fails without them, and its 7.1 GB source tree no longer stays in the layer. Proven by rebuilding the tree shipped in :winamd64: coverage runs to llvm-cov for /MDd, /MD+ASan and cmake/Tests.cmake, and the new clang-tidy reads a clang-cl BMI that scoop's refuses. - CON25: the final stage puts LunarG's vulkan-1.dll on PATH (never System32); a Vulkan-linked program went from 0xC0000135 to running, gstvulkan loads. OpenGL stays host-only (owner decision: no unsigned Mesa builds). - CON28: the app venv installs ai-edge-litert from the lock (the app smoke passes it); CON29: no baked WORKDIR/VOLUME C:\workspace. Decided (BACKLOG § Deliberate): CON20's cargo-audit/cargo-deny and Linux pwsh, CON21 on arm64/riscv64, CON22, CON24 (flags in riscv64-rva23-baseline.md), five Windows absences (CON28), and OpenGL in the Windows image (CON25). CON27 waits on microsoft/STL#6298. Filed: CON35, amd64's TVM cannot load its compiler. Gates: preflight green locally. The pre-commit mutation stage cannot grade five web-lane/package entries on this Windows host: Git Bash's symlinks break test-setup-package-image.sh's JAVA_HOME fixture (it fails on clean HEAD too) and test-web-lane-tools.sh exceeds 300 s. In the Linux image all five bite and both suites pass (95/95). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Stephan T. Lavavej (StephanTLavavej)
approved these changes
Oct 16, 2026
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Stephan T. Lavavej (StephanTLavavej)
approved these changes
Oct 16, 2026
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Member
|
I'm mirroring this to the MSVC-internal repo. Please notify me if any further changes are pushed, otherwise no action is required. |
Stephan T. Lavavej (StephanTLavavej)
merged commit Oct 18, 2026
6549709
into
microsoft:main
48 checks passed
Member
|
Thanks for fixing this bug and congrats on your first microsoft/STL commit! 😻 This fix will be available in the MSVC Build Tools 14.53. Apologies for taking so long to review this that it missed the 14.52 release. |
Contributor
Author
Awesome! Thanks for all the help and no worries, I fully understand! Just happy to be able to a part of this! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6294
Here's my attempt at excluding odd-sized and large-sized structs from the vectorization in
xutility.Design approach
I have tried to follow all the conventions used elsewhere as much as possible, in particular:
_Equal_memcmp_is_safeas the currentmainimplementation of_Vector_alg_in_find_is_safewas not tested in the first place. I still opted to add a couple more tests than for_Vector_alg_in_search_is_safeto at the very least show that there's vectorization for MSVC and not only for Clang_Vector_alg_in_search_is_safealready had a similar check as what was needed here, I re-used that one (had to move it outside the#ifdefstatement, though)_VECTORIZED_FIND,static_assert(false, "unexpected size");,_vectorized(and_Nx <= 8 && (_Nx & (_Nx - 1)) == 0to see if there were other cases that I missed. I believe (and hope) I got them all (at least inalgorithmandxutility).MINMAX-like things, because they are independently explicitly guarded where the vectorized versions are used.Additional remarks/open questions
main, so those are not an issue with my branch.<xutility>: std::find no longer compiles with structs with defaulted equality comparison with Clang-CL #6294 ?For performance-sensitive code (e.g. containers and algorithms) you may wish to write and/or run benchmarks, and the STL team will likely run any benchmarks we do have in our PR process.)Despite my questions, I think (and hope) that my contribution is in a good state anyways.