[PATCH] D69127: [DAGCombiner] widen zext of popcount based on target support
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 25 10:34:45 PDT 2019
spatel added a comment.
In D69127#1715638 <https://reviews.llvm.org/D69127#1715638>, @RKSimon wrote:
> any_extend might get generated when using ctpop for 'allones' tests:
>
> define i64 @var_ctpop_i32(i32 %a) {
> %1 = call i32 @llvm.ctpop.i32(i32 %a)
> %2 = zext i32 %1 to i64 ; SimplifyDemandedBits may turn zext (or sext) into aext
> %3 = and i64 %2, 32
> ret i64 %3
> }
> declare i32 @llvm.ctpop.i32(i32)
>
Thanks - I added a variant of this in:
rGb74d7e5cccb5 <https://reviews.llvm.org/rGb74d7e5cccb5eedb8675442a981a76f3873faf43>
I'll add a TODO comment here and follow-up to generalize for that case.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69127/new/
https://reviews.llvm.org/D69127
More information about the llvm-commits
mailing list