Commit 1b45c47
committed
[SLP] getVectorCallCosts - don't provide scalar argument data for vector IntrinsicCostAttributes
getVectorCallCosts determines the cost of a vector intrinsic, based off an existing scalar intrinsic call - but we were including the scalar argument data to the IntrinsicCostAttributes, which meant that not only was the cost calculation not type-only based, it was making incorrect assumptions about constant values etc.
This also exposed an issue that x86 relied on fallback calculations for funnel shift costs - this is great when we have the argument data as that improves the accuracy of uniform shift amounts etc., but meant that type-only costs would default to Cost=2 for all custom lowered funnel shifts, which was far too cheap.
This is the reverse of llvm#124129 where we weren't including argument data when we could.
Fixes llvm#639801 parent 625e0a4 commit 1b45c47
File tree
4 files changed
+409
-503
lines changed- llvm
- lib
- Target/X86
- Transforms/Vectorize
- test/Transforms/SLPVectorizer/X86
4 files changed
+409
-503
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4719 | 4719 | | |
4720 | 4720 | | |
4721 | 4721 | | |
| 4722 | + | |
| 4723 | + | |
| 4724 | + | |
| 4725 | + | |
| 4726 | + | |
| 4727 | + | |
| 4728 | + | |
| 4729 | + | |
| 4730 | + | |
| 4731 | + | |
| 4732 | + | |
| 4733 | + | |
| 4734 | + | |
| 4735 | + | |
| 4736 | + | |
| 4737 | + | |
| 4738 | + | |
| 4739 | + | |
4722 | 4740 | | |
4723 | 4741 | | |
4724 | 4742 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9031 | 9031 | | |
9032 | 9032 | | |
9033 | 9033 | | |
9034 | | - | |
9035 | | - | |
9036 | | - | |
| 9034 | + | |
9037 | 9035 | | |
9038 | 9036 | | |
9039 | 9037 | | |
| |||
0 commit comments