Skip to content

Commit

Permalink
Auto merge of #41818 - michaelwu:hvx-v60, r=nagisa
Browse files Browse the repository at this point in the history
Add support for Hexagon v60 HVX intrinsics

HVX is a SIMD coprocessor available on newer hexagon cores. It can be configured for 512 or 1024 bit registers, and some instructions use pairs of registers. It only does integer operations, but it probably has every integer operation you'd want for 8/16/32 bit elements.

There are a lot of intrinsics. The generator outputs 582 of them. I probably got some wrong. I did some scripting to make sure that every llvm intrinsic name exists, but intrinsic names provided for programs have only been compared by eye to Qualcomm's own names. 64/128 is also appended to the names to select between 512/1024 bit. The C intrinsics don't do this, but they only expose one set, selected at compile time.

The json specifying the intrinsics required a bit of duplication since I didn't see an easy way to specify combinations of signed/unsigned types (eg. u(8-16) and s(16-32)). I also didn't see an easy way to specify variants of instructions like saturating or rounding.

Basic multiplication and load/store tested on the hexagon simulator.
  • Loading branch information
bors committed May 8, 2017
2 parents 9956e81 + cc4efd1 commit 70198a0
Show file tree
Hide file tree
Showing 4 changed files with 4,288 additions and 1 deletion.
Loading

0 comments on commit 70198a0

Please sign in to comment.