[llvm] TTI: Fix special casing vectorization costs of saturating add/sub (PR #97463)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 26 12:44:10 PDT 2024
arsenm wrote:
> We would hit the same problem on an i64 system if `getTypeLegalizationCost(i128) == {i64, 2}`. The same is true for any other larger-than-legal type and I'm not sure if the best answer is to try and get ever target to add the correct costs for every type that isn't legal. It's OK to override custom costs for custom operations but for these it feels like there should be a more generic way to handle them.
So it's a question of what the default custom lowered cost is in the presence of type legalization. The code here is also ignoring the possibility of targets custom lowering with illegal types. It's pretty terrible that this needs to guess at the all the steps legalization might take later
https://github.com/llvm/llvm-project/pull/97463
More information about the llvm-commits
mailing list