[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
Wed Aug 12 00:49:32 PDT 2009


On Tue, Aug 11, 2009 at 8:35 PM, Nick Lewycky<nicholas at mxc.ca> wrote:
> I like having one way to represent a given operation. But it's not
> obvious from "mul i32 %x, 2863311531" that the result is guaranteed to
> be slt %x.
>
> Maybe that's easy enough to determine that it could go into a helper
> function, but I'd like to see that algorithm first :)

It's essentially impossible; it's only true if %x is divisible by 3,
and we lose the only indication of that when the "exact sdiv"
disappears.

-Eli



More information about the llvm-commits mailing list