diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-11-25 05:38:48 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-11-25 05:38:48 +0000 |
commit | e8bb6e26b83e08631ad336bb0d8076787b858c34 (patch) | |
tree | 39b8a0ef4c4655e7b1cfd321eb8d68b83e0e56dd /lib | |
parent | 83a5c7898e26166199ef8a55527d176b5dc4cb04 (diff) | |
download | external_llvm-e8bb6e26b83e08631ad336bb0d8076787b858c34.zip external_llvm-e8bb6e26b83e08631ad336bb0d8076787b858c34.tar.gz external_llvm-e8bb6e26b83e08631ad336bb0d8076787b858c34.tar.bz2 |
Merging r195330:
------------------------------------------------------------------------
r195330 | apazos | 2013-11-21 00:16:15 -0800 (Thu, 21 Nov 2013) | 5 lines
Implemented Neon scalar vdup_lane intrinsics.
Fixed scalar dup alias and added test case.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195612 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/AArch64/AArch64InstrNEON.td | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/Target/AArch64/AArch64InstrNEON.td b/lib/Target/AArch64/AArch64InstrNEON.td index 5b6168e..c0c572a 100644 --- a/lib/Target/AArch64/AArch64InstrNEON.td +++ b/lib/Target/AArch64/AArch64InstrNEON.td @@ -5883,16 +5883,37 @@ defm : NeonI_SDUP<Neon_low2D, Neon_High2D, v1i64, v2i64>; defm : NeonI_SDUP<Neon_low4f, Neon_High4f, v2f32, v4f32>; defm : NeonI_SDUP<Neon_low2d, Neon_High2d, v1f64, v2f64>; -// Patterns for vector extract of FP data using scalar DUP instructions +// Patterns for vector extract of FP data using scalar DUP instructions defm : NeonI_Scalar_DUP_Elt_pattern<DUPsv_S, f32, v4f32, neon_uimm2_bare, v2f32, v4f32, neon_uimm1_bare>; defm : NeonI_Scalar_DUP_Elt_pattern<DUPdv_D, f64, v2f64, neon_uimm1_bare, v1f64, v2f64, neon_uimm0_bare>; +multiclass NeonI_Scalar_DUP_Vec_pattern<Instruction DUPI, + ValueType ResTy, ValueType OpTy,Operand OpLImm, + ValueType NOpTy, ValueType ExTy, Operand OpNImm> { + + def : Pat<(ResTy (extract_subvector (OpTy VPR128:$Rn), OpLImm:$Imm)), + (ResTy (DUPI VPR128:$Rn, OpLImm:$Imm))>; + + def : Pat<(ResTy (extract_subvector (NOpTy VPR64:$Rn), OpNImm:$Imm)), + (ResTy (DUPI + (ExTy (SUBREG_TO_REG (i64 0), VPR64:$Rn, sub_64)), + OpNImm:$Imm))>; +} +// Patterns for extract subvectors of v1ix data using scalar DUP instructions +defm : NeonI_Scalar_DUP_Vec_pattern<DUPbv_B, + v1i8, v16i8, neon_uimm4_bare, v8i8, v16i8, neon_uimm3_bare>; +defm : NeonI_Scalar_DUP_Vec_pattern<DUPhv_H, + v1i16, v8i16, neon_uimm3_bare, v4i16, v8i16, neon_uimm2_bare>; +defm : NeonI_Scalar_DUP_Vec_pattern<DUPsv_S, + v1i32, v4i32, neon_uimm2_bare, v2i32, v4i32, neon_uimm1_bare>; + + multiclass NeonI_Scalar_DUP_alias<string asmop, string asmlane, Instruction DUPI, Operand OpImm, RegisterClass ResRC> { - def : NeonInstAlias<!strconcat(asmop, "$Rd, $Rn." # asmlane # "[$Imm]"), + def : NeonInstAlias<!strconcat(asmop, "$Rd, $Rn" # asmlane # "[$Imm]"), (DUPI ResRC:$Rd, VPR128:$Rn, OpImm:$Imm), 0b0>; } |