[llvm-commits] [llvm] r78714 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/exact-sdiv.ll

Eli Friedman eli.friedman at gmail.com
Tue Aug 11 15:16:10 PDT 2009


On Tue, Aug 11, 2009 at 1:47 PM, Dan Gohman<gohman at apple.com> wrote:
> Author: djg
> Date: Tue Aug 11 15:47:47 2009
> New Revision: 78714
>
> URL: http://llvm.org/viewvc/llvm-project?rev=78714&view=rev
> Log:
> Optimize exact sdiv by a constant power of 2 to ashr.

Do you think we want to optimize exact sdiv by any constant integer in
instcombine, or should we put that off to CodeGen?  For example,
should instcombine optimize "exact sdiv i32 %x, 3" to "mul i32 %x,
2863311531"?

-Eli



More information about the llvm-commits mailing list