This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Remove Duplicate FP16 Patterns with same encoding, match on existing patterns.
ClosedPublic

Authored by LukeGeeson on Jun 26 2018, 7:58 AM.

Details

Summary

Refactor rL334488 Codegen support: there were instructions with the same encoding, and these duplicates have been removed. In addition, codegen has been improved by better matching of i16 values that these intrinsics take as arguments. For this we had to teach EXTRACT_SUBREG and INSERT_SUBREG which uses AArch64RegisterInfo class hook getSubClassWithSubReg that H-registers can be extracted from the FPR32 and FPR64 register classes.

Diff Detail

Event Timeline

LukeGeeson created this revision.Jun 26 2018, 7:58 AM

Thanks for fixing this!

Can you please make the commit message (and the description of this ticket) more descriptive by clearly stating the problem, which is something along the lines of:

"Refactor rL334488 Codegen support: there were instructions with the same encoding, and these duplicates have been removed. In addition, codegen has been improved by better matching of i16 values that these intrinsics take as arguments. For this we had to teach EXTRACT_SUBREG which uses TargetRegisterClass hook getSubClassWithSubReg that H-registers can be extracted from the FPR32 and FPR64 register classes"

lib/Target/AArch64/AArch64InstrInfo.td
4944

I see what you've done here, but I am not sure this comment on itself will be very clear. I think just omitting it is clearer.

lib/Target/AArch64/AArch64RegisterInfo.cpp
78

What is this comment about?

LukeGeeson edited the summary of this revision. (Show Details)Jun 27 2018, 1:30 AM
LukeGeeson retitled this revision from [AArch64] Refactor of all code from rL334488 to fix disasm tests to [AArch64] Remove Duplicate FP16 Patterns with same encoding, match on existing patterns..Jun 27 2018, 1:32 AM
LukeGeeson marked 2 inline comments as done.
LukeGeeson added inline comments.
lib/Target/AArch64/AArch64InstrInfo.td
4944

Removed.

lib/Target/AArch64/AArch64RegisterInfo.cpp
78

A side effect, renamed/removed.

SjoerdMeijer accepted this revision.Jun 27 2018, 1:43 AM

Looks OK to me

This revision is now accepted and ready to land.Jun 27 2018, 1:43 AM
LukeGeeson closed this revision.Jun 27 2018, 2:25 AM
LukeGeeson marked 2 inline comments as done.