This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Don't materialize 0 with "fmov h0, .." when FullFP16 is not supported.
ClosedPublic

Authored by SjoerdMeijer on Feb 7 2018, 7:00 AM.

Details

Summary

We were generating:

fmov h0, wzr

instructions when FullFP16 is not enabled.

I've not added any tests, because the problem was visible in:

test/CodeGen/AArch64/arm64-zero-cycle-zeroing.ll

which I had to change: I don't think Cyclone has FullFP16 enabled
by default, so it shouldn't be using this v8.2a instruction.

Diff Detail

Event Timeline

SjoerdMeijer created this revision.Feb 7 2018, 7:00 AM
olista01 accepted this revision.Feb 7 2018, 7:22 AM

LGTM, but please wait a day to let other time zones comment.

This revision is now accepted and ready to land.Feb 7 2018, 7:22 AM

Other than the comments below, I second @olista01, LGTM.

test/CodeGen/AArch64/arm64-zero-cycle-zeroing.ll
7

Perhaps adding a test with just -mattr=fullfp16 is in order.

17

Since this line is identical to #23, it could be prefixed with ALL and #23 deleted.

Thanks for the speedy reviews! Feedback addressed, so
this is the diff I will commit my tomorrow morning. I've also
removed these rdar tags, please shout if there are any objections.

This revision was automatically updated to reflect the committed changes.