This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Expand vector reduction intrinsics on soft float
ClosedPublic

Authored by nikic on Feb 2 2020, 1:15 PM.

Details

Summary

Followup to D73135. If the target doesn't have hard float (default for ARM), then we assert when trying to soften the result of vector reduction intrinsics. This patch marks these for expansion as well. (A bit odd to use vectors on a target without hard float ... but that's where you end up if you expose target-independent vector types.)

Diff Detail

Event Timeline

nikic created this revision.Feb 2 2020, 1:15 PM

Because we try to soften the vecreduce before we expand it?

nikic added a comment.Feb 3 2020, 12:43 AM

Because we try to soften the vecreduce before we expand it?

That's right. It's actually possible to do an expansion during softening with a little hack (using ReplaceValueWith and returning SDValue() you can get recursive return value type legalization -- not sure if that's an intended feature, but it seems to work...) I do plan to submit some followup patches to add the missing legalization bits I ran into.

dmgreen accepted this revision.Feb 3 2020, 2:52 AM

Righteo. LGTM in the meantime.

This revision is now accepted and ready to land.Feb 3 2020, 2:52 AM
This revision was automatically updated to reflect the committed changes.