[all-commits] [llvm/llvm-project] b358f2: [X86] visitSelect - widen select(cond, extract_subv...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Thu Nov 7 04:21:48 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b358f218a114c1495cfb356b1b95c866c32f72c4
https://github.com/llvm/llvm-project/commit/b358f218a114c1495cfb356b1b95c866c32f72c4
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2024-11-07 (Thu, 07 Nov 2024)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/test/CodeGen/X86/avx512-shuffles/partial_permute.ll
Log Message:
-----------
[X86] visitSelect - widen select(cond,extract_subvector(shuffle(vec0)),vec1) if it will create a mask instruction (#115223)
This patch extends the existing fold "select(mask, extract_subvector(shuffle(x)), zero) --> extract_subvector(select(insert_subvector(mask), shuffle(x), zero))", to also handle the non-zero case.
I've put in a restriction for VPERMV3 3 vector operands shuffles to only work with the zero select as in most circumstances we are not selecting with either of the source vectors (the only case the mask instructions match).
We should be able to generalize this in the future to work with other maskable instructions, but this is a good initial improvement.
Fixes #113400
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