[PATCH] D89578: [CostModel] Return TCC_Expensive for non-speculatable ctlz/cttz.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 01:53:33 PDT 2020


RKSimon added inline comments.


================
Comment at: llvm/test/CodeGen/X86/dagcombine-select.ll:438-441
+; NOBMI-NEXT:    testl %edi, %edi
+; NOBMI-NEXT:    je .LBB26_2
+; NOBMI-NEXT:  # %bb.1: # %select.false.sink
+; NOBMI-NEXT:    bsfl %edi, %eax
----------------
spatel wrote:
> I think we would view this as a regression based on https://bugs.llvm.org/PR46203 / 2328cab16ccd8f17fee782c29fb844662c089fbb
> 
> Do we need to adjust the isCheapToSpeculateXXXX APIs to acknowledge the zero-is-undef parameter of the intrinsic?
Yes, it feels like we're going to need some combo of checks for zero-is-undef and if the value is known-never-zero if we can. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89578



More information about the llvm-commits mailing list