This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Remove scalar src from non-sequential fadd/fmul reductions.
ClosedPublic

Authored by aemerson on Oct 9 2020, 10:44 AM.

Details

Summary

It's probably better to split these into separate G_FADD/G_FMUL + G_VECREDUCE operations in the translator rather than carrying the scalar around. The majority of the time it'll get simplified away as the scalars are probably identity values.

Diff Detail

Event Timeline

aemerson created this revision.Oct 9 2020, 10:44 AM
aemerson requested review of this revision.Oct 9 2020, 10:45 AM
aemerson updated this revision to Diff 297282.Oct 9 2020, 11:02 AM
aemerson retitled this revision from [GlobalISel] Remove scalar src from fadd/fmul reductions. to [GlobalISel] Remove scalar src from non-sequential fadd/fmul reductions..

Only do this for the relaxed ordering ones. If we were to split the op for the sequential variants, the commutative G_FADD would lose the associativity of the intrinsic.

This revision is now accepted and ready to land.Oct 15 2020, 1:25 PM
This revision was landed with ongoing or failed builds.Oct 15 2020, 4:02 PM
This revision was automatically updated to reflect the committed changes.