[PATCH] D27246: Bug fix and a proposed improvement in integer division expansion

Dmitri Shtilman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 1 13:36:52 PST 2016


dshtilman added a comment.

In https://reviews.llvm.org/D27246#608927, @joerg wrote:

> I don't know which platforms want to use this code, but keep in mind that ffs and equivalent builtins are not available on all platforms either.


Sure, although here we are looking at platforms that choose to expand each integer division into a large loop. Special cases code is intended to try to skip that loop, it's already counting leading zeroes. If these builtins are not available, they would be lowered which would likely still be beneficial. Alternatively, a platform could have a custom expansion based on what it has available.


Repository:
  rL LLVM

https://reviews.llvm.org/D27246





More information about the llvm-commits mailing list