This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Optimize ISel for SIMD Boolean reductions
ClosedPublic

Authored by tlively on Jun 18 2019, 4:31 PM.

Details

Summary

Converting the result *.{all,any}_true to a bool at the source level
generates LLVM IR that compares the result to 0. This check is
redundant since these instructions already return either 0 or 1 and
therefore conform to the BooleanContents setting for WebAssembly. This
CL adds patterns to detect and remove such redundant operations on the
result of Boolean reductions.

Event Timeline

tlively created this revision.Jun 18 2019, 4:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2019, 4:31 PM
dschuff accepted this revision.Jun 18 2019, 4:43 PM
This revision is now accepted and ready to land.Jun 18 2019, 4:43 PM
This revision was automatically updated to reflect the committed changes.