This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Use isFMAFasterThanFMulAndFAdd for scalars as well as MVE vectors
ClosedPublic

Authored by dmgreen on Jan 3 2020, 4:05 AM.

Details

Summary

This adds extra scalar handling to isFMAFasterThanFMulAndFAdd, allowing the target independent code to handle more folds in more situations (for example if the fast math flags are present, but the global AllowFPOpFusion option isnt). It also splits apart the HasSlowFPVMLx into HasSlowFPVFMx, to allow VFMA and VMLA to be controlled separately if needed.

Diff Detail

Event Timeline

dmgreen created this revision.Jan 3 2020, 4:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 3 2020, 4:05 AM
samparker added inline comments.Jan 3 2020, 6:11 AM
llvm/lib/Target/ARM/ARMISelLowering.cpp
15029

Is there a way this logic can sit in Subtarget to avoid it being a tablegen predicate as well as code here? I'm hopeless with our FP architectures... does FullFP16 infer VFP4?

dmgreen marked an inline comment as done.Jan 3 2020, 8:31 AM
dmgreen added inline comments.
llvm/lib/Target/ARM/ARMISelLowering.cpp
15029

Yeah, that sounds good. I'll try and move it around.

FullFP16 implies fp-armv8 I'm pretty sure. So at least VFP4.

dmgreen updated this revision to Diff 236071.Jan 3 2020, 8:36 AM

Move more of the logic into Subtarget.

This revision is now accepted and ready to land.Jan 3 2020, 9:21 AM
This revision was automatically updated to reflect the committed changes.