Home | History | Annotate | Download | only in InstCombine

Lines Matching defs:Log2

289 // log2(Y*0.5)
294 static void detectLog2OfHalf(Value *&Op, Value *&Y, IntrinsicInst *&Log2) {
302 if (II->getIntrinsicID() != Intrinsic::log2 || !II->hasUnsafeAlgebra())
304 Log2 = II;
477 // X * log2(0.5*Y) = X*log2(Y) - X
481 IntrinsicInst *Log2;
482 detectLog2OfHalf(Op0, OpY, Log2);
486 detectLog2OfHalf(Op1, OpY, Log2);
493 Log2->setArgOperand(0, OpY);
494 Value *FMulVal = Builder->CreateFMul(OpX, Log2);
496 FMul->copyFastMathFlags(Log2);
498 FSub->copyFastMathFlags(Log2);
921 // sdiv X, C --> ashr exact X, log2(C)