[all-commits] [llvm/llvm-project] c475f8: [HLSL] Update vector swizzle elements individually...

Helena Kotas via All-commits all-commits at lists.llvm.org
Tue Nov 25 12:50:47 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c475f8e5d809e2109a67c8523472eb28cd7bbb2a
      https://github.com/llvm/llvm-project/commit/c475f8e5d809e2109a67c8523472eb28cd7bbb2a
  Author: Helena Kotas <hekotas at microsoft.com>
  Date:   2025-11-25 (Tue, 25 Nov 2025)

  Changed paths:
    M clang/lib/CodeGen/CGExpr.cpp
    M clang/test/CodeGenHLSL/BasicFeatures/OutputArguments.hlsl
    M clang/test/CodeGenHLSL/builtins/ScalarSwizzles.hlsl
    A clang/test/CodeGenHLSL/builtins/VectorSwizzles.hlsl

  Log Message:
  -----------
  [HLSL] Update vector swizzle elements individually (#169090)

When individual elements of a vector are updated via vector swizzle, it needs to be handled as separate store operations to the individual vector elements.

Clang treats vectors as one unit, so if a part of a vector needs to be updated, the whole vector is loaded, some elements modified, and then the whole vector is stored.

In HLSL vector elements are handled separately. We need to avoid this load/modify/store sequence to prevent overwriting other vector elements that might be getting updated in parallel.

Fixes #152815



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