diff options
author | Jim Grosbach <grosbach@apple.com> | 2013-08-29 22:41:46 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2013-08-29 22:41:46 +0000 |
commit | 88acef0b8e93d065aa4de164422ce4c546a7cd5f (patch) | |
tree | d062d7830b9109b7951bc1e8658ebc32d518574c /lib/Target/ARM | |
parent | ff372dc18d0d569cbcfb7346eb891d6a96219043 (diff) | |
download | external_llvm-88acef0b8e93d065aa4de164422ce4c546a7cd5f.zip external_llvm-88acef0b8e93d065aa4de164422ce4c546a7cd5f.tar.gz external_llvm-88acef0b8e93d065aa4de164422ce4c546a7cd5f.tar.bz2 |
ARM: Improve pattern for isel mul of vector by scalar.
In addition to recognizing when the multiply's second argument is
coming from an explicit VDUPLANE, also look for a plain scalar
f32 reference and reference it via the corresponding vector
lane.
rdar://14870054
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189619 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r-- | lib/Target/ARM/ARMInstrNEON.td | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMInstrNEON.td b/lib/Target/ARM/ARMInstrNEON.td index 49ae334..f1bd37e 100644 --- a/lib/Target/ARM/ARMInstrNEON.td +++ b/lib/Target/ARM/ARMInstrNEON.td @@ -4022,6 +4022,17 @@ def : Pat<(v4f32 (fmul (v4f32 QPR:$src1), (DSubReg_i32_reg imm:$lane))), (SubReg_i32_lane imm:$lane)))>; + +def : Pat<(v2f32 (fmul DPR:$Rn, (NEONvdup (f32 SPR:$Rm)))), + (VMULslfd DPR:$Rn, + (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), SPR:$Rm, ssub_0), + (i32 0))>; +def : Pat<(v4f32 (fmul QPR:$Rn, (NEONvdup (f32 SPR:$Rm)))), + (VMULslfq QPR:$Rn, + (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), SPR:$Rm, ssub_0), + (i32 0))>; + + // VQDMULH : Vector Saturating Doubling Multiply Returning High Half defm VQDMULH : N3VInt_HS<0, 0, 0b1011, 0, N3RegFrm, IIC_VMULi16D, IIC_VMULi32D, IIC_VMULi16Q, IIC_VMULi32Q, |