[all-commits] [llvm/llvm-project] 9fd771: [KnownBits] isNonZero() - avoid expensive countPop...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Nov 8 04:59:46 PST 2020


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

  Changed paths:
    M llvm/include/llvm/Support/KnownBits.h

  Log Message:
  -----------
  [KnownBits] isNonZero() - avoid expensive countPopulation call. NFC.

We can just check for a null value.


  Commit: 0fe91ad463fea9d08cbcd640a62aa9ca2d8d05e0
      https://github.com/llvm/llvm-project/commit/0fe91ad463fea9d08cbcd640a62aa9ca2d8d05e0
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-11-08 (Sun, 08 Nov 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/funnel.ll

  Log Message:
  -----------
  [InstCombine] foldSelectFunnelShift - block poison in funnel shift value

As raised by @nlopes on D90382 - if this is not a rotate then the select was blocking poison from the 'shift-by-zero' non-TVal, but a funnel shift won't - so freeze it.


Compare: https://github.com/llvm/llvm-project/compare/e8dc17a2b771...0fe91ad463fe


More information about the All-commits mailing list