Commit 11e457c
authored
[X86] Use vectorized i256 bit counts when we know the source originated from the vector unit (#171589)
Currently we only permit i256 CTTZ/CTLZ AVX512 lowering when the source
is loadable as GPR->FPU transition costs would outweigh the
vectorization benefit.
This patch checks for other cases where the source can avoid the GPR - a
mayFoldToVector helper checks for a bitcast originally from a vector
type, as well as constant values and the original mayFoldLoad check.
There will be other cases for the mayFoldToVector helper, but I've just
used this for CTTZ/CTLZ initially.1 parent 9339601 commit 11e457c
File tree
2 files changed
+114
-229
lines changed- llvm
- lib/Target/X86
- test/CodeGen/X86
2 files changed
+114
-229
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2846 | 2846 | | |
2847 | 2847 | | |
2848 | 2848 | | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
2849 | 2858 | | |
2850 | 2859 | | |
2851 | 2860 | | |
| |||
33958 | 33967 | | |
33959 | 33968 | | |
33960 | 33969 | | |
33961 | | - | |
| 33970 | + | |
33962 | 33971 | | |
33963 | 33972 | | |
33964 | 33973 | | |
| |||
0 commit comments