[all-commits] [llvm/llvm-project] 3e008c: Scalarizer : Fix vector shuffle issue when can't a...

Chow via All-commits all-commits at lists.llvm.org
Mon Dec 8 10:07:01 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3e008cb333d1824a1f69b01d0fab9ee69ce3d9ed
      https://github.com/llvm/llvm-project/commit/3e008cb333d1824a1f69b01d0fab9ee69ce3d9ed
  Author: Chow <Shaochi.Zhou at amd.com>
  Date:   2025-12-08 (Mon, 08 Dec 2025)

  Changed paths:
    M llvm/lib/Transforms/Scalar/Scalarizer.cpp
    M llvm/test/Transforms/Scalarizer/min-bits.ll
    A llvm/test/Transforms/Scalarizer/vector-bool-not-aligned-min-bits.ll

  Log Message:
  -----------
  Scalarizer : Fix vector shuffle issue when can't aligned to customized minBits. (#163912)

When set a value to minBits, and doing scalarizer pass, if last remained
boolean vector size can't be aligned to min bits, remained bits should
be processed each by each, and not allowed to do a direct shuffle during
packing.

Problem:
In 'concatenate' step, when processing a boolean vector, if last
remained bits (fragment) can't be aligned to minBits, but required to be
packed, those bits should be processed each by each.

A direct call to vector shuffle is to assume those remained boolean bits
can be packed to target pack size. For example, when processing a
boolean vector with `size = 7`, but set `min bits = 4`, first fragment
with `4` bits can be packed correctly, but there are still `3` bits
remained which can't be used in a vector shuffle call.

Solution:
If remained bits can't be aligned to required target (min bits) pack
size, process them each by each.
(This will mostly only influence boolean vector as they have bit width
not aligned to pow(2).)

---------

Co-authored-by: Zhou, Shaochi(AMD) <shaozhou at amd.com>



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