[all-commits] [llvm/llvm-project] b5113b: [Instcombine]Transform reduction+(sext/zext(<n x i...

cilkplus via All-commits all-commits at lists.llvm.org
Thu Jul 8 07:57:41 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b5113bff461b87fa214fa8fafdffd8eaaf8cf0e7
      https://github.com/llvm/llvm-project/commit/b5113bff461b87fa214fa8fafdffd8eaaf8cf0e7
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2021-07-08 (Thu, 08 Jul 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/reduction-add-sext-zext-i1.ll

  Log Message:
  -----------
  [Instcombine]Transform reduction+(sext/zext(<n x i1>) to <n x im>) to [-]zext/trunc(ctpop(bitcast <n x i1> to in)) to im.

Some of the SPEC tests end up with reduction+(sext/zext(<n x i1>) to <n x im>) pattern, which can be transformed to [-]zext/trunc(ctpop(bitcast <n x i1> to in)) to im.
Also, reduction+(<n x i1>) can be transformed to ctpop(bitcast <n x i1> to in) & 1 != 0.

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




More information about the All-commits mailing list