[all-commits] [llvm/llvm-project] b752da: [InstCombine] Replace getLogBase2 internal helper ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Oct 11 02:32:41 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b752daa26b641550e1d5b99d4b89230011c2c0cc
      https://github.com/llvm/llvm-project/commit/b752daa26b641550e1d5b99d4b89230011c2c0cc
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-10-11 (Sun, 11 Oct 2020)

  Changed paths:
    M llvm/include/llvm/IR/Constants.h
    M llvm/lib/IR/Constants.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp

  Log Message:
  -----------
  [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.




More information about the All-commits mailing list