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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 09:10:19 PDT 2020


spatel 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
----------------
samparker wrote:
> 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.
Sounds good - thanks!


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