This is an archive of the discontinued LLVM Phabricator instance.

[NVPTX] Improve lowering of llvm.ctpop.
ClosedPublic

Authored by jlebar on Jan 13 2017, 7:18 PM.

Details

Summary

Avoid an unnecessary conversion operation when using the result of
ctpop.i32 or ctpop.i16 as an i32, as in both cases the ptx instruction
we run returns an i32.

(Previously if we used the value as an i32, we'd do an unnecessary
zext+trunc.)

Event Timeline

jlebar updated this revision to Diff 84423.Jan 13 2017, 7:18 PM
jlebar retitled this revision from to [NVPTX] Improve lowering of llvm.ctpop..
jlebar updated this object.
jlebar added a reviewer: tra.
jlebar added a subscriber: llvm-commits.
tra accepted this revision.Jan 17 2017, 1:36 PM
This revision is now accepted and ready to land.Jan 17 2017, 1:36 PM
This revision was automatically updated to reflect the committed changes.