================ @@ -3599,6 +3615,15 @@ bool SparcTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT, bool SparcTargetLowering::isCtlzFast() const { return Subtarget->isVIS3(); } +bool SparcTargetLowering::isCheapToSpeculateCttz(Type *Ty) const { + // We lack native cttz, however, + // On 64-bit targets it is cheap to implement it in terms of popc. + if (Subtarget->is64Bit() && Subtarget->usePopc()) + return true; + // Otherwise, implementing cttz in terms of ctlz is still cheap. + return isCheapToSpeculateCtlz(Ty); ---------------- s-barannikov wrote:
Never mind, I saw it in tests :) https://github.com/llvm/llvm-project/pull/135894 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits