Page MenuHomePhabricator

[ARM] MVE minnm and maxnm instructions
ClosedPublic

Authored by dmgreen on Jun 27 2019, 4:14 AM.

Details

Summary

This adds the patterns for minnm and maxnm from the fminnum and fmaxnum nodes, similar to scalar types.

Patch by Simon Tatham

Diff Detail

Repository
rL LLVM

Event Timeline

dmgreen created this revision.Jun 27 2019, 4:14 AM
dmgreen updated this revision to Diff 208624.Jul 9 2019, 3:18 AM

Updated tests

SjoerdMeijer added inline comments.Jul 9 2019, 3:54 AM
llvm/test/CodeGen/Thumb2/mve-minmax.ll
4 ↗(On Diff #208624)

I am going to be annoying and ask the same question again.... I know all this gets selected when we have HasMVEFloat, but is it perhaps useful to check what happens when we only have -mattr=+mve?

dmgreen marked an inline comment as done.Jul 9 2019, 7:12 AM
dmgreen added inline comments.
llvm/test/CodeGen/Thumb2/mve-minmax.ll
4 ↗(On Diff #208624)

This one works like all the others, with the -mattr=+mve,+fullfp16 line checking that we expand when we don't have mve.fp. The "nofp+mve" expansion will just be a more verbose version of the same thing (it's already pretty verbose for fp16!)

The idea was that we had a test that shows nofloat+mve expansion worked correctly for some instruction, and then these tests just needed to show expansion/selection at the correct times. I haven't added that test yet though, I will do so now.

That test was added in rL365496, to show MVE codegen where no fp instructions are present. This case would be like that without any fpu, just with more __aeabi_fcmpgt and movne's. I think this at least shows the expansion is happening correctly (plus is sidesteps an issues with these being turned into selects, which are not handled yet).

SjoerdMeijer accepted this revision.Jul 12 2019, 6:28 AM

Thanks, LGTM

This revision is now accepted and ready to land.Jul 12 2019, 6:28 AM
This revision was automatically updated to reflect the committed changes.