[PATCH] [AArch64] Lower sdiv x, pow2 using add + select + shift.

Silviu Baranga silviu.baranga at gmail.com
Thu Jul 10 03:26:55 PDT 2014


James,

It seems to me that the branch mispredict cost for the case where the values of X are random would outweigh the benefits of this transformation for your alternative code sequence, even on OoO cores.

I don't think it would entirely ok to make that assumption here (X >= 0 predictable).

This point obviously doesn't matter for the csel solution.

Thanks,
Silviu

http://reviews.llvm.org/D4438






More information about the llvm-commits mailing list