This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GISel] Add FP16 fcmp lowering
ClosedPublic

Authored by dmgreen on Apr 10 2023, 8:57 AM.

Details

Summary

This adds v4f16 and v8f16 lowering for fp16 vector compares. It splits the getActionDefinitionsBuilder of G_FCMP from G_ICMP, as they are quite different operations, and adds fp16 vector lowering.

Diff Detail

Event Timeline

dmgreen created this revision.Apr 10 2023, 8:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 10 2023, 8:57 AM
dmgreen requested review of this revision.Apr 10 2023, 8:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 10 2023, 8:57 AM
dmgreen retitled this revision from [AArch64][GISel} Add FP16 fcmp lowering to [AArch64][GISel] Add FP16 fcmp lowering.Apr 10 2023, 8:57 AM
paquette added inline comments.Apr 10 2023, 10:32 AM
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
459

I think you can use the existing HasFP16 variable here.

(There's also a MinFPScalar variable which is s16 when there's full FP16 support, and s32 otherwise, but I'm not sure if that fits into the logic here at all?)

dmgreen updated this revision to Diff 512387.Apr 11 2023, 3:24 AM

Thanks. Updated as suggested to use HasFP16 flag.

aemerson accepted this revision.Apr 11 2023, 4:21 PM

LGTM, thanks.

This revision is now accepted and ready to land.Apr 11 2023, 4:21 PM
lenary resigned from this revision.Apr 13 2023, 9:59 AM
This revision was landed with ongoing or failed builds.Apr 17 2023, 9:23 AM
This revision was automatically updated to reflect the committed changes.