[all-commits] [llvm/llvm-project] 3ca81a: [VectorCombine] Don't scalarize atomic loads (#200...

Justin Lebar via All-commits all-commits at lists.llvm.org
Fri May 29 00:43:10 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3ca81aa6b6d081797eeb555fb905fe7707acac74
      https://github.com/llvm/llvm-project/commit/3ca81aa6b6d081797eeb555fb905fe7707acac74
  Author: Justin Lebar <justin.lebar at gmail.com>
  Date:   2026-05-29 (Fri, 29 May 2026)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    M llvm/test/Transforms/VectorCombine/X86/load-extractelement-scalarization.ll

  Log Message:
  -----------
  [VectorCombine] Don't scalarize atomic loads (#200263)

scalarizeLoad tries to convert e.g.

      %a = load <2 x i32> %ptr
      %b = extractelement %a, 1

into a scalar load. Before this patch it would do this even when the
load is atomic, but in doing so it accidentally dropped the atomicity of
the load!

Although it is correct to apply this transformation to unordered
atomics, for now we simply don't apply this pass to atomics at all.

This bug was found by a large run of Opus 4.7 looking for bugs in LLVM.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list