This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Replace @llvm.wasm.popcnt with @llvm.ctpop.v16i8
ClosedPublic

Authored by tlively on Jul 21 2021, 4:03 PM.

Details

Summary

Use the standard target-independent intrinsic to take advantage of standard
optimizations.

Diff Detail

Event Timeline

tlively created this revision.Jul 21 2021, 4:03 PM
tlively requested review of this revision.Jul 21 2021, 4:03 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 21 2021, 4:03 PM
aheejin accepted this revision.Jul 21 2021, 4:34 PM
aheejin added inline comments.
llvm/test/CodeGen/WebAssembly/simd-unsupported.ll
13

Aren't these now... "supported"? (This file's name is simd-unsupported.ll, so...)

This revision is now accepted and ready to land.Jul 21 2021, 4:34 PM
tlively added inline comments.Jul 21 2021, 4:41 PM
llvm/test/CodeGen/WebAssembly/simd-unsupported.ll
13

No, I would say these are still unsupported because they don't map down to a single SIMD instruction. The i8x16.popcnt is still just part of a rather large expansion of the operation. Having i8x16.popcnt available makes the expansion better than before, though.

This revision was landed with ongoing or failed builds.Jul 21 2021, 4:46 PM
This revision was automatically updated to reflect the committed changes.