diff options
Diffstat (limited to 'llvm/lib/Target/AArch64/SVEInstrFormats.td')
| -rw-r--r-- | llvm/lib/Target/AArch64/SVEInstrFormats.td | 62 | 
1 files changed, 62 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/SVEInstrFormats.td b/llvm/lib/Target/AArch64/SVEInstrFormats.td index b4b46d731e3..15c1275f259 100644 --- a/llvm/lib/Target/AArch64/SVEInstrFormats.td +++ b/llvm/lib/Target/AArch64/SVEInstrFormats.td @@ -39,3 +39,65 @@ multiclass sve_int_bin_cons_arit_0<bits<3> opc, string asm> {    def _S : sve_int_bin_cons_arit_0<0b10, opc, asm, ZPR32>;    def _D : sve_int_bin_cons_arit_0<0b11, opc, asm, ZPR64>;  } + +//===----------------------------------------------------------------------===// +// SVE Permute - In Lane Group +//===----------------------------------------------------------------------===// + +class sve_int_perm_bin_perm_zz<bits<3> opc, bits<2> sz8_64, string asm, +                               ZPRRegOp zprty> +: I<(outs zprty:$Zd), (ins zprty:$Zn, zprty:$Zm), +  asm, "\t$Zd, $Zn, $Zm", +  "", +  []>, Sched<[]> { +  bits<5> Zd; +  bits<5> Zm; +  bits<5> Zn; +  let Inst{31-24} = 0b00000101; +  let Inst{23-22} = sz8_64; +  let Inst{21}    = 0b1; +  let Inst{20-16} = Zm; +  let Inst{15-13} = 0b011; +  let Inst{12-10} = opc; +  let Inst{9-5}   = Zn; +  let Inst{4-0}   = Zd; +} + +multiclass sve_int_perm_bin_perm_zz<bits<3> opc, string asm> { +  def _B : sve_int_perm_bin_perm_zz<opc, 0b00, asm, ZPR8>; +  def _H : sve_int_perm_bin_perm_zz<opc, 0b01, asm, ZPR16>; +  def _S : sve_int_perm_bin_perm_zz<opc, 0b10, asm, ZPR32>; +  def _D : sve_int_perm_bin_perm_zz<opc, 0b11, asm, ZPR64>; +} + +//===----------------------------------------------------------------------===// +// SVE Permute - Predicates Group +//===----------------------------------------------------------------------===// + +class sve_int_perm_bin_perm_pp<bits<3> opc, bits<2> sz8_64, string asm, +                               PPRRegOp pprty> +: I<(outs pprty:$Pd), (ins pprty:$Pn, pprty:$Pm), +  asm, "\t$Pd, $Pn, $Pm", +  "", +  []>, Sched<[]> { +  bits<4> Pd; +  bits<4> Pm; +  bits<4> Pn; +  let Inst{31-24} = 0b00000101; +  let Inst{23-22} = sz8_64; +  let Inst{21-20} = 0b10; +  let Inst{19-16} = Pm; +  let Inst{15-13} = 0b010; +  let Inst{12-10} = opc; +  let Inst{9}     = 0b0; +  let Inst{8-5}   = Pn; +  let Inst{4}     = 0b0; +  let Inst{3-0}   = Pd; +} + +multiclass sve_int_perm_bin_perm_pp<bits<3> opc, string asm> { +  def _B : sve_int_perm_bin_perm_pp<opc, 0b00, asm, PPR8>; +  def _H : sve_int_perm_bin_perm_pp<opc, 0b01, asm, PPR16>; +  def _S : sve_int_perm_bin_perm_pp<opc, 0b10, asm, PPR32>; +  def _D : sve_int_perm_bin_perm_pp<opc, 0b11, asm, PPR64>; +}
\ No newline at end of file  | 

