[PATCH] D47725: [SelectionDAG] Provide default expansion for rotates

Krzysztof Parzyszek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 5 14:18:15 PDT 2018


kparzysz added a comment.

Turns out the UREM approach has a downside: the UREM is legalized before it gets to the combiner, so on architectures that don't have div/mod, it will be expanded into a libcall.  I'm going to change it back to an AND.

The testcase rotate.ll already has a couple of cases where the expansion takes place (f1, f3, f5, and f7), but now it only checks that there was no rotate used.  I can add check for the actual assembly.


Repository:
  rL LLVM

https://reviews.llvm.org/D47725





More information about the llvm-commits mailing list