[PATCH] D42954: [ARM] f16 conversions

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 06:09:59 PST 2018


SjoerdMeijer updated this revision to Diff 132980.
SjoerdMeijer added a comment.

Addressed comments.

About:

> The instruction only requires HasFP16, so why does the pattern need FullFP16? (same question multiple times in this file)

What we are doing here, is "driving" one instruction description by 2 rewrite patterns:
one for FP16, and the other for FullFP16. The pattern names "FullFP16Pat"" and 
"FullFP16Pat" are mainly there just to make to make explicit when we are using these 
rules. I agree that this is instruction does not FullFP16, so I could remove the predicate
from the pattern definition:

  class FullFP16Pat<dag pattern, dag result> : Pat<pattern, result> {
    list<Predicate> Predicates = [HasFullFP16];
  }

But as the rewrite rule is using the HPR register class, which is added only when we 
have FullFP16 support, I thought it would be good to have it.


https://reviews.llvm.org/D42954

Files:
  lib/Target/ARM/ARMInstrVFP.td
  test/CodeGen/ARM/fp16-instructions.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42954.132980.patch
Type: text/x-patch
Size: 5212 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180206/0164aa13/attachment.bin>


More information about the llvm-commits mailing list