[all-commits] [llvm/llvm-project] 4c38c3: [ValueTracking] Teach canCreateUndefOrPoison that ...

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Mar 23 12:47:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c38c35c8d846a3ca1409f17eea776d15bcbcd4e
      https://github.com/llvm/llvm-project/commit/4c38c35c8d846a3ca1409f17eea776d15bcbcd4e
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-03-23 (Tue, 23 Mar 2021)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Transforms/InstSimplify/select.ll

  Log Message:
  -----------
  [ValueTracking] Teach canCreateUndefOrPoison that ctpop does not create undef or poison.

This select of ctpop with 0 pattern can get left behind after
loop idiom recognize converts a loop to ctpop. LLVM 10 was able
to optimize this, but LLVM 11 and later is not. The difference
seems to be that some select transforms are now limited based
on canCreateUndefOrPoison.

Teaching canCreateUndefOrPoison about ctpop restores the
LLVM 10 codegen.

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




More information about the All-commits mailing list