[llvm-commits] [llvm] r169049 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp

Duncan Sands baldrick at free.fr
Sat Dec 1 03:24:18 PST 2012


Hi Pedro,

> I believe the comments at the beginning of the function are descriptive enough,
> here are the comments copied for your convenience
>
> //
> // Detect pattern:
> //
> // log2(Y*0.5)

why so special?  Why not turn log2(Y*Constant) into log2(Y) + log2(Constant)
for pretty much any constant, evaluating log2(Constant) at compile time?

Ciao, Duncan.



More information about the llvm-commits mailing list