This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Fix the bug PR21675 about lowering llvm.ctpop.i32
ClosedPublic

Authored by HaoLiu on Dec 21 2014, 10:42 PM.

Details

Summary

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

Diff Detail

Event Timeline

HaoLiu retitled this revision from to [AArch64] Fix the bug PR21675 about lowering llvm.ctpop.i32.
HaoLiu updated this object.
HaoLiu edited the test plan for this revision. (Show Details)
HaoLiu added a reviewer: t.p.northover.
HaoLiu added a subscriber: Unknown Object (MLST).

ping...

As this is sent around Christmas holiday, maybe there is no one noticed this bug fix.

Thanks,
-Hao

HaoLiu accepted this revision.May 3 2015, 10:30 PM
HaoLiu added a reviewer: HaoLiu.
This revision is now accepted and ready to land.May 3 2015, 10:30 PM
HaoLiu closed this revision.May 3 2015, 10:30 PM