[PATCH] D53314: [ARM][NFCI] Do not fuse VADD and VMUL, continued (1/2)

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 16 01:56:15 PDT 2018


SjoerdMeijer created this revision.
SjoerdMeijer added reviewers: samparker, t.p.northover, dmgreen.
Herald added a reviewer: javed.absar.
Herald added subscribers: chrib, kristof.beyls.

This is a follow up of https://reviews.llvm.org/rL342874, which stopped fusing muls and adds into VMLAs
for performance reasons on the Cortex-M4 and Cortex-M33.  This is a serie of 2
patches, that is trying to achieve the same for VFMA.  The second column in the
table below shows what we were generating before https://reviews.llvm.org/rL342874, the second column
what changed with https://reviews.llvm.org/rL342874, and the last column what we want with these 2
patches:

      
  --------------------------------------------------------
  | Opt   |  < rL342874   |  >= rL342874   |                   |
  |--------------------------------------------------------|
  |-O3    |         vmla          |        vmul              |     vmul     |
  |            |                            |        vadd              |     vadd     |
  |------------ -------------------------------------------|
  |-Ofast |        vfma        |        vfma              |     vmul     |
  |             |                          |                                |     vadd     |
  |--------------------------------------------------------|
  |-Oz     |        vmla         |         vmla               |     vmla    |
  --------------------------------------------------------
      

This patch 1/2, is a cleanup of the spaghetti predicate logic on the different
VMLA and VFMA codegen rules, so that we can make the final functional change in
patch 2/2.  This also fixes a typo in the regression test added in https://reviews.llvm.org/rL342874.


https://reviews.llvm.org/D53314

Files:
  lib/Target/ARM/ARMInstrInfo.td
  lib/Target/ARM/ARMInstrNEON.td
  lib/Target/ARM/ARMInstrVFP.td
  test/CodeGen/ARM/fmacs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53314.169793.patch
Type: text/x-patch
Size: 15601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181016/3589a5c7/attachment.bin>


More information about the llvm-commits mailing list