[DAGCombiner] widen any_ext of popcount based on target support
authorSanjay Patel <spatel@rotateright.com>
Mon, 28 Oct 2019 14:04:30 +0000 (10:04 -0400)
committerSanjay Patel <spatel@rotateright.com>
Mon, 28 Oct 2019 14:07:12 +0000 (10:07 -0400)
commit1ebd4a2e3ad0e95ee915ed5a99aab53f8fe7da95
tree742519bc1db5779b4c51c937f09ee413ed7bab12
parent35cb3ee4ca477095bb3dd74f60ab932e185be63f
[DAGCombiner] widen any_ext of popcount based on target support

This enhances D69127 (rGe6c145e0548e3b3de6eab27e44e1504387cf6b53)
to handle the looser "any_extend" cast in addition to zext.

This is a prerequisite step for canonicalizing in the other direction
(narrow the popcount) in IR - PR43688:
https://bugs.llvm.org/show_bug.cgi?id=43688
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/PowerPC/popcnt-zext.ll
llvm/test/CodeGen/PowerPC/popcnt.ll