[PATCH] D115016: [CostModel][X86] Add i64 mul cost for avx as 1cy

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 3 01:51:24 PST 2021


RKSimon added a comment.

> i64 mul cost is 1cy for most cpu that support avx. Currently all X86 cpu uses i64 mul cost in X64 cost table represents a worst case which is not true for most recent cpus.

As others have already said, this isn't true for "most cpu" - all AMD cpus double pump for i64 (and Jaguar + Bulldozer families can be even slower depending on the exact values being multiplied), and the cost tables provide worst case costs.

This is a classic example of where having cost tables driven from (accurate) scheduler models would be much more useful (D46276 <https://reviews.llvm.org/D46276>), but there has been very little interest in helping polish those models to make that a viable option.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115016/new/

https://reviews.llvm.org/D115016



More information about the llvm-commits mailing list