[PATCH] D78547: [TTI] getUserCost to return getCastInstrCost

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 08:04:15 PDT 2020


samparker marked an inline comment as done.
samparker added inline comments.


================
Comment at: llvm/test/Analysis/CostModel/X86/size-cost.ll:33
 ; CHECK-LABEL: 'bitcast_f64_i64'
-; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = bitcast double %x to i64
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r = bitcast double %x to i64
 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %r
----------------
spatel wrote:
> Let me know if I'm missing larger context, but this is not correct. A cast from xmm <-> gpr ("movq %xmm0, %rax") is not free in any sense on any x86 target AFAIK.
> 
> Do we need to fix the x86 override as a preliminary step?
I didn't expect it to be correct.. I'm happy to look into the fix.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78547





More information about the llvm-commits mailing list