This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Implement i64x2 comparisons
ClosedPublic

Authored by tlively on Mar 30 2021, 3:09 PM.

Details

Summary

Removes the prototype builtin and intrinsic for i64x2.eq and implements that
instruction as well as the other i64x2 comparison instructions in the final SIMD
spec. Unsigned comparisons were not included in the final spec, so they still
need to be scalarized via a custom lowering.

Diff Detail

Event Timeline

tlively created this revision.Mar 30 2021, 3:09 PM
tlively requested review of this revision.Mar 30 2021, 3:09 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 30 2021, 3:09 PM
nemequ added a subscriber: nemequ.Mar 30 2021, 3:25 PM
dschuff accepted this revision.Mar 30 2021, 4:30 PM
dschuff added inline comments.
clang/include/clang/Basic/BuiltinsWebAssembly.def
218

Is the builtin/intrinsic wrong now? Or just not necessary because we can use builtin operators?

llvm/test/CodeGen/WebAssembly/simd-select.ll
312–313

pre-existing, but is there a reason why the CHECKs here are in the middle of the IR function signature?

This revision is now accepted and ready to land.Mar 30 2021, 4:30 PM
aheejin accepted this revision.Mar 30 2021, 6:53 PM
tlively added inline comments.Mar 31 2021, 10:19 AM
clang/include/clang/Basic/BuiltinsWebAssembly.def
218

Just not necessary any more. That was only there to make sure no one could use the prototype instruction by accident.

llvm/test/CodeGen/WebAssembly/simd-select.ll
312–313

Wow, I hadn't noticed that. Will investigate.

tlively added inline comments.Mar 31 2021, 10:37 AM
llvm/test/CodeGen/WebAssembly/simd-select.ll
312–313

Aha, it's likely because the regex in update_llc_test_checks.py does not know how to recognize when the parameter list is continued on the next line. It only recognizes the first line of the function as the declaration line and places the checks immediately after it.

I'll fix this before I land the patch. Better to have a long parameter declaration line than a split up parameter declaration line!

This revision was landed with ongoing or failed builds.Mar 31 2021, 10:46 AM
This revision was automatically updated to reflect the committed changes.