This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Select a number of fp16 rounding functions
ClosedPublic

Authored by dmgreen on May 23 2019, 8:59 AM.

Details

Summary

This add patterns for fp16 round and ceil etc. Same as the float and double patterns.

Round needs to be marked as legal. The others already are.

Diff Detail

Event Timeline

dmgreen created this revision.May 23 2019, 8:59 AM
SjoerdMeijer added inline comments.May 24 2019, 12:36 AM
llvm/test/CodeGen/ARM/fp16-full.ll
491 ↗(On Diff #200989)

There's a TODO in fp16-instructions.ll for these instructions. Either move the test there, or remove the TODOs.

dmgreen marked an inline comment as done.May 24 2019, 3:05 AM
dmgreen added inline comments.
llvm/test/CodeGen/ARM/fp16-full.ll
491 ↗(On Diff #200989)

Oh yeah. I think I saw that file and decided it was too messy and was trying to do too much. I really needed something that could auto-generate the tests.

There is also fp16-promote.ll which is where a lot of these tests came from and seemed a lot cleaner. Ideally neither of these tests would require loading from half pointers or the float coerce thing, which would make them cleaner still.

Anyway. I'll remove the TODO's, seeing as they are covered elsewhere.

dmgreen updated this revision to Diff 201177.May 24 2019, 3:14 AM
SjoerdMeijer accepted this revision.May 24 2019, 3:41 AM

This looks good to me.

Bikeshedding names: perhaps you can think about the filename fp16-full.ll as it is not really descriptive.

This revision is now accepted and ready to land.May 24 2019, 3:41 AM
This revision was automatically updated to reflect the committed changes.