Commit ed52bdd
authored
[VPlan] Get Addr computation cost with scalar type if it is uniform for gather/scatter. (NFC) (llvm#150371)
This patch query `getAddressComputationCost()` with scalar type if the
address is uniform. This can help the cost for gather/scatter more
accurate.
In current LV, non consecutive VPWidenMemoryRecipe (gather/scatter) will
account the cost of address computation. But there are some cases that
the address is uniform across all lanes, that makes the address can be
calculated with scalar type and broadcast.
I have a followup optimization that tries to convert gather/scatter with
uniform memory access to scalar load/store + broadcast (and select if
needed). With this optimization, we can remove this temporary change.
This patch is preparation for llvm#149955 to prevent regressions.1 parent 9db7e8d commit ed52bdd
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3200 | 3200 | | |
3201 | 3201 | | |
3202 | 3202 | | |
3203 | | - | |
3204 | | - | |
3205 | 3203 | | |
3206 | 3204 | | |
| 3205 | + | |
| 3206 | + | |
| 3207 | + | |
| 3208 | + | |
| 3209 | + | |
| 3210 | + | |
| 3211 | + | |
| 3212 | + | |
| 3213 | + | |
3207 | 3214 | | |
3208 | 3215 | | |
3209 | 3216 | | |
| |||
0 commit comments