This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fixup single source mla reductions.
ClosedPublic

Authored by dmgreen on Sep 8 2020, 6:58 AM.

Details

Summary

This fixes a complication on top of D87276. If we are sext-ing around a mul with the two operands that are the same, instcombine will helpfully convert one of the sext to a zext. Reverse that so that we again generate a reduction.

Diff Detail

Event Timeline

dmgreen created this revision.Sep 8 2020, 6:58 AM
dmgreen requested review of this revision.Sep 8 2020, 6:58 AM

So this can't be fixed by changing the IsVMLAV logic to accept mul with differing extending inputs then?

It could probably be done either way, but this seemed simpler when I wrote it. I was trying to keep the functions cleaner. Otherwise they will have to start looking backwards from the mul (which has two operands the same) up to the extend to check it's type.

samparker accepted this revision.Sep 10 2020, 12:26 AM

Okay, fair enough.

This revision is now accepted and ready to land.Sep 10 2020, 12:26 AM
dmgreen closed this revision.Sep 12 2020, 6:49 AM