llvm-project
3e008cb3 - Scalarizer : Fix vector shuffle issue when can't aligned to customized minBits. (#163912)

Commit
2 days ago
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@amd.com>
Author
Parents
Loading