[X86][CostModel] Correct the costs for truncate to a mask register with avx512
authorCraig Topper <craig.topper@intel.com>
Tue, 28 Apr 2020 17:06:29 +0000 (10:06 -0700)
committerCraig Topper <craig.topper@intel.com>
Tue, 28 Apr 2020 17:39:36 +0000 (10:39 -0700)
commitd42192c50f7b596590aefa3251513207123609f6
tree014c82e49e2acae87681fe445f2eb59487612a01
parent01b5f521408d943dcb05455c5168ae19bcfaa98a
[X86][CostModel] Correct the costs for truncate to a mask register with avx512

I've modified isTruncateFree to get an accurate cost for types that need to be split. I'm planning to look into fixing it for all vectors, but need more cost cleanups first.

Differential Revision: https://reviews.llvm.org/D78973
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86TargetTransformInfo.cpp
llvm/test/Analysis/CostModel/X86/cast.ll
llvm/test/Analysis/CostModel/X86/min-legal-vector-width.ll
llvm/test/Analysis/CostModel/X86/trunc.ll