[all-commits] [llvm/llvm-project] 608242: Add tests for ctpop(Pow2); NFC

goldsteinn via All-commits all-commits at lists.llvm.org
Sat Jan 21 23:08:49 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6082420945c887cf413194a393550b8303ed5ec3
      https://github.com/llvm/llvm-project/commit/6082420945c887cf413194a393550b8303ed5ec3
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-01-21 (Sat, 21 Jan 2023)

  Changed paths:
    A llvm/test/Transforms/InstCombine/ctpop-pow2.ll

  Log Message:
  -----------
  Add tests for ctpop(Pow2); NFC

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D142252


  Commit: c9755d80a689658d0070fb9bcbd7dd446e6ab784
      https://github.com/llvm/llvm-project/commit/c9755d80a689658d0070fb9bcbd7dd446e6ab784
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-01-21 (Sat, 21 Jan 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/ctpop-pow2.ll

  Log Message:
  -----------
  Transform ctpop(Pow2) -> icmp ne Pow2, 0

This makes folding to 0/1 later on easier and regardless `icmp ne` is
'probably' faster on most targets (especially for vectors).

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D142253


Compare: https://github.com/llvm/llvm-project/compare/3ed8b93714c6...c9755d80a689


More information about the All-commits mailing list