Hi Tim and other reviewers,
This patch fix the bug PR21675 (http://llvm.org/bugs/show_bug.cgi?id=21675). There is a bug about lowering llvm.ctpop.i32. Previously we use:
SDValue ZeroVec = DAG.getUNDEF(MVT::v8i8)
But ctpop is to do bit count. Using undef doesn't mean the upper bits are all zero.
There are some redundant instructions as follows:
fmov w0, s0 fmov d0, x0
But this should be optimized in other places.
This patch is by Wei-cheng Wang. Review please.
Thanks,
-Hao