This is an archive of the discontinued LLVM Phabricator instance.

[ARM][MVE] Add target flag for narrowing insts
ClosedPublic

Authored by samparker on Mar 23 2020, 6:34 AM.

Details

Summary

Add a flag, 'RetainsPreviousHalf', for operations that operate on top/bottom halves of their input and only write to half of their destination, leaving the other half to retain its previous value. Extracting this out of D76235 to make testing more manageable.

Diff Detail

Event Timeline

samparker created this revision.Mar 23 2020, 6:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2020, 6:34 AM

Looks like a good direction to me.

Question about the name retainsPreviousHalf. Since it is not immediately obvious what the Half refers to, that could e.g. be a registers, how do you feel about e.g. retainsPreviousHalfElement? That looks like the terminology used by the ArmARM, e.g one of the instruction descriptions is:

" ... writing the result to either the top half (T variant) or bottom half (B variant) of the result element. The other half of the destination vector element
retains its previous value."

llvm/lib/Target/ARM/ARMInstrFormats.td
411

I wanted to add that a comment would be good here, but then noticed there is one in ARMBaseInfo.h. Looks like the comment for thumbArithFlagSetting is duplicated, and is present here and in ARMBaseInfo.h

samparker updated this revision to Diff 252077.Mar 23 2020, 9:26 AM

Cheers. Updated the name.

SjoerdMeijer accepted this revision.Mar 23 2020, 10:03 AM

Thanks, LGTM

This revision is now accepted and ready to land.Mar 23 2020, 10:03 AM
This revision was automatically updated to reflect the committed changes.