diff options
| author | Chuang-Yu Cheng <cycheng@multicorewareinc.com> | 2016-03-26 05:46:11 +0000 |
|---|---|---|
| committer | Chuang-Yu Cheng <cycheng@multicorewareinc.com> | 2016-03-26 05:46:11 +0000 |
| commit | 065969ec8e492eb8f9724492bda55d3ec9b7e68d (patch) | |
| tree | 0865e77923eacbad0f8633a5aaf8bd618ec13f9b /llvm/lib/Target/PowerPC/PPCInstrFormats.td | |
| parent | 01e321306b9f505afa2c15428bfcb2143a70a95f (diff) | |
| download | bcm5719-llvm-065969ec8e492eb8f9724492bda55d3ec9b7e68d.tar.gz bcm5719-llvm-065969ec8e492eb8f9724492bda55d3ec9b7e68d.zip | |
[Power9] Implement new altivec instructions: permute, count zero, extend sign, negate, parity, shift/rotate, mul10
This change implements the following vector operations:
- vclzlsbb vctzlsbb vctzb vctzd vctzh vctzw
- vextsb2w vextsh2w vextsb2d vextsh2d vextsw2d
- vnegd vnegw
- vprtybd vprtybq vprtybw
- vbpermd vpermr
- vrlwnm vrlwmi vrldnm vrldmi vslv vsrv
- vmul10cuq vmul10uq vmul10ecuq vmul10euq
28 instructions
Thanks Nemanja, Kit for invaluable hints and discussion!
Reviewers: hal, nemanja, kbarton, tjablin, amehsan
Phabricator: http://reviews.llvm.org/D15887
llvm-svn: 264504
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCInstrFormats.td')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCInstrFormats.td | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrFormats.td b/llvm/lib/Target/PowerPC/PPCInstrFormats.td index 999359bf3ad..b11565ce8b5 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrFormats.td +++ b/llvm/lib/Target/PowerPC/PPCInstrFormats.td @@ -1609,6 +1609,21 @@ class VXForm_5<bits<11> xo, dag OOL, dag IOL, string asmstr, let Inst{21-31} = xo; } +// e.g. [PO VRT EO VRB XO] +class VXForm_RD5_XO5_RS5<bits<11> xo, bits<5> eo, dag OOL, dag IOL, + string asmstr, InstrItinClass itin, list<dag> pattern> + : I<4, OOL, IOL, asmstr, itin> { + bits<5> RD; + bits<5> VB; + + let Pattern = pattern; + + let Inst{6-10} = RD; + let Inst{11-15} = eo; + let Inst{16-20} = VB; + let Inst{21-31} = xo; +} + /// VXForm_CR - VX crypto instructions with "VRT, VRA, ST, SIX" class VXForm_CR<bits<11> xo, dag OOL, dag IOL, string asmstr, InstrItinClass itin, list<dag> pattern> |

