Page MenuHomePhabricator

[WebAssembly] Codegen for f64x2.convert_low_i32x4_{s,u}
ClosedPublic

Authored by tlively on Tue, Apr 13, 4:23 PM.

Details

Summary

Add a custom DAG combine and ISD opcode for detecting patterns like

(uint_to_fp (extract_subvector ...))

before the extract_subvector is expanded to ensure that they will ultimately
lower to f64x2.convert_low_i32x4_{s,u} instructions. Since these instructions
are no longer prototypes and can now be produced via standard IR, this commit
also removes the target intrinsics and builtins that had been used to prototype
the instructions.

Diff Detail

Event Timeline

tlively created this revision.Tue, Apr 13, 4:23 PM
tlively requested review of this revision.Tue, Apr 13, 4:23 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptTue, Apr 13, 4:23 PM
aheejin accepted this revision.Wed, Apr 14, 3:44 AM
aheejin added inline comments.
llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
1104–1107

Not related to this CL, but we write encoding as decimals for some instructions and hexadecimals in others?

This revision is now accepted and ready to land.Wed, Apr 14, 3:44 AM
This revision was automatically updated to reflect the committed changes.
tlively added inline comments.Wed, Apr 14, 12:39 PM
llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
1104–1107

I prefer hexadecimal because that's what all the SIMD documentation uses so it's easier to check for correctness, but for some reason I used to use decimal. I think I didn't realize hexadecimal was an option in .td files for a while. I would like to converge on using hexadecimal uniformly eventually.