[all-commits] [llvm/llvm-project] dd8e1a: [X86] LowerShift - track the number and location o...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Wed Dec 18 03:37:16 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dd8e1adbf22f9b84e9fc5ed65530df55a3c3b693
https://github.com/llvm/llvm-project/commit/dd8e1adbf22f9b84e9fc5ed65530df55a3c3b693
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2024-12-18 (Wed, 18 Dec 2024)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/test/CodeGen/X86/vec_shift6.ll
M llvm/test/CodeGen/X86/vector-fshl-sub128.ll
M llvm/test/CodeGen/X86/vector-fshr-sub128.ll
Log Message:
-----------
[X86] LowerShift - track the number and location of constant shift elements. (#120270)
We have several vector shift lowering strategies that have to analyse
the distribution of non-uniform constant vector shift amounts, at the
moment there is very little sharing of data between these analysis.
This patch creates a SmallDenseMap of the different LEGAL constant shift
amounts used, with a mask of which elements they are used in. So far
I've only updated the shuffle(immshift(x,c1),immshift(x,c2)) lowering
pattern to use it for clarity, there's several more that can be done in
followups. Its hoped that the proposed patch #117980 can be simplified
after this patch as well.
vec_shift6.ll - the existing shuffle(immshift(x,c1),immshift(x,c2))
lowering bails on out of range shift amounts, while this patch now skips
them and treats them as UNDEF - this means we manage to fold more cases
that before would have to lower to a SHL->MUL pattern, including some
legalized cases.
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