This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Always lower fp16 zero to FMOVH0
ClosedPublic

Authored by dmgreen on Feb 14 2023, 1:01 AM.

Details

Summary

We can always use FMOVH0 to lower fp16 zero, even without fullfp16. We can either expand it to movi d0, #0 or fmov s0, wzr, which will both clear all the bits of the register.

Diff Detail

Event Timeline

dmgreen created this revision.Feb 14 2023, 1:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2023, 1:01 AM
dmgreen requested review of this revision.Feb 14 2023, 1:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2023, 1:01 AM
This revision is now accepted and ready to land.Feb 14 2023, 3:14 AM
SjoerdMeijer added inline comments.Feb 15 2023, 3:43 AM
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
9774–9775

Nit: perhaps fix this broken sentence while we are at it.

But yeah, also LGTM.

This revision was landed with ongoing or failed builds.Feb 15 2023, 8:06 AM
This revision was automatically updated to reflect the committed changes.