This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Replace SIMD int min/max builtins with patterns
ClosedPublic

Authored by tlively on Dec 13 2019, 5:10 PM.

Details

Summary

The instructions were originally implemented via builtins and
intrinsics so users would have to explicitly opt-in to using
them. This was useful while were validating whether these instructions
should have been merged into the spec proposal. Now that they have
been, we can use normal codegen patterns, so the intrinsics and
builtins are no longer useful.

Diff Detail

Event Timeline

tlively created this revision.Dec 13 2019, 5:10 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 13 2019, 5:10 PM

Unit tests: pass. 60871 tests passed, 0 failed and 726 were skipped.

clang-format: pass.

Build artifacts: console-log.txt, CMakeCache.txt, test-results.xml, diff.json

aheejin accepted this revision.Dec 16 2019, 11:27 AM
aheejin added inline comments.
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
189

Just curious, what gets assigned we don't do this? I thought the default value was Legal..

This revision is now accepted and ready to land.Dec 16 2019, 11:27 AM
tlively marked an inline comment as done.Dec 16 2019, 11:40 AM
tlively added inline comments.
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
189

When we don't do this, we get a sequence that does a compare and a select. You're right that the default is Legal for most things, but not for higher-level instructions like these.

This revision was automatically updated to reflect the committed changes.