[InstCombine] Replace getLogBase2 internal helper with ConstantExpr::getExactLogBase2...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 11 Oct 2020 09:31:17 +0000 (10:31 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 11 Oct 2020 09:31:17 +0000 (10:31 +0100)
commitb752daa26b641550e1d5b99d4b89230011c2c0cc
tree33116ebb24b93ccab28e219ed466148f59ed33f4
parent93377888ae89560ba6d3976e2762d3d4724c4dfd
[InstCombine] Replace getLogBase2 internal helper with ConstantExpr::getExactLogBase2. NFCI.

This exposes the helper for other power-of-2 instcombine folds that I'm intending to add vector support to.

The helper only operated on power-of-2 constants so getExactLogBase2 is a more accurate name.
llvm/include/llvm/IR/Constants.h
llvm/lib/IR/Constants.cpp
llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp