[ARM] Use isFMAFasterThanFMulAndFAdd for MVE
authorDavid Green <david.green@arm.com>
Mon, 4 Nov 2019 14:06:04 +0000 (14:06 +0000)
committerDavid Green <david.green@arm.com>
Mon, 4 Nov 2019 15:05:41 +0000 (15:05 +0000)
commit91b0cad8132997060182146b2734065bc807e9fa
treebbc63b21e4ddd0042e7b9f7b50628f33a4b53627
parentb556ce3992709e1f6302ca1d4c296f57e83cd6a7
[ARM] Use isFMAFasterThanFMulAndFAdd for MVE

The Arm backend will usually return false for isFMAFasterThanFMulAndFAdd,
where both the fused VFMA.f32 and a non-fused VMLA.f32 are usually
available for scalar code. For MVE we don't have the non-fused version
though. It makes more sense for isFMAFasterThanFMulAndFAdd to return
true, allowing us to simplify some of the existing ISel patterns.

The tests here are that non of the existing tests failed, and so we are
still selecting VFMA and VFMS. The one test that changed shows we can
now select from fast math flags, as opposed to just relying on the
isFMADLegalForFAddFSub option.

Differential Revision: https://reviews.llvm.org/D69115
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.h
llvm/lib/Target/ARM/ARMInstrMVE.td
llvm/test/CodeGen/Thumb2/LowOverheadLoops/fast-fp-loops.ll