[CostModel][X86] AVX512 truncation ops are slower than cost models indicate.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 27 May 2021 14:36:29 +0000 (15:36 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 27 May 2021 15:07:42 +0000 (16:07 +0100)
commitfe8d97cbe5ecec50731650947b4e3b45f49228f8
tree21e8a61628f3800120a8b374904309c0226521c0
parente49d6e16235ac48e4dc55535a571989925b8da56
[CostModel][X86] AVX512 truncation ops are slower than cost models indicate.

The SkylakeServer model (and later IceLake/TigerLake targets according to Agner) have the PMOV truncations as uops=2, rthroughput=2 instructions.

Noticed while trying to reduce the diffs between cost tables and llvm-mca analysis.
llvm/lib/Target/X86/X86TargetTransformInfo.cpp
llvm/test/Analysis/CostModel/X86/arith.ll
llvm/test/Analysis/CostModel/X86/trunc.ll