This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Add patterns for vmulh
ClosedPublic

Authored by dmgreen on Sep 21 2020, 3:17 AM.

Details

Summary

Now that vmulh can be selected, this adds the MVE patterns to make it legal and generate instructions.

Diff Detail

Event Timeline

dmgreen created this revision.Sep 21 2020, 3:17 AM
dmgreen requested review of this revision.Sep 21 2020, 3:17 AM
samparker added inline comments.Sep 21 2020, 4:22 AM
llvm/lib/Target/ARM/ARMISelLowering.cpp
772

So this doesn't break for non-vector targets then? Do they get expanded automatically because no vector types are supported?

dmgreen added inline comments.Sep 21 2020, 7:36 AM
llvm/lib/Target/ARM/ARMISelLowering.cpp
772

Do you mean like a cortex-m33? Where there is no MVE or NEON? I admit I didn't even consider that - but I think you are right. Everything will end up being scalarized anyway, and i32 mulhs/mulhu are handled appropriately.

samparker accepted this revision.Sep 22 2020, 12:50 AM

Thanks.

llvm/lib/Target/ARM/ARMISelLowering.cpp
772

Makes sense.

This revision is now accepted and ready to land.Sep 22 2020, 12:50 AM
This revision was automatically updated to reflect the committed changes.